blob: 167483718e0a63efbb26ccac7640de0f4ff05193 [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
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5565$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5566 ac_save_cc="$CC"
5567 CC="$CC -Wunused-result -Werror"
5568 save_CFLAGS="$CFLAGS"
5569 if ${ac_cv_disable_unused_result_warning+:} false; then :
5570 $as_echo_n "(cached) " >&6
5571else
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573/* end confdefs.h. */
5574
5575
5576int
5577main ()
5578{
5579
5580 ;
5581 return 0;
5582}
5583
5584_ACEOF
5585if ac_fn_c_try_compile "$LINENO"; then :
5586
5587 ac_cv_disable_unused_result_warning=yes
5588
5589else
5590
5591 ac_cv_disable_unused_result_warning=no
5592
5593fi
5594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5595fi
5596
5597 CFLAGS="$save_CFLAGS"
5598 CC="$ac_save_cc"
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5600$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5601
5602 if test $ac_cv_disable_unused_result_warning = yes
5603 then
5604 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5605 fi
5606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5608 # support. Without this, treatment of subnormals doesn't follow
5609 # the standard.
5610 case $ac_sys_machine in
5611 alpha*)
5612 BASECFLAGS="$BASECFLAGS -mieee"
5613 ;;
5614 esac
5615
5616 case $ac_sys_system in
5617 SCO_SV*)
5618 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5619 ;;
5620 # is there any other compiler on Darwin besides gcc?
5621 Darwin*)
5622 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5623 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005624 if test "${CC}" = gcc
5625 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5627$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005628 case "${UNIVERSALSDK}" in
5629 */MacOSX10.4u.sdk)
5630 # Build using 10.4 SDK, force usage of gcc when the
5631 # compiler is gcc, otherwise the user will get very
5632 # confusing error messages when building on OSX 10.6
5633 CC=gcc-4.0
5634 CPP=cpp-4.0
5635 ;;
5636 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5638$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005639 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641
5642 if test "${enable_universalsdk}"; then
5643 UNIVERSAL_ARCH_FLAGS=""
5644 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5646 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005647 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5649 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005650 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005651 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
5653 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5654 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005655 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005656 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005658 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005660 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005661 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005662
5663 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5664 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005665 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005666 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005669 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 +00005670
5671 fi
5672
5673
Ronald Oussoren666028b2010-04-18 19:07:43 +00005674 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5675 if test "${UNIVERSALSDK}" != "/"
5676 then
5677 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5678 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005679 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 fi
5681 fi
5682
5683 # Calculate the right deployment target for this build.
5684 #
5685 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5686 if test ${cur_target} '>' 10.2; then
5687 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005688 if test ${enable_universalsdk}; then
5689 if test "${UNIVERSAL_ARCHS}" = "all"; then
5690 # Ensure that the default platform for a
5691 # 4-way universal build is OSX 10.5,
5692 # that's the first OS release where
5693 # 4-way builds make sense.
5694 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005695
5696 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5697 cur_target='10.5'
5698
5699 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5700 cur_target='10.5'
5701
5702 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5703 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005704 fi
5705 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005706 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005707 # On Intel macs default to a deployment
5708 # target of 10.4, that's the first OSX
5709 # release with Intel support.
5710 cur_target="10.4"
5711 fi
5712 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 fi
5714 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5715
5716 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5717 # environment with a value that is the same as what we'll use
5718 # in the Makefile to ensure that we'll get the same compiler
5719 # environment during configure and build time.
5720 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5721 export MACOSX_DEPLOYMENT_TARGET
5722 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5723
5724 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 esac
5726 ;;
5727
5728*)
5729 case $ac_sys_system in
5730 OpenUNIX*|UnixWare*)
5731 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5732 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 SCO_SV*)
5734 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5735 ;;
5736 esac
5737 ;;
5738esac
5739
5740if test "$Py_DEBUG" = 'true'; then
5741 :
5742else
5743 OPT="-DNDEBUG $OPT"
5744fi
5745
5746if test "$ac_arch_flags"
5747then
5748 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5749fi
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751# Check whether GCC supports PyArg_ParseTuple format
5752if test "$GCC" = "yes"
5753then
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5755$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 save_CFLAGS=$CFLAGS
5757 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759/* end confdefs.h. */
5760
5761 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762int
5763main ()
5764{
5765
5766 ;
5767 return 0;
5768}
Matthias Kloseb159a552010-04-25 21:00:44 +00005769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005771if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772
Matthias Kloseb159a552010-04-25 21:00:44 +00005773
Matthias Kloseb9621712010-04-24 17:59:49 +00005774$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Matthias Kloseb159a552010-04-25 21:00:44 +00005776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005777$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779else
Matthias Kloseb159a552010-04-25 21:00:44 +00005780
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005782$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5786 CFLAGS=$save_CFLAGS
5787fi
5788
5789# On some compilers, pthreads are available without further options
5790# (e.g. MacOS X). On some of these systems, the compiler will not
5791# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5792# So we have to see first whether pthreads are available without
5793# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5795$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005796if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005797 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798else
Matthias Kloseb9621712010-04-24 17:59:49 +00005799 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 ac_cv_pthread_is_default=no
5801else
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803/* end confdefs.h. */
5804
5805#include <pthread.h>
5806
5807void* routine(void* p){return NULL;}
5808
5809int main(){
5810 pthread_t p;
5811 if(pthread_create(&p,NULL,routine,NULL)!=0)
5812 return 1;
5813 (void)pthread_detach(p);
5814 return 0;
5815}
5816
5817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
5820 ac_cv_pthread_is_default=yes
5821 ac_cv_kthread=no
5822 ac_cv_pthread=no
5823
5824else
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
5830
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832fi
5833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5835$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836
5837
5838if test $ac_cv_pthread_is_default = yes
5839then
5840 ac_cv_kpthread=no
5841else
5842# -Kpthread, if available, provides the right #defines
5843# and linker options to make pthread_create available
5844# Some compilers won't report that they do not support -Kpthread,
5845# so we need to run a program to see whether it really made the
5846# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5848$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005849if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851else
5852 ac_save_cc="$CC"
5853CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855 ac_cv_kpthread=no
5856else
Matthias Kloseb9621712010-04-24 17:59:49 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858/* end confdefs.h. */
5859
5860#include <pthread.h>
5861
5862void* routine(void* p){return NULL;}
5863
5864int main(){
5865 pthread_t p;
5866 if(pthread_create(&p,NULL,routine,NULL)!=0)
5867 return 1;
5868 (void)pthread_detach(p);
5869 return 0;
5870}
5871
5872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005873if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ac_cv_kpthread=yes
5875else
Matthias Kloseb9621712010-04-24 17:59:49 +00005876 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882CC="$ac_save_cc"
5883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5886$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
5888
5889if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5890then
5891# -Kthread, if available, provides the right #defines
5892# and linker options to make pthread_create available
5893# Some compilers won't report that they do not support -Kthread,
5894# so we need to run a program to see whether it really made the
5895# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5897$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005898if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900else
5901 ac_save_cc="$CC"
5902CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005903if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ac_cv_kthread=no
5905else
Matthias Kloseb9621712010-04-24 17:59:49 +00005906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907/* end confdefs.h. */
5908
5909#include <pthread.h>
5910
5911void* routine(void* p){return NULL;}
5912
5913int main(){
5914 pthread_t p;
5915 if(pthread_create(&p,NULL,routine,NULL)!=0)
5916 return 1;
5917 (void)pthread_detach(p);
5918 return 0;
5919}
5920
5921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005922if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ac_cv_kthread=yes
5924else
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
5930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931CC="$ac_save_cc"
5932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5935$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
5937
5938if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5939then
5940# -pthread, if available, provides the right #defines
5941# and linker options to make pthread_create available
5942# Some compilers won't report that they do not support -pthread,
5943# so we need to run a program to see whether it really made the
5944# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5946$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02005947if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
5950 ac_save_cc="$CC"
5951CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005952if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ac_cv_pthread=no
5954else
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956/* end confdefs.h. */
5957
5958#include <pthread.h>
5959
5960void* routine(void* p){return NULL;}
5961
5962int main(){
5963 pthread_t p;
5964 if(pthread_create(&p,NULL,routine,NULL)!=0)
5965 return 1;
5966 (void)pthread_detach(p);
5967 return 0;
5968}
5969
5970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005971if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ac_cv_pthread=yes
5973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980CC="$ac_save_cc"
5981fi
5982
Matthias Kloseb9621712010-04-24 17:59:49 +00005983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5984$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
5986
5987# If we have set a CC compiler flag for thread support then
5988# check if it works for CXX, too.
5989ac_cv_cxx_thread=no
5990if test ! -z "$CXX"
5991then
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5993$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994ac_save_cxx="$CXX"
5995
5996if test "$ac_cv_kpthread" = "yes"
5997then
5998 CXX="$CXX -Kpthread"
5999 ac_cv_cxx_thread=yes
6000elif test "$ac_cv_kthread" = "yes"
6001then
6002 CXX="$CXX -Kthread"
6003 ac_cv_cxx_thread=yes
6004elif test "$ac_cv_pthread" = "yes"
6005then
6006 CXX="$CXX -pthread"
6007 ac_cv_cxx_thread=yes
6008fi
6009
6010if test $ac_cv_cxx_thread = yes
6011then
6012 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6013 $CXX -c conftest.$ac_ext 2>&5
6014 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6015 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6016 then
6017 ac_cv_cxx_thread=yes
6018 else
6019 ac_cv_cxx_thread=no
6020 fi
6021 rm -fr conftest*
6022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6024$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025fi
6026CXX="$ac_save_cxx"
6027
6028
6029# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6031$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006032if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036/* end confdefs.h. */
6037#include <stdlib.h>
6038#include <stdarg.h>
6039#include <string.h>
6040#include <float.h>
6041
6042int
6043main ()
6044{
6045
6046 ;
6047 return 0;
6048}
6049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006050if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 ac_cv_header_stdc=yes
6052else
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6056
6057if test $ac_cv_header_stdc = yes; then
6058 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060/* end confdefs.h. */
6061#include <string.h>
6062
6063_ACEOF
6064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 $EGREP "memchr" >/dev/null 2>&1; then :
6066
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
6068 ac_cv_header_stdc=no
6069fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006070rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071
6072fi
6073
6074if test $ac_cv_header_stdc = yes; then
6075 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077/* end confdefs.h. */
6078#include <stdlib.h>
6079
6080_ACEOF
6081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 $EGREP "free" >/dev/null 2>&1; then :
6083
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084else
6085 ac_cv_header_stdc=no
6086fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006087rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088
6089fi
6090
6091if test $ac_cv_header_stdc = yes; then
6092 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094 :
6095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097/* end confdefs.h. */
6098#include <ctype.h>
6099#include <stdlib.h>
6100#if ((' ' & 0x0FF) == 0x020)
6101# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6102# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6103#else
6104# define ISLOWER(c) \
6105 (('a' <= (c) && (c) <= 'i') \
6106 || ('j' <= (c) && (c) <= 'r') \
6107 || ('s' <= (c) && (c) <= 'z'))
6108# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6109#endif
6110
6111#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6112int
6113main ()
6114{
6115 int i;
6116 for (i = 0; i < 256; i++)
6117 if (XOR (islower (i), ISLOWER (i))
6118 || toupper (i) != TOUPPER (i))
6119 return 2;
6120 return 0;
6121}
6122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006123if ac_fn_c_try_run "$LINENO"; then :
6124
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125else
Matthias Kloseb9621712010-04-24 17:59:49 +00006126 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130fi
6131
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132fi
6133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6135$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136if test $ac_cv_header_stdc = yes; then
6137
Matthias Kloseb9621712010-04-24 17:59:49 +00006138$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139
6140fi
6141
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006142for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006143fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006144ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006145sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006146unistd.h utime.h \
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006147sys/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 +00006148sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006149sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6150sys/stat.h sys/termio.h sys/time.h \
6151sys/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 -07006152libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006153bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006154do :
6155 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6156ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006157if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006159#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006160_ACEOF
6161
6162fi
6163
Guido van Rossum627b2d71993-12-24 10:39:16 +00006164done
6165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006167for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6170$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006171if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176#include <sys/types.h>
6177#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006178
Martin v. Löwis11437992002-04-12 09:54:03 +00006179int
6180main ()
6181{
6182if ((DIR *) 0)
6183return 0;
6184 ;
6185 return 0;
6186}
6187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006189 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006195eval ac_res=\$$as_ac_Header
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6197$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006200#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006201_ACEOF
6202
6203ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006206done
6207# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6208if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6210$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006211if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213else
Martin v. Löwis11437992002-04-12 09:54:03 +00006214 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006218/* Override any GCC internal prototype to avoid an error.
6219 Use char because int might match the return type of a GCC
6220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006221#ifdef __cplusplus
6222extern "C"
6223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006224char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006225int
6226main ()
6227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006229 ;
6230 return 0;
6231}
6232_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233for ac_lib in '' dir; do
6234 if test -z "$ac_lib"; then
6235 ac_res="none required"
6236 else
6237 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006240 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006243rm -f core conftest.err conftest.$ac_objext \
6244 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006245 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006249if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251else
6252 ac_cv_search_opendir=no
6253fi
6254rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006255LIBS=$ac_func_search_save_LIBS
6256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6258$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006260if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
Michael W. Hudson54241132001-12-07 15:38:26 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6267$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006268if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006270else
6271 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275/* Override any GCC internal prototype to avoid an error.
6276 Use char because int might match the return type of a GCC
6277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006278#ifdef __cplusplus
6279extern "C"
6280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006281char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006282int
6283main ()
6284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006285return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006286 ;
6287 return 0;
6288}
6289_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290for ac_lib in '' x; do
6291 if test -z "$ac_lib"; then
6292 ac_res="none required"
6293 else
6294 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006295 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006297 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300rm -f core conftest.err conftest.$ac_objext \
6301 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006302 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006303 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006306if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308else
6309 ac_cv_search_opendir=no
6310fi
6311rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006312LIBS=$ac_func_search_save_LIBS
6313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6315$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006316ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006317if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006320fi
6321
6322fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6325$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006326if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006330/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006332int
6333main ()
6334{
6335return makedev(0, 0);
6336 ;
6337 return 0;
6338}
6339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341 ac_cv_header_sys_types_h_makedev=yes
6342else
Matthias Kloseb9621712010-04-24 17:59:49 +00006343 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006345rm -f core conftest.err conftest.$ac_objext \
6346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006347
6348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6350$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351
6352if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006353ac_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 +02006354if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
6359
6360
6361
6362 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006363 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 +02006364if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368fi
6369
6370
6371 fi
6372fi
6373
Michael W. Hudson54241132001-12-07 15:38:26 +00006374
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006375# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6376for ac_header in net/if.h
6377do :
6378 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6379#ifdef STDC_HEADERS
6380# include <stdlib.h>
6381# include <stddef.h>
6382#else
6383# ifdef HAVE_STDLIB_H
6384# include <stdlib.h>
6385# endif
6386#endif
6387#ifdef HAVE_SYS_SOCKET_H
6388# include <sys/socket.h>
6389#endif
6390
6391"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006392if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006393 cat >>confdefs.h <<_ACEOF
6394#define HAVE_NET_IF_H 1
6395_ACEOF
6396
6397fi
6398
6399done
6400
6401
6402
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006404for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006405do :
6406 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006407#ifdef HAVE_CURSES_H
6408#include <curses.h>
6409#endif
6410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006412if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006414#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006415_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006417fi
6418
6419done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420
6421
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006423for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006424do :
6425 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 +00006426#ifdef HAVE_ASM_TYPES_H
6427#include <asm/types.h>
6428#endif
6429#ifdef HAVE_SYS_SOCKET_H
6430#include <sys/socket.h>
6431#endif
6432
Matthias Kloseb9621712010-04-24 17:59:49 +00006433"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006434if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006436#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437_ACEOF
6438
6439fi
6440
6441done
6442
6443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006445was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6447$as_echo_n "checking for clock_t in time.h... " >&6; }
6448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006454 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006455 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456else
Martin v. Löwis11437992002-04-12 09:54:03 +00006457
6458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006461
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006463rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464
Matthias Kloseb9621712010-04-24 17:59:49 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6466$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6469$as_echo_n "checking for makedev... " >&6; }
6470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006471/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006472
Jesus Cea740f53a2010-04-28 11:35:30 +00006473#if defined(MAJOR_IN_MKDEV)
6474#include <sys/mkdev.h>
6475#elif defined(MAJOR_IN_SYSMACROS)
6476#include <sys/sysmacros.h>
6477#else
6478#include <sys/types.h>
6479#endif
6480
Neal Norwitz11690112002-07-30 01:08:28 +00006481int
6482main ()
6483{
Jesus Cea740f53a2010-04-28 11:35:30 +00006484
6485 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006486 ;
6487 return 0;
6488}
Matthias Kloseb159a552010-04-25 21:00:44 +00006489
Neal Norwitz11690112002-07-30 01:08:28 +00006490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006491if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006492 ac_cv_has_makedev=yes
6493else
Matthias Kloseb9621712010-04-24 17:59:49 +00006494 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006496rm -f core conftest.err conftest.$ac_objext \
6497 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6499$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006500if test "$ac_cv_has_makedev" = "yes"; then
6501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006503
6504fi
6505
Martin v. Löwis399a6892002-10-04 10:22:02 +00006506# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6507# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6508# defined, but the compiler does not support pragma redefine_extname,
6509# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6510# structures (such as rlimit64) without declaring them. As a
6511# work-around, disable LFS on such configurations
6512
6513use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6515$as_echo_n "checking Solaris LFS bug... " >&6; }
6516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006518
6519#define _LARGEFILE_SOURCE 1
6520#define _FILE_OFFSET_BITS 64
6521#include <sys/resource.h>
6522
Martin v. Löwis399a6892002-10-04 10:22:02 +00006523int
6524main ()
6525{
6526struct rlimit foo;
6527 ;
6528 return 0;
6529}
6530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006532 sol_lfs_bug=no
6533else
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6538$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006539if test "$sol_lfs_bug" = "yes"; then
6540 use_lfs=no
6541fi
6542
6543if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006544# Two defines needed to enable largefile support on various platforms
6545# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006546case $ac_sys_system/$ac_sys_release in
6547AIX*)
6548
6549$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6550
6551 ;;
6552esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006555
6556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006558
Martin v. Löwis399a6892002-10-04 10:22:02 +00006559fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006560
Guido van Rossum84e7b241996-08-19 21:59:00 +00006561# Add some code to confdefs.h so that the test for off_t works on SCO
6562cat >> confdefs.h <<\EOF
6563#if defined(SCO_DS)
6564#undef _OFF_T
6565#endif
6566EOF
6567
Guido van Rossumef2255b2000-03-10 22:30:29 +00006568# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006569ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006570if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006571
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572else
Martin v. Löwis11437992002-04-12 09:54:03 +00006573
6574cat >>confdefs.h <<_ACEOF
6575#define mode_t int
6576_ACEOF
6577
6578fi
6579
Matthias Kloseb9621712010-04-24 17:59:49 +00006580ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006581if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006582
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583else
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006587_ACEOF
6588
6589fi
6590
Matthias Kloseb9621712010-04-24 17:59:49 +00006591ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006592if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594else
Martin v. Löwis11437992002-04-12 09:54:03 +00006595
6596cat >>confdefs.h <<_ACEOF
6597#define pid_t int
6598_ACEOF
6599
6600fi
6601
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006602
Martin v. Löwis11437992002-04-12 09:54:03 +00006603cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006604#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006605_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006606
Matthias Kloseb9621712010-04-24 17:59:49 +00006607ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006608if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006609
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006610else
Martin v. Löwis11437992002-04-12 09:54:03 +00006611
6612cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006614_ACEOF
6615
6616fi
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6619$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006620if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006622else
Matthias Kloseb9621712010-04-24 17:59:49 +00006623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006624/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006625#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006626
6627_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630 ac_cv_type_uid_t=yes
6631else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006632 ac_cv_type_uid_t=no
6633fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006634rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006635
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6638$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006639if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006640
Matthias Kloseb9621712010-04-24 17:59:49 +00006641$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006642
6643
Matthias Kloseb9621712010-04-24 17:59:49 +00006644$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006645
6646fi
6647
Matthias Kloseb9621712010-04-24 17:59:49 +00006648ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6649case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006650 no|yes) ;; #(
6651 *)
6652
Matthias Kloseb9621712010-04-24 17:59:49 +00006653$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006654
6655
6656cat >>confdefs.h <<_ACEOF
6657#define uint32_t $ac_cv_c_uint32_t
6658_ACEOF
6659;;
6660 esac
6661
Matthias Kloseb9621712010-04-24 17:59:49 +00006662ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6663case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006664 no|yes) ;; #(
6665 *)
6666
Matthias Kloseb9621712010-04-24 17:59:49 +00006667$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006668
6669
6670cat >>confdefs.h <<_ACEOF
6671#define uint64_t $ac_cv_c_uint64_t
6672_ACEOF
6673;;
6674 esac
6675
Matthias Kloseb9621712010-04-24 17:59:49 +00006676ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6677case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006678 no|yes) ;; #(
6679 *)
6680
6681cat >>confdefs.h <<_ACEOF
6682#define int32_t $ac_cv_c_int32_t
6683_ACEOF
6684;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006685esac
6686
Matthias Kloseb9621712010-04-24 17:59:49 +00006687ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6688case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006689 no|yes) ;; #(
6690 *)
6691
6692cat >>confdefs.h <<_ACEOF
6693#define int64_t $ac_cv_c_int64_t
6694_ACEOF
6695;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006696esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006697
Matthias Kloseb9621712010-04-24 17:59:49 +00006698ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006699if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700
Matthias Kloseb9621712010-04-24 17:59:49 +00006701$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006702
6703fi
6704
Jack Jansendd19cf82001-12-06 22:36:17 +00006705
Michael W. Hudson54241132001-12-07 15:38:26 +00006706# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006707# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708# The cast to long int works around a bug in the HP C Compiler
6709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6713$as_echo_n "checking size of int... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006714if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006716else
Matthias Kloseb9621712010-04-24 17:59:49 +00006717 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 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 if test "$ac_cv_type_int" = yes; then
6721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006723as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725 else
6726 ac_cv_sizeof_int=0
6727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6732$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733
6734
6735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006737#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006738_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006739
6740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741# The cast to long int works around a bug in the HP C Compiler
6742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6746$as_echo_n "checking size of long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006747if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006749else
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 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 +00006751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 if test "$ac_cv_type_long" = yes; then
6754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006756as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006757See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758 else
6759 ac_cv_sizeof_long=0
6760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6765$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766
6767
6768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006770#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006771_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006772
6773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774# The cast to long int works around a bug in the HP C Compiler
6775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6779$as_echo_n "checking size of void *... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006780if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 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 +00006784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 if test "$ac_cv_type_void_p" = yes; then
6787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006789as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006790See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791 else
6792 ac_cv_sizeof_void_p=0
6793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6798$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799
6800
6801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006803#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006804_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006805
6806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807# The cast to long int works around a bug in the HP C Compiler
6808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6812$as_echo_n "checking size of short... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006813if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 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 +00006817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 if test "$ac_cv_type_short" = yes; then
6820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006822as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006823See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824 else
6825 ac_cv_sizeof_short=0
6826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006828
Martin v. Löwis11437992002-04-12 09:54:03 +00006829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6831$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832
6833
6834
Martin v. Löwis11437992002-04-12 09:54:03 +00006835cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006836#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006837_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006838
6839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840# The cast to long int works around a bug in the HP C Compiler
6841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6845$as_echo_n "checking size of float... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006846if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006847 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006848else
Matthias Kloseb9621712010-04-24 17:59:49 +00006849 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 +00006850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851else
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 if test "$ac_cv_type_float" = yes; then
6853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006855as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006856See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857 else
6858 ac_cv_sizeof_float=0
6859 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006861
Martin v. Löwis11437992002-04-12 09:54:03 +00006862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6864$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865
6866
6867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006869#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006870_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006871
6872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873# The cast to long int works around a bug in the HP C Compiler
6874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6878$as_echo_n "checking size of double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006879if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006880 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006881else
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 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 +00006883
Martin v. Löwis11437992002-04-12 09:54:03 +00006884else
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 if test "$ac_cv_type_double" = yes; then
6886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006888as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006889See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890 else
6891 ac_cv_sizeof_double=0
6892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006894
Martin v. Löwis11437992002-04-12 09:54:03 +00006895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6897$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006898
6899
6900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006902#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006903_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006904
6905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906# The cast to long int works around a bug in the HP C Compiler
6907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6909# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6911$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006912if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006913 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 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 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 if test "$ac_cv_type_fpos_t" = yes; then
6919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006921as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006922See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923 else
6924 ac_cv_sizeof_fpos_t=0
6925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6930$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006931
6932
6933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006935#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006936_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006937
Michael W. Hudson54241132001-12-07 15:38:26 +00006938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939# The cast to long int works around a bug in the HP C Compiler
6940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6944$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006945if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 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 +00006949
Martin v. Löwis18e16552006-02-15 17:27:45 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 if test "$ac_cv_type_size_t" = yes; then
6952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006954as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006955See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956 else
6957 ac_cv_sizeof_size_t=0
6958 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960
Martin v. Löwis18e16552006-02-15 17:27:45 +00006961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6963$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964
6965
6966
Martin v. Löwis18e16552006-02-15 17:27:45 +00006967cat >>confdefs.h <<_ACEOF
6968#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6969_ACEOF
6970
6971
Christian Heimes400adb02008-02-01 08:12:03 +00006972# The cast to long int works around a bug in the HP C Compiler
6973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6975# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6977$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006978if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 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 +00006982
Christian Heimes400adb02008-02-01 08:12:03 +00006983else
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 if test "$ac_cv_type_pid_t" = yes; then
6985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006987as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02006988See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006989 else
6990 ac_cv_sizeof_pid_t=0
6991 fi
6992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006993
Christian Heimes400adb02008-02-01 08:12:03 +00006994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6996$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006997
6998
6999
7000cat >>confdefs.h <<_ACEOF
7001#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7002_ACEOF
7003
7004
Michael W. Hudson54241132001-12-07 15:38:26 +00007005
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7007$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007008have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007010/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012int
7013main ()
7014{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007015long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 ;
7017 return 0;
7018}
7019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007021
7022
Matthias Kloseb9621712010-04-24 17:59:49 +00007023$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007025 have_long_long=yes
7026
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7030$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007031if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032# The cast to long int works around a bug in the HP C Compiler
7033# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7034# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7035# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7037$as_echo_n "checking size of long long... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007038if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 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 +00007042
Martin v. Löwis11437992002-04-12 09:54:03 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 if test "$ac_cv_type_long_long" = yes; then
7045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007047as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007048See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049 else
7050 ac_cv_sizeof_long_long=0
7051 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007053
Martin v. Löwis11437992002-04-12 09:54:03 +00007054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7056$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057
7058
7059
Martin v. Löwis11437992002-04-12 09:54:03 +00007060cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007061#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007062_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007063
Michael W. Hudson54241132001-12-07 15:38:26 +00007064
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007065fi
7066
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7068$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007069have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007071/* end confdefs.h. */
7072
7073int
7074main ()
7075{
7076long double x; x = (long double)0;
7077 ;
7078 return 0;
7079}
7080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007081if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007082
7083
Matthias Kloseb9621712010-04-24 17:59:49 +00007084$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007085
7086 have_long_double=yes
7087
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007088fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7091$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007092if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007093# The cast to long int works around a bug in the HP C Compiler
7094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7098$as_echo_n "checking size of long double... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007099if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007101else
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 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 +00007103
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if test "$ac_cv_type_long_double" = yes; then
7106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007108as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007109See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007110 else
7111 ac_cv_sizeof_long_double=0
7112 fi
7113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007114
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7117$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007118
7119
7120
7121cat >>confdefs.h <<_ACEOF
7122#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7123_ACEOF
7124
7125
7126fi
7127
7128
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7130$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007131have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007133/* end confdefs.h. */
7134
7135int
7136main ()
7137{
7138_Bool x; x = (_Bool)0;
7139 ;
7140 return 0;
7141}
7142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007143if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007144
7145
Matthias Kloseb9621712010-04-24 17:59:49 +00007146$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007147
7148 have_c99_bool=yes
7149
Thomas Woutersb2137042007-02-01 18:02:27 +00007150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7153$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007154if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155# The cast to long int works around a bug in the HP C Compiler
7156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7160$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007161if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 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 +00007165
Thomas Woutersb2137042007-02-01 18:02:27 +00007166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 if test "$ac_cv_type__Bool" = yes; then
7168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007170as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007171See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007172 else
7173 ac_cv_sizeof__Bool=0
7174 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007176
Thomas Woutersb2137042007-02-01 18:02:27 +00007177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7179$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007180
7181
7182
Thomas Woutersb2137042007-02-01 18:02:27 +00007183cat >>confdefs.h <<_ACEOF
7184#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7185_ACEOF
7186
7187
7188fi
7189
Matthias Kloseb9621712010-04-24 17:59:49 +00007190ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007191 #include <stdint.h>
7192 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007193 #ifdef HAVE_INTTYPES_H
7194 #include <inttypes.h>
7195 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007196"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007197if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007198
7199cat >>confdefs.h <<_ACEOF
7200#define HAVE_UINTPTR_T 1
7201_ACEOF
7202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203# The cast to long int works around a bug in the HP C Compiler
7204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7206# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7208$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007209if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 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 +00007213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 if test "$ac_cv_type_uintptr_t" = yes; then
7216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7217$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007218as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007219See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220 else
7221 ac_cv_sizeof_uintptr_t=0
7222 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007224
Martin v. Löwis11437992002-04-12 09:54:03 +00007225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7227$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007228
7229
7230
Martin v. Löwis11437992002-04-12 09:54:03 +00007231cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007232#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007233_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007234
Michael W. Hudson54241132001-12-07 15:38:26 +00007235
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007236fi
7237
Thomas Wouters89f507f2006-12-13 04:49:30 +00007238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007239# The cast to long int works around a bug in the HP C Compiler
7240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7242# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7244$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007245if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007246 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247else
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249#ifdef HAVE_SYS_TYPES_H
7250#include <sys/types.h>
7251#endif
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 if test "$ac_cv_type_off_t" = yes; then
7257 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007259as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007260See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261 else
7262 ac_cv_sizeof_off_t=0
7263 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007265
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7268$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007270
7271
Martin v. Löwis11437992002-04-12 09:54:03 +00007272cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007273#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007274_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007275
Michael W. Hudson54241132001-12-07 15:38:26 +00007276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007277
Matthias Kloseb9621712010-04-24 17:59:49 +00007278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7279$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007280if test "$have_long_long" = yes
7281then
7282if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007283 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007284
Matthias Kloseb9621712010-04-24 17:59:49 +00007285$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007286
Matthias Kloseb9621712010-04-24 17:59:49 +00007287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7288$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007289else
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7291$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007292fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007296fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007297
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007298# The cast to long int works around a bug in the HP C Compiler
7299# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7300# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7301# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7303$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007304if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007306else
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007308#ifdef HAVE_SYS_TYPES_H
7309#include <sys/types.h>
7310#endif
7311#ifdef HAVE_TIME_H
7312#include <time.h>
7313#endif
7314
Matthias Kloseb9621712010-04-24 17:59:49 +00007315"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 if test "$ac_cv_type_time_t" = yes; then
7319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007321as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007322See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007323 else
7324 ac_cv_sizeof_time_t=0
7325 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007327
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7330$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332
7333
Martin v. Löwis11437992002-04-12 09:54:03 +00007334cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007335#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007336_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007337
Michael W. Hudson54241132001-12-07 15:38:26 +00007338
7339
Trent Mick635f6fb2000-08-23 21:33:05 +00007340# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007341ac_save_cc="$CC"
7342if test "$ac_cv_kpthread" = "yes"
7343then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007344elif test "$ac_cv_kthread" = "yes"
7345then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007346elif test "$ac_cv_pthread" = "yes"
7347then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007348fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7351$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007352have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007354/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007355
7356 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007357int
7358main ()
7359{
Guido van Rossum12580492000-09-24 16:47:19 +00007360pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 ;
7362 return 0;
7363}
Matthias Kloseb159a552010-04-25 21:00:44 +00007364
Martin v. Löwis11437992002-04-12 09:54:03 +00007365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007366if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007367 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7371$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007372if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007373 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007374# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7375# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7376# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7378$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007379if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007383#ifdef HAVE_PTHREAD_H
7384#include <pthread.h>
7385#endif
7386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007388
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 if test "$ac_cv_type_pthread_t" = yes; then
7391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007393as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007394See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007395 else
7396 ac_cv_sizeof_pthread_t=0
7397 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007399
Trent Mick635f6fb2000-08-23 21:33:05 +00007400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7402$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007403
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007404
7405
Martin v. Löwis11437992002-04-12 09:54:03 +00007406cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007407#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007409
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007410
Trent Mick635f6fb2000-08-23 21:33:05 +00007411fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007412CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007413
Michael W. Hudson54241132001-12-07 15:38:26 +00007414
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007415case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007416 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007417 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7418 ;;
7419 Darwin/*)
7420 OTHER_LIBTOOL_OPT=""
7421 ;;
7422esac
7423
7424
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425ARCH_RUN_32BIT=""
7426
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007427case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007428 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007429 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7430 if test "${enable_universalsdk}"; then
7431 :
7432 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007433 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007434 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007435 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007436 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007437 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007438 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007439 if test ${gcc_version} '<' 4.0
7440 then
7441 LIBTOOL_CRUFT="-lcc_dynamic"
7442 else
7443 LIBTOOL_CRUFT=""
7444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007446 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007449/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007450
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007451 #include <unistd.h>
7452 int main(int argc, char*argv[])
7453 {
7454 if (sizeof(long) == 4) {
7455 return 0;
7456 } else {
7457 return 1;
7458 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007459 }
7460
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007462if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007463 ac_osx_32bit=yes
7464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007469fi
7470
7471
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007472 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007473 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007474 i386)
7475 MACOSX_DEFAULT_ARCH="i386"
7476 ;;
7477 ppc)
7478 MACOSX_DEFAULT_ARCH="ppc"
7479 ;;
7480 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007481 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007482 ;;
7483 esac
7484 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007485 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486 i386)
7487 MACOSX_DEFAULT_ARCH="x86_64"
7488 ;;
7489 ppc)
7490 MACOSX_DEFAULT_ARCH="ppc64"
7491 ;;
7492 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007493 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007494 ;;
7495 esac
7496
7497 #ARCH_RUN_32BIT="true"
7498 fi
7499
7500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007503esac
7504
Matthias Kloseb9621712010-04-24 17:59:49 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7506$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007507if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007509 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007511 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007512
Matthias Kloseb9621712010-04-24 17:59:49 +00007513$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7516$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007517 if test $enable_shared = "yes"
7518 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007519 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 +00007520 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524fi
7525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7527$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007528case $ac_sys_system/$ac_sys_release in
7529 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007532
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7534$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007535 ;;
7536 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007539 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007540esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007541
Guido van Rossum0a516c91994-09-12 10:58:40 +00007542# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543
Michael W. Hudson54241132001-12-07 15:38:26 +00007544
7545
7546
7547
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548
Thomas Wouters477c8d52006-05-27 19:21:47 +00007549
Georg Brandlb1441c72009-01-03 22:33:39 +00007550
Thomas Wouters477c8d52006-05-27 19:21:47 +00007551cat >>confdefs.h <<_ACEOF
7552#define SHLIB_EXT "$SO"
7553_ACEOF
7554
Guido van Rossum0a516c91994-09-12 10:58:40 +00007555# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007556# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007557# (Shared libraries in this instance are shared modules to be loaded into
7558# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7560$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561if test -z "$LDSHARED"
7562then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007563 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007564 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007565 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007566 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007567 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007568 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007569 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007571 if test "$GCC" = "yes" ; then
7572 LDSHARED='$(CC) -shared'
7573 LDCXXSHARED='$(CXX) -shared'
7574 else
7575 LDSHARED='$(CC) -G'
7576 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007577 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007578 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007579 if test "$GCC" = "yes" ; then
7580 LDSHARED='$(CC) -shared'
7581 LDCXXSHARED='$(CXX) -shared'
7582 else
7583 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007584 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007585 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007586 LDSHARED='$(CC) -bundle'
7587 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007588 if test "$enable_framework" ; then
7589 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007590 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7591 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007592 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007593 else
7594 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007595 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007596 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007597 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007598 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -bundle'
7600 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007601 if test "$enable_framework" ; then
7602 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007603 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7604 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007605 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007606 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007607 # No framework, use the Python app as bundle-loader
7608 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007609 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007610 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007611 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007612 Darwin/*)
7613 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7614 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007615
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007616 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007617 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007618 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007619 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007620 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007621 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7622 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007623 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007624 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007625 LDSHARED='$(CC) -bundle'
7626 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007627 if test "$enable_framework" ; then
7628 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007629 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7630 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007631 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007632 else
7633 # No framework, use the Python app as bundle-loader
7634 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7635 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007636 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 fi
7638 fi
7639 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007640 Linux*|GNU*|QNX*)
7641 LDSHARED='$(CC) -shared'
7642 LDCXXSHARED='$(CXX) -shared';;
7643 BSD/OS*/4*)
7644 LDSHARED="gcc -shared"
7645 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007646 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007647 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007648 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007649 LDSHARED='$(CC) -shared'
7650 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007651 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007652 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007653 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007654 OpenBSD*)
7655 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7656 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007657 LDSHARED='$(CC) -shared $(CCSHARED)'
7658 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007659 else
7660 case `uname -r` in
7661 [01].* | 2.[0-7] | 2.[0-7].*)
7662 LDSHARED="ld -Bshareable ${LDFLAGS}"
7663 ;;
7664 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007665 LDSHARED='$(CC) -shared $(CCSHARED)'
7666 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007667 ;;
7668 esac
7669 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007670 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007671 LDSHARED='$(CC) -shared'
7672 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007673 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007674 if test "$GCC" = "yes" ; then
7675 LDSHARED='$(CC) -shared'
7676 LDCXXSHARED='$(CXX) -shared'
7677 else
7678 LDSHARED='$(CC) -G'
7679 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007680 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007681 SCO_SV*)
7682 LDSHARED='$(CC) -Wl,-G,-Bexport'
7683 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7684 CYGWIN*)
7685 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7686 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687 *) LDSHARED="ld";;
7688 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7691$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007692LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007693BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007694# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007695# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7697$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007698if test -z "$CCSHARED"
7699then
Guido van Rossum07397971997-04-29 21:49:50 +00007700 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007701 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007702 then CCSHARED="-fPIC";
7703 elif test `uname -p` = sparc;
7704 then CCSHARED="-xcode=pic32";
7705 else CCSHARED="-Kpic";
7706 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007707 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007708 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007709 else CCSHARED="+z";
7710 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007711 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007712 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007713 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007714 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007715 if test "$GCC" = "yes"
7716 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007717 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007718 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007719 SCO_SV*)
7720 if test "$GCC" = "yes"
7721 then CCSHARED="-fPIC"
7722 else CCSHARED="-Kpic -belf"
7723 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007724 IRIX*/6*) case $CC in
7725 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007726 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007727 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7731$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007733# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7735$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007736if test -z "$LINKFORSHARED"
7737then
Guido van Rossum07397971997-04-29 21:49:50 +00007738 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007739 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007740 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007741 LINKFORSHARED="-Wl,-E -Wl,+s";;
7742# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007743 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007744 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007745 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007747 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007748 if test "$enable_framework"
7749 then
Jack Jansenda49e192005-01-07 13:08:22 +00007750 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007751 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007752 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007753 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007754 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007755 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007756 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007757 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7758 then
7759 LINKFORSHARED="-Wl,--export-dynamic"
7760 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007761 SunOS/5*) case $CC in
7762 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007763 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007764 then
7765 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007766 fi;;
7767 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007768 CYGWIN*)
7769 if test $enable_shared = "no"
7770 then
7771 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7772 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007773 QNX*)
7774 # -Wl,-E causes the symbols to be added to the dynamic
7775 # symbol table so that they can be found when a module
7776 # is loaded. -N 2048K causes the stack size to be set
7777 # to 2048 kilobytes so that the stack doesn't overflow
7778 # when running test_compile.py.
7779 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7783$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007784
Michael W. Hudson54241132001-12-07 15:38:26 +00007785
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007786
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7788$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007789if test ! "$LIBRARY" = "$LDLIBRARY"
7790then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007791 case $ac_sys_system in
7792 CYGWIN*)
7793 # Cygwin needs CCSHARED when building extension DLLs
7794 # but not when building the interpreter DLL.
7795 CFLAGSFORSHARED='';;
7796 *)
7797 CFLAGSFORSHARED='$(CCSHARED)'
7798 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7801$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007802
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007803# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7804# library (with --enable-shared).
7805# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007806# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7807# if it is not required, since it creates a dependency of the shared library
7808# to LIBS. This, in turn, means that applications linking the shared libpython
7809# don't need to link LIBS explicitly. The default should be only changed
7810# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007811
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7813$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007814case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007815 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007816 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007817esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7819$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007820
7821
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7824$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007825if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007826 $as_echo_n "(cached) " >&6
7827else
7828 ac_check_lib_save_LIBS=$LIBS
7829LIBS="-lsendfile $LIBS"
7830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831/* end confdefs.h. */
7832
7833/* Override any GCC internal prototype to avoid an error.
7834 Use char because int might match the return type of a GCC
7835 builtin and then its argument prototype would still apply. */
7836#ifdef __cplusplus
7837extern "C"
7838#endif
7839char sendfile ();
7840int
7841main ()
7842{
7843return sendfile ();
7844 ;
7845 return 0;
7846}
7847_ACEOF
7848if ac_fn_c_try_link "$LINENO"; then :
7849 ac_cv_lib_sendfile_sendfile=yes
7850else
7851 ac_cv_lib_sendfile_sendfile=no
7852fi
7853rm -f core conftest.err conftest.$ac_objext \
7854 conftest$ac_exeext conftest.$ac_ext
7855LIBS=$ac_check_lib_save_LIBS
7856fi
7857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7858$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007859if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007860 cat >>confdefs.h <<_ACEOF
7861#define HAVE_LIBSENDFILE 1
7862_ACEOF
7863
7864 LIBS="-lsendfile $LIBS"
7865
7866fi
7867
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7869$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007870if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007872else
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007874LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878/* Override any GCC internal prototype to avoid an error.
7879 Use char because int might match the return type of a GCC
7880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007881#ifdef __cplusplus
7882extern "C"
7883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007884char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ;
7890 return 0;
7891}
7892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898rm -f core conftest.err conftest.$ac_objext \
7899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7903$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007904if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 cat >>confdefs.h <<_ACEOF
7906#define HAVE_LIBDL 1
7907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007908
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007909 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007911fi
7912 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7914$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007915if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007917else
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007919LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923/* Override any GCC internal prototype to avoid an error.
7924 Use char because int might match the return type of a GCC
7925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926#ifdef __cplusplus
7927extern "C"
7928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007929char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ;
7935 return 0;
7936}
7937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007940else
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943rm -f core conftest.err conftest.$ac_objext \
7944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007945LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7948$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007949if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 cat >>confdefs.h <<_ACEOF
7951#define HAVE_LIBDLD 1
7952_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007954 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007956fi
7957 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007958
Georg Brandlb1441c72009-01-03 22:33:39 +00007959# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007960if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7962$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007963if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007964 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007966 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970/* Override any GCC internal prototype to avoid an error.
7971 Use char because int might match the return type of a GCC
7972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973#ifdef __cplusplus
7974extern "C"
7975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007976char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ;
7982 return 0;
7983}
7984_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985for ac_lib in '' pthread rt posix4; do
7986 if test -z "$ac_lib"; then
7987 ac_res="none required"
7988 else
7989 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995rm -f core conftest.err conftest.$ac_objext \
7996 conftest$ac_exeext
Victor Stinnerd169fdc2011-09-08 00:56:17 +02007997 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000done
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008001if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003else
8004 ac_cv_search_sem_init=no
8005fi
8006rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008007LIBS=$ac_func_search_save_LIBS
8008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8010$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008012if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008014
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008015fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008016 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008017 # posix4 on Solaris 2.6
8018 # pthread (first!) on Linux
8019fi
8020
Martin v. Löwis19d17342003-06-14 21:03:05 +00008021# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8023$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008024if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008026else
8027 ac_check_lib_save_LIBS=$LIBS
8028LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032/* Override any GCC internal prototype to avoid an error.
8033 Use char because int might match the return type of a GCC
8034 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008035#ifdef __cplusplus
8036extern "C"
8037#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008038char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008039int
8040main ()
8041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008043 ;
8044 return 0;
8045}
8046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048 ac_cv_lib_intl_textdomain=yes
8049else
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052rm -f core conftest.err conftest.$ac_objext \
8053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008054LIBS=$ac_check_lib_save_LIBS
8055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8057$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008058if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008059
Matthias Kloseb9621712010-04-24 17:59:49 +00008060$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061
Brett Cannonc6d936e2009-06-07 20:09:53 +00008062 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008063fi
8064
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008065
8066# checks for system dependent C++ extensions support
8067case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8069$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008071/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008072
Georg Brandl59e87bd2011-02-15 19:48:59 +00008073 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008074int
8075main ()
8076{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008077loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ;
8079 return 0;
8080}
Matthias Kloseb159a552010-04-25 21:00:44 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008083if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008084
Matthias Kloseb159a552010-04-25 21:00:44 +00008085
Matthias Kloseb9621712010-04-24 17:59:49 +00008086$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
Matthias Kloseb159a552010-04-25 21:00:44 +00008088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008089$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008090
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008091else
Matthias Kloseb159a552010-04-25 21:00:44 +00008092
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008094$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008095
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008097rm -f core conftest.err conftest.$ac_objext \
8098 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008099 *) ;;
8100esac
8101
Guido van Rossum70c7f481998-03-26 18:44:10 +00008102# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8104$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008105if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008107else
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008109LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113/* Override any GCC internal prototype to avoid an error.
8114 Use char because int might match the return type of a GCC
8115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008116#ifdef __cplusplus
8117extern "C"
8118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008119char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008120int
8121main ()
8122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ;
8125 return 0;
8126}
8127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133rm -f core conftest.err conftest.$ac_objext \
8134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008135LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8138$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008139if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008140 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008141fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008142 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8144$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008145if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008147else
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008149LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153/* Override any GCC internal prototype to avoid an error.
8154 Use char because int might match the return type of a GCC
8155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008156#ifdef __cplusplus
8157extern "C"
8158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008159char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008160int
8161main ()
8162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008164 ;
8165 return 0;
8166}
8167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173rm -f core conftest.err conftest.$ac_objext \
8174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8178$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008179if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008180 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008181fi
8182 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8185$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008188if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8191$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008192LIBS="$withval $LIBS"
8193
8194else
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8196$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197fi
8198
Guido van Rossum7f43da71994-08-01 12:15:30 +00008199
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008200if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8202set dummy ${ac_tool_prefix}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_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 $PKG_CONFIG in
8209 [\\/]* | ?:[\\/]*)
8210 ac_cv_path_PKG_CONFIG="$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_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
8231PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8232if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8234$as_echo "$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
8241fi
8242if test -z "$ac_cv_path_PKG_CONFIG"; then
8243 ac_pt_PKG_CONFIG=$PKG_CONFIG
8244 # Extract the first word of "pkg-config", so it can be a program name with args.
8245set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8247$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008248if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008250else
8251 case $ac_pt_PKG_CONFIG in
8252 [\\/]* | ?:[\\/]*)
8253 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8254 ;;
8255 *)
8256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8257for as_dir in $PATH
8258do
8259 IFS=$as_save_IFS
8260 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008262 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8263 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008265 break 2
8266 fi
8267done
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008269IFS=$as_save_IFS
8270
8271 ;;
8272esac
8273fi
8274ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8275if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8277$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8280$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008281fi
8282
8283 if test "x$ac_pt_PKG_CONFIG" = x; then
8284 PKG_CONFIG=""
8285 else
8286 case $cross_compiling:$ac_tool_warned in
8287yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008290ac_tool_warned=yes ;;
8291esac
8292 PKG_CONFIG=$ac_pt_PKG_CONFIG
8293 fi
8294else
8295 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8296fi
8297
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008298
8299# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8301$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008302
8303# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008304if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008305 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008306else
8307 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008308fi
8309
8310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8312$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008313
8314# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8316$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008317
8318# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008319if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008320 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008321else
8322 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008323fi
8324
8325
8326if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008327 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8328else
8329 LIBFFI_INCLUDEDIR=""
8330fi
8331
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8334$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008335
Benjamin Peterson076ed002010-10-31 17:11:02 +00008336# Check for support for loadable sqlite extensions
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8338$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8339# Check whether --enable-loadable-sqlite-extensions was given.
8340if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8341 enableval=$enable_loadable_sqlite_extensions;
8342else
8343 enable_loadable_sqlite_extensions="no"
8344fi
8345
8346
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8348$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8349
Matthias Klose55708cc2009-04-30 08:06:49 +00008350# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8352$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008353
8354# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008356 withval=$with_dbmliborder;
8357if test x$with_dbmliborder = xyes
8358then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008359as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008360else
8361 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8362 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8363 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008364 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008365 fi
8366 done
8367fi
8368fi
8369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8371$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008372
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008373# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008374
8375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8377$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008380if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381 withval=$with_signal_module;
8382fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008383
8384
8385if test -z "$with_signal_module"
8386then with_signal_module="yes"
8387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8389$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008390
8391if test "${with_signal_module}" = "yes"; then
8392 USE_SIGNAL_MODULE=""
8393 SIGNAL_OBJS=""
8394else
8395 USE_SIGNAL_MODULE="#"
8396 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8397fi
8398
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008399# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008400
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008401USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405# Templates for things AC_DEFINEd more than once.
8406# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008407
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8411$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415 withval=$with_threads;
8416fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008417
8418
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008419# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008422if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423 withval=$with_thread; with_threads=$with_thread
8424fi
8425
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008426
8427if test -z "$with_threads"
8428then with_threads="yes"
8429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8431$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008432
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008433
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008434if test "$with_threads" = "no"
8435then
8436 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008437elif test "$ac_cv_pthread_is_default" = yes
8438then
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008440
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008441 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008443
8444 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008446elif test "$ac_cv_kpthread" = "yes"
8447then
8448 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008449 if test "$ac_cv_cxx_thread" = "yes"; then
8450 CXX="$CXX -Kpthread"
8451 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008453
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008454 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008455 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008456elif test "$ac_cv_kthread" = "yes"
8457then
8458 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008459 if test "$ac_cv_cxx_thread" = "yes"; then
8460 CXX="$CXX -Kthread"
8461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008463
8464 posix_threads=yes
8465 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008466elif test "$ac_cv_pthread" = "yes"
8467then
8468 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008469 if test "$ac_cv_cxx_thread" = "yes"; then
8470 CXX="$CXX -pthread"
8471 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008473
8474 posix_threads=yes
8475 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008476else
8477 if test ! -z "$with_threads" -a -d "$with_threads"
8478 then LDFLAGS="$LDFLAGS -L$with_threads"
8479 fi
8480 if test ! -z "$withval" -a -d "$withval"
8481 then LDFLAGS="$LDFLAGS -L$withval"
8482 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008483
8484 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008485 # define _POSIX_THREADS in unistd.h. Some apparently don't
8486 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8488$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008491
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008492#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008493#ifdef _POSIX_THREADS
8494yes
8495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008496
8497_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008500 unistd_defines_pthreads=yes
8501else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008502 unistd_defines_pthreads=no
8503fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008504rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008505
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8507$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008510
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008511 # Just looking for pthread_create in libpthread is not enough:
8512 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8513 # So we really have to include pthread.h, and then link.
8514 _libs=$LIBS
8515 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8517$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008520#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008521
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008522void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008523int
8524main ()
8525{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008526
8527pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ;
8529 return 0;
8530}
8531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008533
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8535$as_echo "yes" >&6; }
8536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008537
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008538 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008539 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008540else
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008542 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008544if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008546
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008547 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008548 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008549else
Guido van Rossumad678af1998-10-02 14:42:15 +00008550
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8552$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008553if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008555else
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008557LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561/* Override any GCC internal prototype to avoid an error.
8562 Use char because int might match the return type of a GCC
8563 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008564#ifdef __cplusplus
8565extern "C"
8566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008567char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008568int
8569main ()
8570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ;
8573 return 0;
8574}
8575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008576if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581rm -f core conftest.err conftest.$ac_objext \
8582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8586$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008587if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008589
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008590 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008591 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008592 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008593else
Greg Steinadf63d62000-07-05 10:38:09 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8596$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008597if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008599else
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008601LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605/* Override any GCC internal prototype to avoid an error.
8606 Use char because int might match the return type of a GCC
8607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608#ifdef __cplusplus
8609extern "C"
8610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008611char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008612int
8613main ()
8614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ;
8617 return 0;
8618}
8619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625rm -f core conftest.err conftest.$ac_objext \
8626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008627LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8630$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008631if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008633
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008634 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008635 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008636 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008637else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008638
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8640$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008641if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008643else
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008645LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649/* Override any GCC internal prototype to avoid an error.
8650 Use char because int might match the return type of a GCC
8651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652#ifdef __cplusplus
8653extern "C"
8654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008655char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008656int
8657main ()
8658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ;
8661 return 0;
8662}
8663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669rm -f core conftest.err conftest.$ac_objext \
8670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8674$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008675if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008677
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008678 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008679 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008680 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008681else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008682
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8684$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008685if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687else
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008689LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693/* Override any GCC internal prototype to avoid an error.
8694 Use char because int might match the return type of a GCC
8695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008696#ifdef __cplusplus
8697extern "C"
8698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008699char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700int
8701main ()
8702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ;
8705 return 0;
8706}
8707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713rm -f core conftest.err conftest.$ac_objext \
8714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008715LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8718$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008719if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008723 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008724 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008725else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008726
Martin v. Löwis130fb172001-07-19 11:00:41 +00008727 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008728fi
8729
Guido van Rossum627b2d71993-12-24 10:39:16 +00008730
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008731fi
8732
Guido van Rossum0be3e491997-05-22 20:33:33 +00008733fi
8734
Guido van Rossum49545951997-12-02 19:28:29 +00008735fi
8736
Guido van Rossumb93a8621998-05-07 13:27:32 +00008737fi
8738
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740rm -f core conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8744$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008745if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747else
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008749LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753/* Override any GCC internal prototype to avoid an error.
8754 Use char because int might match the return type of a GCC
8755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008756#ifdef __cplusplus
8757extern "C"
8758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008759char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008760int
8761main ()
8762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ;
8765 return 0;
8766}
8767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773rm -f core conftest.err conftest.$ac_objext \
8774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008775LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8778$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008779if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781
Martin v. Löwis130fb172001-07-19 11:00:41 +00008782 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008783 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008784 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008785fi
8786
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008787
Neal Norwitza978ab02002-11-02 16:58:05 +00008788 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8790$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008791if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793else
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008795LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799/* Override any GCC internal prototype to avoid an error.
8800 Use char because int might match the return type of a GCC
8801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008802#ifdef __cplusplus
8803extern "C"
8804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008805char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008806int
8807main ()
8808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ;
8811 return 0;
8812}
8813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008816else
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008821LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8824$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008825if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008827
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008828 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008829 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008830 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008831fi
8832
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008833 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008835
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008836if test "$posix_threads" = "yes"; then
8837 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840
8841 fi
8842
8843 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8844 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008845 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008846$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008847
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008848 ;;
8849 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008850$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008851
8852 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008853 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008854$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008855
8856 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008857 esac
8858
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8860$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008861 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008865 ac_cv_pthread_system_supported=no
8866else
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008869#include <pthread.h>
8870 void *foo(void *parm) {
8871 return NULL;
8872 }
8873 main() {
8874 pthread_attr_t attr;
8875 pthread_t id;
8876 if (pthread_attr_init(&attr)) exit(-1);
8877 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8878 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8879 exit(0);
8880 }
8881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 ac_cv_pthread_system_supported=yes
8884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891
Guido van Rossum627b2d71993-12-24 10:39:16 +00008892fi
8893
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8895$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008896 if test "$ac_cv_pthread_system_supported" = "yes"; then
8897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899
8900 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 for ac_func in pthread_sigmask
8902do :
8903 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02008904if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008905 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008906#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008907_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008908 case $ac_sys_system in
8909 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008910
Matthias Kloseb9621712010-04-24 17:59:49 +00008911$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008912
8913 ;;
8914 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008915fi
8916done
8917
8918fi
8919
8920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8924$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008926if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008928 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931 ipv6=no
8932 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8934$as_echo "yes" >&6; }
8935 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936
8937 ipv6=yes
8938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940else
Martin v. Löwis11437992002-04-12 09:54:03 +00008941
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008943
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8945$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946 ipv6=no
8947
8948else
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008950/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951 /* AF_INET6 available check */
8952#include <sys/types.h>
8953#include <sys/socket.h>
8954main()
8955{
8956 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8957 exit(1);
8958 else
8959 exit(0);
8960}
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008963if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008964
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8966$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969else
Matthias Kloseb159a552010-04-25 21:00:44 +00008970
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978fi
8979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008981if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8983$as_echo_n "checking if RFC2553 API is available... " >&6; }
8984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008986
8987 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008988#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008989int
8990main ()
8991{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008992struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008993 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 ;
8995 return 0;
8996}
Matthias Kloseb159a552010-04-25 21:00:44 +00008997
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008999if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009000
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009002$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009003 ipv6=yes
9004
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009005else
Matthias Kloseb159a552010-04-25 21:00:44 +00009006
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009008$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009009 ipv6=no
9010
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009013fi
9014
9015if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009017
9018fi
9019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020fi
9021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022
9023ipv6type=unknown
9024ipv6lib=none
9025ipv6trylibc=no
9026
9027if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9029$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009030 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9031 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032 case $i in
9033 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037#include <netinet/in.h>
9038#ifdef IPV6_INRIA_VERSION
9039yes
9040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009044 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009046rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047
9048 ;;
9049 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053#include <netinet/in.h>
9054#ifdef __KAME__
9055yes
9056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060 ipv6type=$i;
9061 ipv6lib=inet6
9062 ipv6libdir=/usr/local/v6/lib
9063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009065rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066
9067 ;;
9068 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009070/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009071
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072#include <features.h>
9073#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9074yes
9075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009076_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079 ipv6type=$i;
9080 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009082rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083
9084 ;;
9085 linux-inet6)
9086 if test -d /usr/inet6; then
9087 ipv6type=$i
9088 ipv6lib=inet6
9089 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009090 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 fi
9092 ;;
9093 solaris)
9094 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009095 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096 ipv6type=$i
9097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098 fi
9099 fi
9100 ;;
9101 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009103/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009104
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105#include <sys/param.h>
9106#ifdef _TOSHIBA_INET6
9107yes
9108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009109_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112 ipv6type=$i;
9113 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009114 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009116rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117
9118 ;;
9119 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009122
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123#include </usr/local/v6/include/sys/v6config.h>
9124#ifdef __V6D__
9125yes
9126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130 ipv6type=$i;
9131 ipv6lib=v6;
9132 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009133 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009135rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136
9137 ;;
9138 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009140/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142#include <sys/param.h>
9143#ifdef _ZETA_MINAMI_INET6
9144yes
9145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009146_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009149 ipv6type=$i;
9150 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009151 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009152fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009153rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154
9155 ;;
9156 esac
9157 if test "$ipv6type" != "unknown"; then
9158 break
9159 fi
9160 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9162$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163fi
9164
9165if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9166 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9167 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9168 echo "using lib$ipv6lib"
9169 else
9170 if test $ipv6trylibc = "yes"; then
9171 echo "using libc"
9172 else
9173 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9174 echo "You need to fetch lib$ipv6lib.a from appropriate"
9175 echo 'ipv6 kit and compile beforehand.'
9176 exit 1
9177 fi
9178 fi
9179fi
9180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9182$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009184/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009185
9186 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009187int
9188main ()
9189{
9190FSIORefNum fRef = 0
9191 ;
9192 return 0;
9193}
Matthias Kloseb159a552010-04-25 21:00:44 +00009194
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009196if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009197
Matthias Kloseb159a552010-04-25 21:00:44 +00009198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9202$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009203
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009204else
Matthias Kloseb159a552010-04-25 21:00:44 +00009205
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009208
9209fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9211
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009212# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9214$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009217if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218 withval=$with_doc_strings;
9219fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009220
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009221
9222if test -z "$with_doc_strings"
9223then with_doc_strings="yes"
9224fi
9225if test "$with_doc_strings" != "no"
9226then
9227
Matthias Kloseb9621712010-04-24 17:59:49 +00009228$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009229
9230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9232$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009233
Antoine Pitrou042b1282010-08-13 21:15:58 +00009234# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9236$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009239if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009241if test "$withval" != no
9242then
9243
Matthias Kloseb9621712010-04-24 17:59:49 +00009244$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009245
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9247$as_echo "yes" >&6; }
9248else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009250fi
9251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254fi
9255
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009256
9257# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9259$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009262if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 withval=$with_pymalloc;
9264fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009265
Neil Schemenauera35c6882001-02-27 04:45:05 +00009266
Neil Schemenauer16c22972002-03-22 15:34:49 +00009267if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009268then
9269 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009270 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009271fi
9272if test "$with_pymalloc" != "no"
9273then
Martin v. Löwis11437992002-04-12 09:54:03 +00009274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009276
9277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9279$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009280
Benjamin Peterson05159c42009-12-03 03:01:27 +00009281# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9283$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009284
9285# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009286if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009287 withval=$with_valgrind;
9288else
9289 with_valgrind=no
9290fi
9291
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9293$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009294if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 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 +02009296if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009299
9300else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009301 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009302
9303fi
9304
9305
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009306 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009307fi
9308
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009309# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009310
Guido van Rossum98935bf2001-09-05 19:13:16 +00009311DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009312
Guido van Rossume97ee181999-12-20 21:27:22 +00009313# the dlopen() function means we might want to use dynload_shlib.o. some
9314# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009315for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009316do :
9317 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009318if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009320#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009321_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009322
Guido van Rossume97ee181999-12-20 21:27:22 +00009323fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009324done
Guido van Rossume97ee181999-12-20 21:27:22 +00009325
Michael W. Hudson54241132001-12-07 15:38:26 +00009326
Guido van Rossume97ee181999-12-20 21:27:22 +00009327# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9328# loading of modules.
9329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9331$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009332if test -z "$DYNLOADFILE"
9333then
9334 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009335 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9336 if test "$ac_cv_func_dlopen" = yes
9337 then DYNLOADFILE="dynload_shlib.o"
9338 else DYNLOADFILE="dynload_aix.o"
9339 fi
9340 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009341 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009342 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9343 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009344 *)
9345 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9346 # out any dynamic loading
9347 if test "$ac_cv_func_dlopen" = yes
9348 then DYNLOADFILE="dynload_shlib.o"
9349 else DYNLOADFILE="dynload_stub.o"
9350 fi
9351 ;;
9352 esac
9353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9355$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009356if test "$DYNLOADFILE" != "dynload_stub.o"
9357then
Martin v. Löwis11437992002-04-12 09:54:03 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009360
9361fi
9362
Neil Schemenauer4e425612001-06-19 15:44:15 +00009363# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9364
Michael W. Hudson54241132001-12-07 15:38:26 +00009365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9367$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009368if test -z "$MACHDEP_OBJS"
9369then
Jack Jansene578a632001-08-15 01:27:14 +00009370 MACHDEP_OBJS=$extra_machdep_objs
9371else
9372 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9375$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009376
Guido van Rossum627b2d71993-12-24 10:39:16 +00009377# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009378for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009379 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009380 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009381 futimens futimes gai_strerror \
9382 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009383 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009384 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009385 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009386 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009387 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009388 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009389 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009390 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009391 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009392 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9393 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009394 sigaction sigaltstack siginterrupt sigpending sigrelse \
9395 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009396 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009397 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9398 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009399do :
9400 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9401ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009402if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009404#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009405_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009407fi
9408done
9409
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411# For some functions, having a definition is not sufficient, since
9412# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9414$as_echo_n "checking for chroot... " >&6; }
9415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009416/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418int
9419main ()
9420{
9421void *x=chroot
9422 ;
9423 return 0;
9424}
9425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429
Matthias Kloseb159a552010-04-25 21:00:44 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009435
9436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9439$as_echo_n "checking for link... " >&6; }
9440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009441/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009442#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443int
9444main ()
9445{
9446void *x=link
9447 ;
9448 return 0;
9449}
9450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454
Matthias Kloseb159a552010-04-25 21:00:44 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009457else
Matthias Kloseb9621712010-04-24 17:59:49 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009460
9461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9464$as_echo_n "checking for symlink... " >&6; }
9465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009466/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009467#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009468int
9469main ()
9470{
9471void *x=symlink
9472 ;
9473 return 0;
9474}
9475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009477
Matthias Kloseb9621712010-04-24 17:59:49 +00009478$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009479
Matthias Kloseb159a552010-04-25 21:00:44 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009482else
Matthias Kloseb9621712010-04-24 17:59:49 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009485
9486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9489$as_echo_n "checking for fchdir... " >&6; }
9490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492#include <unistd.h>
9493int
9494main ()
9495{
9496void *x=fchdir
9497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009502
Matthias Kloseb9621712010-04-24 17:59:49 +00009503$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009504
Matthias Kloseb159a552010-04-25 21:00:44 +00009505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009507else
Matthias Kloseb9621712010-04-24 17:59:49 +00009508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9509$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009510
9511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9514$as_echo_n "checking for fsync... " >&6; }
9515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009517#include <unistd.h>
9518int
9519main ()
9520{
9521void *x=fsync
9522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009529
Matthias Kloseb159a552010-04-25 21:00:44 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009531$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009535
9536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9539$as_echo_n "checking for fdatasync... " >&6; }
9540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009541/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009542#include <unistd.h>
9543int
9544main ()
9545{
9546void *x=fdatasync
9547 ;
9548 return 0;
9549}
9550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009552
Matthias Kloseb9621712010-04-24 17:59:49 +00009553$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009554
Matthias Kloseb159a552010-04-25 21:00:44 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009556$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009557else
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9559$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009560
9561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9564$as_echo_n "checking for epoll... " >&6; }
9565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009566/* end confdefs.h. */
9567#include <sys/epoll.h>
9568int
9569main ()
9570{
9571void *x=epoll_create
9572 ;
9573 return 0;
9574}
9575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009579
Matthias Kloseb159a552010-04-25 21:00:44 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009582else
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009585
9586fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9589$as_echo_n "checking for kqueue... " >&6; }
9590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009591/* end confdefs.h. */
9592
9593#include <sys/types.h>
9594#include <sys/event.h>
9595
9596int
9597main ()
9598{
9599int x=kqueue()
9600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009607
Matthias Kloseb159a552010-04-25 21:00:44 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009610else
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009613
9614fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009616# On some systems (eg. FreeBSD 5), we would find a definition of the
9617# functions ctermid_r, setgroups in the library, but no prototype
9618# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9619# address to avoid compiler warnings and potential miscompilations
9620# because of the missing prototypes.
9621
Matthias Kloseb9621712010-04-24 17:59:49 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9623$as_echo_n "checking for ctermid_r... " >&6; }
9624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626
Martin v. Löwisd5843682002-11-21 20:41:28 +00009627#include <stdio.h>
9628
Martin v. Löwisd5843682002-11-21 20:41:28 +00009629int
9630main ()
9631{
9632void* p = ctermid_r
9633 ;
9634 return 0;
9635}
9636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009638
Matthias Kloseb9621712010-04-24 17:59:49 +00009639$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009640
Matthias Kloseb159a552010-04-25 21:00:44 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009642$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009643else
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009646
9647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9649
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9651$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009652if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009653 $as_echo_n "(cached) " >&6
9654else
9655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009658int
9659main ()
9660{
9661void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009662
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009668 ac_cv_flock_decl=yes
9669else
9670 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009671
9672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009674
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009675fi
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9677$as_echo "$ac_cv_flock_decl" >&6; }
9678if test "x${ac_cv_flock_decl}" = xyes; then
9679 for ac_func in flock
9680do :
9681 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009682if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009683 cat >>confdefs.h <<_ACEOF
9684#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009685_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009686
Antoine Pitroua3000072010-09-07 14:52:42 +00009687else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009689$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009690if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009691 $as_echo_n "(cached) " >&6
9692else
9693 ac_check_lib_save_LIBS=$LIBS
9694LIBS="-lbsd $LIBS"
9695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9696/* end confdefs.h. */
9697
9698/* Override any GCC internal prototype to avoid an error.
9699 Use char because int might match the return type of a GCC
9700 builtin and then its argument prototype would still apply. */
9701#ifdef __cplusplus
9702extern "C"
9703#endif
9704char flock ();
9705int
9706main ()
9707{
9708return flock ();
9709 ;
9710 return 0;
9711}
9712_ACEOF
9713if ac_fn_c_try_link "$LINENO"; then :
9714 ac_cv_lib_bsd_flock=yes
9715else
9716 ac_cv_lib_bsd_flock=no
9717fi
9718rm -f core conftest.err conftest.$ac_objext \
9719 conftest$ac_exeext conftest.$ac_ext
9720LIBS=$ac_check_lib_save_LIBS
9721fi
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9723$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009724if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009725 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009726
9727
9728$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9729
9730
9731fi
9732
9733
9734fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009735done
9736
Antoine Pitroua3000072010-09-07 14:52:42 +00009737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9740$as_echo_n "checking for getpagesize... " >&6; }
9741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009744#include <unistd.h>
9745
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009746int
9747main ()
9748{
9749void* p = getpagesize
9750 ;
9751 return 0;
9752}
9753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009754if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009755
Matthias Kloseb9621712010-04-24 17:59:49 +00009756$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009757
Matthias Kloseb159a552010-04-25 21:00:44 +00009758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009759$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009763
9764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009766
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9768$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770/* end confdefs.h. */
9771
9772#include <malloc.h>
9773
9774int
9775main ()
9776{
9777mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9778 ;
9779 return 0;
9780}
9781_ACEOF
9782if ac_fn_c_try_compile "$LINENO"; then :
9783
9784$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9785
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9787$as_echo "yes" >&6; }
9788else
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791
9792fi
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009795for ac_prog in true
9796do
9797 # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009801if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009803else
9804 if test -n "$TRUE"; then
9805 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9806else
9807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808for as_dir in $PATH
9809do
9810 IFS=$as_save_IFS
9811 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 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 +00009814 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $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 +00009816 break 2
9817 fi
9818done
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009821
9822fi
9823fi
9824TRUE=$ac_cv_prog_TRUE
9825if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9827$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828else
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009831fi
9832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009834 test -n "$TRUE" && break
9835done
9836test -n "$TRUE" || TRUE="/bin/true"
9837
9838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9840$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009841if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843else
9844 ac_check_lib_save_LIBS=$LIBS
9845LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009847/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849/* Override any GCC internal prototype to avoid an error.
9850 Use char because int might match the return type of a GCC
9851 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009852#ifdef __cplusplus
9853extern "C"
9854#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856int
9857main ()
9858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860 ;
9861 return 0;
9862}
9863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009865 ac_cv_lib_c_inet_aton=yes
9866else
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869rm -f core conftest.err conftest.$ac_objext \
9870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009871LIBS=$ac_check_lib_save_LIBS
9872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9874$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009875if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009877else
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9879$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009880if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882else
9883 ac_check_lib_save_LIBS=$LIBS
9884LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888/* Override any GCC internal prototype to avoid an error.
9889 Use char because int might match the return type of a GCC
9890 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009891#ifdef __cplusplus
9892extern "C"
9893#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009894char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009895int
9896main ()
9897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009899 ;
9900 return 0;
9901}
9902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009904 ac_cv_lib_resolv_inet_aton=yes
9905else
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908rm -f core conftest.err conftest.$ac_objext \
9909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009910LIBS=$ac_check_lib_save_LIBS
9911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9913$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009914if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009915 cat >>confdefs.h <<_ACEOF
9916#define HAVE_LIBRESOLV 1
9917_ACEOF
9918
9919 LIBS="-lresolv $LIBS"
9920
9921fi
9922
9923
9924fi
9925
9926
Christian Heimesd0764e22007-12-04 15:00:33 +00009927# On Tru64, chflags seems to be present, but calling it will
9928# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9930$as_echo_n "checking for chflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009931if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009935 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009936else
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009938/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009939
Christian Heimesd0764e22007-12-04 15:00:33 +00009940#include <sys/stat.h>
9941#include <unistd.h>
9942int main(int argc, char*argv[])
9943{
9944 if(chflags(argv[0], 0) != 0)
9945 return 1;
9946 return 0;
9947}
Ned Deily3eb67d52011-06-28 00:00:28 -07009948
Christian Heimesd0764e22007-12-04 15:00:33 +00009949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009950if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009951 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009952else
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009957fi
9958
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9962$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009963if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009965if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009966 ac_cv_have_chflags="yes"
9967else
9968 ac_cv_have_chflags="no"
9969fi
9970
9971fi
9972if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009975
9976fi
9977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9979$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +02009980if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009982else
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009984 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009985else
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009987/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009988
Christian Heimesd0764e22007-12-04 15:00:33 +00009989#include <sys/stat.h>
9990#include <unistd.h>
9991int main(int argc, char*argv[])
9992{
9993 if(lchflags(argv[0], 0) != 0)
9994 return 1;
9995 return 0;
9996}
Ned Deily3eb67d52011-06-28 00:00:28 -07009997
Christian Heimesd0764e22007-12-04 15:00:33 +00009998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009999if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010000 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010001else
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010006fi
10007
10008
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10011$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010012if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010014if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010015 ac_cv_have_lchflags="yes"
10016else
10017 ac_cv_have_lchflags="no"
10018fi
10019
10020fi
10021if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010024
10025fi
10026
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010027case $ac_sys_system/$ac_sys_release in
10028Darwin/*)
10029 _CUR_CFLAGS="${CFLAGS}"
10030 _CUR_LDFLAGS="${LDFLAGS}"
10031 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10032 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10033 ;;
10034esac
10035
Matthias Kloseb9621712010-04-24 17:59:49 +000010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10037$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010038if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010040else
10041 ac_check_lib_save_LIBS=$LIBS
10042LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010044/* end confdefs.h. */
10045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046/* Override any GCC internal prototype to avoid an error.
10047 Use char because int might match the return type of a GCC
10048 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010049#ifdef __cplusplus
10050extern "C"
10051#endif
10052char inflateCopy ();
10053int
10054main ()
10055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010057 ;
10058 return 0;
10059}
10060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010062 ac_cv_lib_z_inflateCopy=yes
10063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010068LIBS=$ac_check_lib_save_LIBS
10069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10071$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010072if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010075
10076fi
10077
10078
10079case $ac_sys_system/$ac_sys_release in
10080Darwin/*)
10081 CFLAGS="${_CUR_CFLAGS}"
10082 LDFLAGS="${_CUR_LDFLAGS}"
10083 ;;
10084esac
10085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10087$as_echo_n "checking for hstrerror... " >&6; }
10088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010089/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
Martin v. Löwise9416172003-05-03 10:12:45 +000010091#include <netdb.h>
10092
Martin v. Löwise9416172003-05-03 10:12:45 +000010093int
10094main ()
10095{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010096void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010097 ;
10098 return 0;
10099}
10100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010104
Matthias Kloseb159a552010-04-25 21:00:44 +000010105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010106$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010107else
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10109$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010110
10111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112rm -f core conftest.err conftest.$ac_objext \
10113 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10116$as_echo_n "checking for inet_aton... " >&6; }
10117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010118/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010119
Martin v. Löwis86d66262006-02-17 08:40:11 +000010120#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010121#include <sys/socket.h>
10122#include <netinet/in.h>
10123#include <arpa/inet.h>
10124
Martin v. Löwise9416172003-05-03 10:12:45 +000010125int
10126main ()
10127{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010128void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010129 ;
10130 return 0;
10131}
10132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010136
Matthias Kloseb159a552010-04-25 21:00:44 +000010137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010138$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010139else
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010142
10143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010144rm -f core conftest.err conftest.$ac_objext \
10145 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10148$as_echo_n "checking for inet_pton... " >&6; }
10149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010151
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010152#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010153#include <sys/socket.h>
10154#include <netinet/in.h>
10155#include <arpa/inet.h>
10156
Martin v. Löwise9416172003-05-03 10:12:45 +000010157int
10158main ()
10159{
10160void* p = inet_pton
10161 ;
10162 return 0;
10163}
10164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010166
Matthias Kloseb9621712010-04-24 17:59:49 +000010167$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010168
Matthias Kloseb159a552010-04-25 21:00:44 +000010169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010170$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010174
10175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010177
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010178# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10180$as_echo_n "checking for setgroups... " >&6; }
10181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010183
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010184#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010185#ifdef HAVE_GRP_H
10186#include <grp.h>
10187#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010188
Martin v. Löwisd5843682002-11-21 20:41:28 +000010189int
10190main ()
10191{
10192void* p = setgroups
10193 ;
10194 return 0;
10195}
10196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010200
Matthias Kloseb159a552010-04-25 21:00:44 +000010201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010202$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010203else
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10205$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010206
10207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010210# check for openpty and forkpty
10211
10212for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010213do :
10214 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010215if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010217#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010218_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010220else
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10222$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010223if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010225else
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231/* Override any GCC internal prototype to avoid an error.
10232 Use char because int might match the return type of a GCC
10233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010234#ifdef __cplusplus
10235extern "C"
10236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010237char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010238int
10239main ()
10240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010248else
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251rm -f core conftest.err conftest.$ac_objext \
10252 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10256$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010257if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010259 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260else
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10262$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010263if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265else
10266 ac_check_lib_save_LIBS=$LIBS
10267LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269/* end confdefs.h. */
10270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271/* Override any GCC internal prototype to avoid an error.
10272 Use char because int might match the return type of a GCC
10273 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010274#ifdef __cplusplus
10275extern "C"
10276#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010277char openpty ();
10278int
10279main ()
10280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010282 ;
10283 return 0;
10284}
10285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287 ac_cv_lib_bsd_openpty=yes
10288else
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010291rm -f core conftest.err conftest.$ac_objext \
10292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010293LIBS=$ac_check_lib_save_LIBS
10294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10296$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010297if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010299 LIBS="$LIBS -lbsd"
10300fi
10301
10302
10303fi
10304
Fred Drake8cef4cf2000-06-28 16:40:38 +000010305
10306fi
10307done
10308
10309for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010310do :
10311 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010312if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010316
Fred Drake8cef4cf2000-06-28 16:40:38 +000010317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10319$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010320if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328/* Override any GCC internal prototype to avoid an error.
10329 Use char because int might match the return type of a GCC
10330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010334char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010335int
10336main ()
10337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ;
10340 return 0;
10341}
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348rm -f core conftest.err conftest.$ac_objext \
10349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010350LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10353$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010354if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010356 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357else
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10359$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010360if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362else
10363 ac_check_lib_save_LIBS=$LIBS
10364LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010366/* end confdefs.h. */
10367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010374char forkpty ();
10375int
10376main ()
10377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010384 ac_cv_lib_bsd_forkpty=yes
10385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010390LIBS=$ac_check_lib_save_LIBS
10391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10393$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010394if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010396 LIBS="$LIBS -lbsd"
10397fi
10398
10399
10400fi
10401
Fred Drake8cef4cf2000-06-28 16:40:38 +000010402
10403fi
10404done
10405
Jack Jansendd19cf82001-12-06 22:36:17 +000010406
Christian Heimesb186d002008-03-18 15:15:01 +000010407# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010408for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010409do :
10410 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010411if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010414_ACEOF
10415
10416fi
10417done
10418
10419
Michael W. Hudson54241132001-12-07 15:38:26 +000010420# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010422do :
10423 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10424ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010425if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010427#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010428_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010431done
10432
Michael W. Hudson54241132001-12-07 15:38:26 +000010433
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010434ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010435if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010436 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010437
Martin v. Löwis1142de32002-03-29 16:28:31 +000010438else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010440 *" dup2.$ac_objext "* ) ;;
10441 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010443esac
10444
Martin v. Löwis1142de32002-03-29 16:28:31 +000010445fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010446
10447ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010448if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010449 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10450
10451else
10452 case " $LIBOBJS " in
10453 *" getcwd.$ac_objext "* ) ;;
10454 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10455 ;;
10456esac
10457
10458fi
10459
10460ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010461if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010462 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10463
10464else
10465 case " $LIBOBJS " in
10466 *" strdup.$ac_objext "* ) ;;
10467 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10468 ;;
10469esac
10470
10471fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010472
10473
10474for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010475do :
10476 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010477if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010479#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010483#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010484int
10485main ()
10486{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010487getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ;
10489 return 0;
10490}
10491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010493
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010495
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010498
Guido van Rossum627b2d71993-12-24 10:39:16 +000010499fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010500done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010501
Jack Jansen150753c2003-03-29 22:07:47 +000010502for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010503do :
10504 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010505if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010506 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010511#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010512int
10513main ()
10514{
10515setpgrp(0,0);
10516 ;
10517 return 0;
10518}
10519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010521
Matthias Kloseb9621712010-04-24 17:59:49 +000010522$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010523
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010526
10527fi
10528done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010529
Thomas Wouters3a584202000-08-05 23:28:51 +000010530for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010531do :
10532 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010533if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010535#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010540int
10541main ()
10542{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010543gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ;
10545 return 0;
10546}
10547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548if ac_fn_c_try_compile "$LINENO"; then :
10549
Guido van Rossum627b2d71993-12-24 10:39:16 +000010550else
Skip Montanaro6dead952003-09-25 14:50:04 +000010551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Guido van Rossum627b2d71993-12-24 10:39:16 +000010555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010558fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010559done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010560
Michael W. Hudson54241132001-12-07 15:38:26 +000010561
Matthias Kloseb9621712010-04-24 17:59:49 +000010562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10563$as_echo_n "checking for major... " >&6; }
10564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010566
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010567#if defined(MAJOR_IN_MKDEV)
10568#include <sys/mkdev.h>
10569#elif defined(MAJOR_IN_SYSMACROS)
10570#include <sys/sysmacros.h>
10571#else
10572#include <sys/types.h>
10573#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010574
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010575int
10576main ()
10577{
10578
10579 makedev(major(0),minor(0));
10580
10581 ;
10582 return 0;
10583}
10584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010586
10587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010589
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10591$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010592
10593else
Skip Montanaro6dead952003-09-25 14:50:04 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010597
10598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010599rm -f core conftest.err conftest.$ac_objext \
10600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010601
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010602# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010603# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10605$as_echo_n "checking for getaddrinfo... " >&6; }
10606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010608
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010609#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010610#include <sys/socket.h>
10611#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010612#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613
Martin v. Löwis11437992002-04-12 09:54:03 +000010614int
10615main ()
10616{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010617getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010623 have_getaddrinfo=yes
10624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010627rm -f core conftest.err conftest.$ac_objext \
10628 conftest$ac_exeext conftest.$ac_ext
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10630$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631if test $have_getaddrinfo = yes
10632then
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10634$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010635 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010637else
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010639 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010643
10644#include <sys/types.h>
10645#include <netdb.h>
10646#include <string.h>
10647#include <sys/socket.h>
10648#include <netinet/in.h>
10649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010650int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010651{
10652 int passive, gaierr, inet4 = 0, inet6 = 0;
10653 struct addrinfo hints, *ai, *aitop;
10654 char straddr[INET6_ADDRSTRLEN], strport[16];
10655
10656 for (passive = 0; passive <= 1; passive++) {
10657 memset(&hints, 0, sizeof(hints));
10658 hints.ai_family = AF_UNSPEC;
10659 hints.ai_flags = passive ? AI_PASSIVE : 0;
10660 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010661 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010662 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10663 (void)gai_strerror(gaierr);
10664 goto bad;
10665 }
10666 for (ai = aitop; ai; ai = ai->ai_next) {
10667 if (ai->ai_addr == NULL ||
10668 ai->ai_addrlen == 0 ||
10669 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10670 straddr, sizeof(straddr), strport, sizeof(strport),
10671 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10672 goto bad;
10673 }
10674 switch (ai->ai_family) {
10675 case AF_INET:
10676 if (strcmp(strport, "54321") != 0) {
10677 goto bad;
10678 }
10679 if (passive) {
10680 if (strcmp(straddr, "0.0.0.0") != 0) {
10681 goto bad;
10682 }
10683 } else {
10684 if (strcmp(straddr, "127.0.0.1") != 0) {
10685 goto bad;
10686 }
10687 }
10688 inet4++;
10689 break;
10690 case AF_INET6:
10691 if (strcmp(strport, "54321") != 0) {
10692 goto bad;
10693 }
10694 if (passive) {
10695 if (strcmp(straddr, "::") != 0) {
10696 goto bad;
10697 }
10698 } else {
10699 if (strcmp(straddr, "::1") != 0) {
10700 goto bad;
10701 }
10702 }
10703 inet6++;
10704 break;
10705 case AF_UNSPEC:
10706 goto bad;
10707 break;
10708 default:
10709 /* another family support? */
10710 break;
10711 }
10712 }
10713 }
10714
10715 if (!(inet4 == 0 || inet4 == 2))
10716 goto bad;
10717 if (!(inet6 == 0 || inet6 == 2))
10718 goto bad;
10719
10720 if (aitop)
10721 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010722 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010723
10724 bad:
10725 if (aitop)
10726 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010727 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010728}
10729
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010732 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010740fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010741
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10745$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10746
Mark Dickinson2df5d282009-12-31 21:22:50 +000010747if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010748then
10749 if test $ipv6 = yes
10750 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751 echo 'Fatal: You must get working getaddrinfo() function.'
10752 echo ' or you can specify "--disable-ipv6"'.
10753 exit 1
10754 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010755else
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010758
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010759fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010760
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010761for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010762do :
10763 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010764if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010766#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010768
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010769fi
10770done
10771
Michael W. Hudson54241132001-12-07 15:38:26 +000010772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10775$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010776if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010778else
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010780/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781#include <sys/types.h>
10782#include <sys/time.h>
10783#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
10788if ((struct tm *) 0)
10789return 0;
10790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010795 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10802$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010803if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806
10807fi
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10810$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010811if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010816#include <sys/types.h>
10817#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010818
Martin v. Löwis11437992002-04-12 09:54:03 +000010819int
10820main ()
10821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822struct tm tm;
10823 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ;
10826 return 0;
10827}
10828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010829if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830 ac_cv_struct_tm=time.h
10831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10837$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010838if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010841
10842fi
10843
Matthias Kloseb9621712010-04-24 17:59:49 +000010844ac_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 +000010845#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010846
Matthias Kloseb9621712010-04-24 17:59:49 +000010847"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010848if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
10850cat >>confdefs.h <<_ACEOF
10851#define HAVE_STRUCT_TM_TM_ZONE 1
10852_ACEOF
10853
10854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010856
Martin v. Löwis11437992002-04-12 09:54:03 +000010857if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860
10861else
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10863"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010864if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866else
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010868fi
10869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872_ACEOF
10873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10875$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010876if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878else
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882#if !HAVE_DECL_TZNAME
10883extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
Martin v. Löwis11437992002-04-12 09:54:03 +000010886int
10887main ()
10888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 ;
10891 return 0;
10892}
10893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010894if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895 ac_cv_var_tzname=yes
10896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010899rm -f core conftest.err conftest.$ac_objext \
10900 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10903$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010904 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010907
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908 fi
10909fi
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911ac_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 +020010912if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
10914cat >>confdefs.h <<_ACEOF
10915#define HAVE_STRUCT_STAT_ST_RDEV 1
10916_ACEOF
10917
10918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010919fi
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921ac_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 +020010922if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010923
Martin v. Löwis11437992002-04-12 09:54:03 +000010924cat >>confdefs.h <<_ACEOF
10925#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10926_ACEOF
10927
10928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010929fi
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931ac_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 +020010932if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010933
10934cat >>confdefs.h <<_ACEOF
10935#define HAVE_STRUCT_STAT_ST_FLAGS 1
10936_ACEOF
10937
10938
10939fi
10940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941ac_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 +020010942if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010943
10944cat >>confdefs.h <<_ACEOF
10945#define HAVE_STRUCT_STAT_ST_GEN 1
10946_ACEOF
10947
10948
10949fi
10950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951ac_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 +020010952if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010953
10954cat >>confdefs.h <<_ACEOF
10955#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10956_ACEOF
10957
10958
10959fi
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961ac_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 +020010962if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010963
Martin v. Löwis11437992002-04-12 09:54:03 +000010964cat >>confdefs.h <<_ACEOF
10965#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10966_ACEOF
10967
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010970
10971else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010973 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10975 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010976esac
10977
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010978fi
10979
Michael W. Hudson54241132001-12-07 15:38:26 +000010980
Martin v. Löwis11437992002-04-12 09:54:03 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10983$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020010984if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986else
Matthias Kloseb159a552010-04-25 21:00:44 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010990#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010991int
10992main ()
10993{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010994return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 ;
10996 return 0;
10997}
10998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010999if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011000 ac_cv_header_time_altzone=yes
11001else
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006fi
11007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11009$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013
11014fi
11015
Guido van Rossumda88dad1995-01-26 00:46:29 +000011016was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11018$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011021
11022#include <sys/types.h>
11023#include <sys/select.h>
11024#include <sys/time.h>
11025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026int
11027main ()
11028{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029;
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 ;
11031 return 0;
11032}
11033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
11036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011039 was_it_defined=yes
11040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11044$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11047$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011048if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011053#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011054int
11055main ()
11056{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011063 ac_cv_struct_addrinfo=yes
11064else
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11068fi
11069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11071$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011072if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011075
11076fi
11077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11079$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011080if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011085
11086# include <sys/types.h>
11087# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011088int
11089main ()
11090{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011091struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 ;
11093 return 0;
11094}
11095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011097 ac_cv_struct_sockaddr_storage=yes
11098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11102fi
11103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11105$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011106if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011109
11110fi
11111
Guido van Rossum627b2d71993-12-24 10:39:16 +000011112# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11115$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011116if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011121$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
11125static int test_array [1 - 2 * !(((char) -1) < 0)];
11126test_array [0] = 0
11127
11128 ;
11129 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011130}
Martin v. Löwis11437992002-04-12 09:54:03 +000011131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011132if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011133 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11140$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011143
11144fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11147$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011148if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
11157/* FIXME: Include the comments suggested by Paul. */
11158#ifndef __cplusplus
11159 /* Ultrix mips cc rejects this. */
11160 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011161 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163 char const *const *pcpcc;
11164 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 /* NEC SVR4.0.2 mips cc rejects this. */
11166 struct point {int x, y;};
11167 static struct point const zero = {0,0};
11168 /* AIX XL C 1.02.0.0 rejects this.
11169 It does not let you subtract one const X* pointer from another in
11170 an arm of an if-expression whose if-part is not a constant
11171 expression */
11172 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175 ++pcpcc;
11176 ppc = (char**) pcpcc;
11177 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 { /* SCO 3.2v4 cc rejects this. */
11179 char *t;
11180 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 }
11185 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11186 int x[] = {25, 17};
11187 const int *foo = &x[0];
11188 ++foo;
11189 }
11190 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11191 typedef const int *iptr;
11192 iptr p = 0;
11193 ++p;
11194 }
11195 { /* AIX XL C 1.02.0.0 rejects this saying
11196 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11197 struct s { int j; const int *ap[3]; };
11198 struct s *b; b->j = 5;
11199 }
11200 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11201 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011206
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011209}
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212 ac_cv_c_const=yes
11213else
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11219$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223
11224fi
11225
Michael W. Hudson54241132001-12-07 15:38:26 +000011226
Guido van Rossumda88dad1995-01-26 00:46:29 +000011227works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11229$as_echo_n "checking for working volatile... " >&6; }
11230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011232
Martin v. Löwis11437992002-04-12 09:54:03 +000011233int
11234main ()
11235{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 ;
11238 return 0;
11239}
11240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011242 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011243else
Skip Montanaro6dead952003-09-25 14:50:04 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011246
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011247
Guido van Rossum627b2d71993-12-24 10:39:16 +000011248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11251$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011252
Guido van Rossumda88dad1995-01-26 00:46:29 +000011253works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11255$as_echo_n "checking for working signed char... " >&6; }
11256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011258
Martin v. Löwis11437992002-04-12 09:54:03 +000011259int
11260main ()
11261{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011262signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 ;
11264 return 0;
11265}
11266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011267if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011268 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011269else
Skip Montanaro6dead952003-09-25 14:50:04 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011273
Guido van Rossum7f43da71994-08-01 12:15:30 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11277$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011278
Guido van Rossumda88dad1995-01-26 00:46:29 +000011279have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11281$as_echo_n "checking for prototypes... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011284int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011285int
11286main ()
11287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011294
Matthias Kloseb9621712010-04-24 17:59:49 +000011295$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Matthias Kloseb159a552010-04-25 21:00:44 +000011297 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11301$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302
Guido van Rossumda88dad1995-01-26 00:46:29 +000011303works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11305$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011308
11309#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011310int foo(int x, ...) {
11311 va_list va;
11312 va_start(va, x);
11313 va_arg(va, int);
11314 va_arg(va, char *);
11315 va_arg(va, double);
11316 return 0;
11317}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Guido van Rossum90eea071996-08-30 20:58:57 +000011322return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
11329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011332 works=yes
11333
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11337$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338
Martin v. Löwisd6320502004-08-12 13:45:08 +000011339# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11341$as_echo_n "checking for socketpair... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011343/* end confdefs.h. */
11344
11345#include <sys/types.h>
11346#include <sys/socket.h>
11347
11348int
11349main ()
11350{
11351void *x=socketpair
11352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011359
Matthias Kloseb159a552010-04-25 21:00:44 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011362else
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011365
11366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011368
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011369# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11371$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011374#include <sys/types.h>
11375#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011376int
11377main ()
11378{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011379struct sockaddr x;
11380x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_compile "$LINENO"; then :
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11387$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011390
11391else
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011394
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011397
Guido van Rossumda88dad1995-01-26 00:46:29 +000011398va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11400$as_echo_n "checking whether va_list is an array... " >&6; }
11401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403
11404#ifdef HAVE_STDARG_PROTOTYPES
11405#include <stdarg.h>
11406#else
11407#include <varargs.h>
11408#endif
11409
Martin v. Löwis11437992002-04-12 09:54:03 +000011410int
11411main ()
11412{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
11419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011420else
Skip Montanaro6dead952003-09-25 14:50:04 +000011421
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011424
Guido van Rossumda88dad1995-01-26 00:46:29 +000011425 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11430$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
11434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011436if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11441$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442 OLD_CFLAGS=$CFLAGS
11443 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011445/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011446
11447# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Martin v. Löwis11437992002-04-12 09:54:03 +000011449int
11450main ()
11451{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452
11453 char *name;
11454 struct hostent *he, *res;
11455 char buffer[2048];
11456 int buflen = 2048;
11457 int h_errnop;
11458
11459 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461 ;
11462 return 0;
11463}
11464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011465if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011468
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11473$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011475else
Skip Montanaro6dead952003-09-25 14:50:04 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11478$as_echo "no" >&6; }
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11480$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011484# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Martin v. Löwis11437992002-04-12 09:54:03 +000011486int
11487main ()
11488{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011489
11490 char *name;
11491 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011492 char buffer[2048];
11493 int buflen = 2048;
11494 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011495
Matthias Kloseb159a552010-04-25 21:00:44 +000011496 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
11498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011505
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Matthias Kloseb159a552010-04-25 21:00:44 +000011507$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11510$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512else
Skip Montanaro6dead952003-09-25 14:50:04 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11517$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11519/* end confdefs.h. */
11520
11521# include <netdb.h>
11522
11523int
11524main ()
11525{
11526
11527 char *name;
11528 struct hostent *he;
11529 struct hostent_data data;
11530
11531 (void) gethostbyname_r(name, he, &data);
11532
11533 ;
11534 return 0;
11535}
11536_ACEOF
11537if ac_fn_c_try_compile "$LINENO"; then :
11538
11539 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11540
11541
11542$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11543
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11545$as_echo "yes" >&6; }
11546
11547else
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011560 CFLAGS=$OLD_CFLAGS
11561
11562else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 for ac_func in gethostbyname
11565do :
11566 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011567if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011569#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011570_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011572fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011573done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011574
Michael W. Hudson54241132001-12-07 15:38:26 +000011575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011576fi
11577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
11579
11580
11581
11582
11583
Guido van Rossum627b2d71993-12-24 10:39:16 +000011584# checks for system services
11585# (none yet)
11586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011587# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011588ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011589if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011590
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11593$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011594if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011596else
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011598LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602/* Override any GCC internal prototype to avoid an error.
11603 Use char because int might match the return type of a GCC
11604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011605#ifdef __cplusplus
11606extern "C"
11607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011608char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011609int
11610main ()
11611{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011618 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011622rm -f core conftest.err conftest.$ac_objext \
11623 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011624LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11627$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011628if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 cat >>confdefs.h <<_ACEOF
11630#define HAVE_LIBIEEE 1
11631_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011632
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011633 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635fi
11636
Michael W. Hudson54241132001-12-07 15:38:26 +000011637
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011638fi
11639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Guido van Rossum7f253911997-05-09 02:42:48 +000011641# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11643$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011647 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011648if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011649then
11650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11654$as_echo "yes" >&6; }
11655else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11656$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011657fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661fi
11662
Guido van Rossum7f253911997-05-09 02:42:48 +000011663
Guido van Rossum7f43da71994-08-01 12:15:30 +000011664# check for --with-libm=...
11665
Guido van Rossum563e7081996-09-10 18:20:48 +000011666case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011667Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011668*) LIBM=-lm
11669esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11671$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011673# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011675 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011676if test "$withval" = no
11677then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11679$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011680elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011681then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11683$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011684else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11688$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689fi
11690
Guido van Rossum7f43da71994-08-01 12:15:30 +000011691
11692# check for --with-libc=...
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11695$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011699 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011700if test "$withval" = no
11701then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11703$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011704elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011705then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11707$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011708else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011709fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11712$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011713fi
11714
Guido van Rossum7f43da71994-08-01 12:15:30 +000011715
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716# **************************************************
11717# * Check for various properties of floating point *
11718# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11721$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011722if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724else
11725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727 ac_cv_little_endian_double=no
11728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730/* end confdefs.h. */
11731
11732#include <string.h>
11733int main() {
11734 double x = 9006104071832581.0;
11735 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11736 return 0;
11737 else
11738 return 1;
11739}
11740
11741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743 ac_cv_little_endian_double=yes
11744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749fi
11750
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751fi
11752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11754$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755if test "$ac_cv_little_endian_double" = yes
11756then
11757
Matthias Kloseb9621712010-04-24 17:59:49 +000011758$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759
11760fi
11761
Matthias Kloseb9621712010-04-24 17:59:49 +000011762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11763$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011764if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766else
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769 ac_cv_big_endian_double=no
11770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772/* end confdefs.h. */
11773
11774#include <string.h>
11775int main() {
11776 double x = 9006104071832581.0;
11777 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11778 return 0;
11779 else
11780 return 1;
11781}
11782
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785 ac_cv_big_endian_double=yes
11786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791fi
11792
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011793fi
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11796$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011797if test "$ac_cv_big_endian_double" = yes
11798then
11799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011801
11802fi
11803
11804# Some ARM platforms use a mixed-endian representation for doubles.
11805# While Python doesn't currently have full support for these platforms
11806# (see e.g., issue 1762561), we can at least make sure that float <-> string
11807# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11809$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011810if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011812else
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815 ac_cv_mixed_endian_double=no
11816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011818/* end confdefs.h. */
11819
11820#include <string.h>
11821int main() {
11822 double x = 9006104071832581.0;
11823 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11824 return 0;
11825 else
11826 return 1;
11827}
11828
11829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831 ac_cv_mixed_endian_double=yes
11832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011837fi
11838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839fi
11840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11842$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011843if test "$ac_cv_mixed_endian_double" = yes
11844then
11845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011847
11848fi
11849
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011850# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011851# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011852# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011853# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011854# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011855# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011856
11857# This inline assembler syntax may also work for suncc and icc,
11858# so we try it on all platforms.
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11861$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011863/* end confdefs.h. */
11864
11865int
11866main ()
11867{
11868
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011869 unsigned short cw;
11870 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11871 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011872
11873 ;
11874 return 0;
11875}
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011878 have_gcc_asm_for_x87=yes
11879else
Matthias Kloseb9621712010-04-24 17:59:49 +000011880 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11884$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011885if test "$have_gcc_asm_for_x87" = yes
11886then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011889
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011891
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011892# Detect whether system arithmetic is subject to x87-style double
11893# rounding issues. The result of this test has little meaning on non
11894# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11895# mode is round-to-nearest and double rounding issues are present, and
11896# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11898$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011899# $BASECFLAGS may affect the result
11900ac_save_cc="$CC"
11901CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011902if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903 ac_cv_x87_double_rounding=no
11904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011906/* end confdefs.h. */
11907
11908#include <stdlib.h>
11909#include <math.h>
11910int main() {
11911 volatile double x, y, z;
11912 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11913 x = 0.99999999999999989; /* 1-2**-53 */
11914 y = 1./x;
11915 if (y != 1.)
11916 exit(0);
11917 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11918 x = 1e16;
11919 y = 2.99999;
11920 z = x + y;
11921 if (z != 1e16+4.)
11922 exit(0);
11923 /* both tests show evidence of double rounding */
11924 exit(1);
11925}
11926
11927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011928if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929 ac_cv_x87_double_rounding=no
11930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935fi
11936
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011937CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11939$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011940if test "$ac_cv_x87_double_rounding" = yes
11941then
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011944
11945fi
11946
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947# ************************************
11948# * Check for mathematical functions *
11949# ************************************
11950
11951LIBS_SAVE=$LIBS
11952LIBS="$LIBS $LIBM"
11953
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011954for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11955do :
11956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11957ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011958if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011959 cat >>confdefs.h <<_ACEOF
11960#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11961_ACEOF
11962
11963fi
11964done
11965
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011966for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011967do :
11968 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11969ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011970if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011971 cat >>confdefs.h <<_ACEOF
11972#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11973_ACEOF
11974
11975fi
11976done
11977
11978ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11979"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011980if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011981 ac_have_decl=1
11982else
11983 ac_have_decl=0
11984fi
11985
11986cat >>confdefs.h <<_ACEOF
11987#define HAVE_DECL_ISINF $ac_have_decl
11988_ACEOF
11989ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11990"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020011991if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011992 ac_have_decl=1
11993else
11994 ac_have_decl=0
11995fi
11996
11997cat >>confdefs.h <<_ACEOF
11998#define HAVE_DECL_ISNAN $ac_have_decl
11999_ACEOF
12000ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12001"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012002if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012003 ac_have_decl=1
12004else
12005 ac_have_decl=0
12006fi
12007
12008cat >>confdefs.h <<_ACEOF
12009#define HAVE_DECL_ISFINITE $ac_have_decl
12010_ACEOF
12011
12012
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012013# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12014# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12016$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012017if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012019else
12020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012022 ac_cv_tanh_preserves_zero_sign=no
12023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012025/* end confdefs.h. */
12026
12027#include <math.h>
12028#include <stdlib.h>
12029int main() {
12030 /* return 0 if either negative zeros don't exist
12031 on this platform or if negative zeros exist
12032 and tanh(-0.) == -0. */
12033 if (atan2(0., -1.) == atan2(-0., -1.) ||
12034 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12035 else exit(1);
12036}
12037
12038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012040 ac_cv_tanh_preserves_zero_sign=yes
12041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012046fi
12047
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012048fi
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12051$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012052if test "$ac_cv_tanh_preserves_zero_sign" = yes
12053then
12054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012056
12057fi
12058
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012059if test "$ac_cv_func_log1p" = yes
12060then
12061 # On some versions of AIX, log1p(-0.) returns 0. instead of
12062 # -0. See issue #9920.
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12064$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012065 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012066 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012068
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012069 if test "$cross_compiling" = yes; then :
12070 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012071else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012074
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012075 #include <math.h>
12076 #include <stdlib.h>
12077 int main() {
12078 /* Fail if the signs of log1p(-0.) and -0. can be
12079 distinguished. */
12080 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12081 return 0;
12082 else
12083 return 1;
12084 }
12085
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012086_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012087if ac_fn_c_try_run "$LINENO"; then :
12088 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012089else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012090 ac_cv_log1p_drops_zero_sign=yes
12091fi
12092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012094fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012095
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012096fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012097
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12099$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12100fi
12101if test "$ac_cv_log1p_drops_zero_sign" = yes
12102then
12103
12104$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12105
12106fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012107
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012108LIBS=$LIBS_SAVE
12109
Mark Dickinsona614f042009-11-28 12:48:43 +000012110# For multiprocessing module, check that sem_open
12111# actually works. For FreeBSD versions <= 7.2,
12112# the kernel module that provides POSIX semaphores
12113# isn't loaded by default, so an attempt to call
12114# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12116$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012117if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012121 ac_cv_posix_semaphores_enabled=yes
12122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012124/* end confdefs.h. */
12125
12126#include <unistd.h>
12127#include <fcntl.h>
12128#include <stdio.h>
12129#include <semaphore.h>
12130#include <sys/stat.h>
12131
12132int main(void) {
12133 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12134 if (a == SEM_FAILED) {
12135 perror("sem_open");
12136 return 1;
12137 }
12138 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012139 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012140 return 0;
12141}
12142
12143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012145 ac_cv_posix_semaphores_enabled=yes
12146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012151fi
12152
12153
Mark Dickinsona614f042009-11-28 12:48:43 +000012154fi
12155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12157$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012158if test $ac_cv_posix_semaphores_enabled = no
12159then
12160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012162
12163fi
12164
Mark Dickinson10683072009-04-18 21:18:19 +000012165# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12167$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012168if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170else
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012172 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012175/* end confdefs.h. */
12176
12177#include <unistd.h>
12178#include <fcntl.h>
12179#include <stdio.h>
12180#include <semaphore.h>
12181#include <sys/stat.h>
12182
12183int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012184 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012185 int count;
12186 int res;
12187 if(a==SEM_FAILED){
12188 perror("sem_open");
12189 return 1;
12190
12191 }
12192 res = sem_getvalue(a, &count);
12193 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012194 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012195 return res==-1 ? 1 : 0;
12196}
12197
Mark Dickinson10683072009-04-18 21:18:19 +000012198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012200 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012206fi
12207
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012209fi
12210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12212$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012213if test $ac_cv_broken_sem_getvalue = yes
12214then
12215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012217
12218fi
12219
Mark Dickinsonbd792642009-03-18 20:06:12 +000012220# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12222$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012223# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012225 enableval=$enable_big_digits; case $enable_big_digits in
12226yes)
12227 enable_big_digits=30 ;;
12228no)
12229 enable_big_digits=15 ;;
1223015|30)
12231 ;;
12232*)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012233 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 +000012234esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12236$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012237
12238cat >>confdefs.h <<_ACEOF
12239#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12240_ACEOF
12241
12242
12243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12245$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012246fi
12247
12248
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012250ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012251if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
12253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012256 wchar_h="yes"
12257
Guido van Rossumef2255b2000-03-10 22:30:29 +000012258else
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012260
12261fi
12262
Michael W. Hudson54241132001-12-07 15:38:26 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012265# determine wchar_t size
12266if test "$wchar_h" = yes
12267then
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12271# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12273$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012274if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12278"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 if test "$ac_cv_type_wchar_t" = yes; then
12282 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012284as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012285See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286 else
12287 ac_cv_sizeof_wchar_t=0
12288 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12293$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294
12295
12296
Martin v. Löwis11437992002-04-12 09:54:03 +000012297cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012298#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012299_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012300
Michael W. Hudson54241132001-12-07 15:38:26 +000012301
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012302fi
12303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12305$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012306have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012309
12310#include <tcl.h>
12311#if TCL_UTF_MAX != 6
12312# error "NOT UCS4_TCL"
12313#endif
12314int
12315main ()
12316{
12317
12318 ;
12319 return 0;
12320}
12321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012323
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012326
12327 have_ucs4_tcl=yes
12328
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12332$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012333
Skip Montanaro6dead952003-09-25 14:50:04 +000012334# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012335if test "$wchar_h" = yes
12336then
12337 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12339$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012340 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012342else
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012345 ac_cv_wchar_t_signed=yes
12346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012349
12350 #include <wchar.h>
12351 int main()
12352 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012353 /* Success: exit code 0 */
12354 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012355 }
12356
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012359 ac_cv_wchar_t_signed=yes
12360else
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012365fi
12366
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012367fi
12368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12370$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371fi
12372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12374$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012375
12376# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012377if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012378 withval=$with_wide_unicode;
12379if test "$withval" != no
12380then unicode_size="4"
12381else unicode_size="2"
12382fi
12383
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012384else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385
Georg Brandl52d168a2008-01-07 18:10:24 +000012386case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012387 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012388 *) unicode_size="2" ;;
12389esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012390
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012391fi
12392
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012393
12394
Georg Brandl52d168a2008-01-07 18:10:24 +000012395case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012396 4)
12397 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12398
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012399 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012400 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012402 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012403esac
12404
Michael W. Hudson54241132001-12-07 15:38:26 +000012405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Georg Brandl52d168a2008-01-07 18:10:24 +000012407# wchar_t is only usable if it maps to an unsigned type
12408if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012409 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012410then
12411 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012416
Georg Brandl52d168a2008-01-07 18:10:24 +000012417elif test "$ac_cv_sizeof_short" = "$unicode_size"
12418then
12419 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421
Georg Brandl52d168a2008-01-07 18:10:24 +000012422elif test "$ac_cv_sizeof_long" = "$unicode_size"
12423then
12424 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012426
Georg Brandl52d168a2008-01-07 18:10:24 +000012427else
12428 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12431$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012432
12433# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12435$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012436if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 ac_cv_c_bigendian=unknown
12440 # See if we're dealing with a universal compiler.
12441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12442/* end confdefs.h. */
12443#ifndef __APPLE_CC__
12444 not a universal capable compiler
12445 #endif
12446 typedef int dummy;
12447
Skip Montanaro6dead952003-09-25 14:50:04 +000012448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449if ac_fn_c_try_compile "$LINENO"; then :
12450
12451 # Check for potential -arch flags. It is not universal unless
12452 # there are at least two -arch flags with different values.
12453 ac_arch=
12454 ac_prev=
12455 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12456 if test -n "$ac_prev"; then
12457 case $ac_word in
12458 i?86 | x86_64 | ppc | ppc64)
12459 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12460 ac_arch=$ac_word
12461 else
12462 ac_cv_c_bigendian=universal
12463 break
12464 fi
12465 ;;
12466 esac
12467 ac_prev=
12468 elif test "x$ac_word" = "x-arch"; then
12469 ac_prev=arch
12470 fi
12471 done
12472fi
12473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12474 if test $ac_cv_c_bigendian = unknown; then
12475 # See if sys/param.h defines the BYTE_ORDER macro.
12476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012478#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480
Martin v. Löwis11437992002-04-12 09:54:03 +000012481int
12482main ()
12483{
Matthias Kloseb9621712010-04-24 17:59:49 +000012484#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12485 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12486 && LITTLE_ENDIAN)
12487 bogus endian macros
12488 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012489
12490 ;
12491 return 0;
12492}
12493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012494if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012498#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012500
Martin v. Löwis11437992002-04-12 09:54:03 +000012501int
12502main ()
12503{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012504#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 not big endian
12506 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012507
12508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012513 ac_cv_c_bigendian=yes
12514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012518fi
12519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12520 fi
12521 if test $ac_cv_c_bigendian = unknown; then
12522 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012525#include <limits.h>
12526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527int
12528main ()
12529{
Matthias Kloseb9621712010-04-24 17:59:49 +000012530#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12531 bogus endian macros
12532 #endif
12533
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_compile "$LINENO"; then :
12539 # It does; now see whether it defined to _BIG_ENDIAN or not.
12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12541/* end confdefs.h. */
12542#include <limits.h>
12543
12544int
12545main ()
12546{
12547#ifndef _BIG_ENDIAN
12548 not big endian
12549 #endif
12550
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561fi
12562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12563 fi
12564 if test $ac_cv_c_bigendian = unknown; then
12565 # Compile a test program.
12566 if test "$cross_compiling" = yes; then :
12567 # Try to guess by grepping values from an object file.
12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12569/* end confdefs.h. */
12570short int ascii_mm[] =
12571 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12572 short int ascii_ii[] =
12573 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12574 int use_ascii (int i) {
12575 return ascii_mm[i] + ascii_ii[i];
12576 }
12577 short int ebcdic_ii[] =
12578 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12579 short int ebcdic_mm[] =
12580 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12581 int use_ebcdic (int i) {
12582 return ebcdic_mm[i] + ebcdic_ii[i];
12583 }
12584 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586int
12587main ()
12588{
12589return use_ascii (foo) == use_ebcdic (foo);
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594if ac_fn_c_try_compile "$LINENO"; then :
12595 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12596 ac_cv_c_bigendian=yes
12597 fi
12598 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12599 if test "$ac_cv_c_bigendian" = unknown; then
12600 ac_cv_c_bigendian=no
12601 else
12602 # finding both strings is unlikely to happen, but who knows?
12603 ac_cv_c_bigendian=unknown
12604 fi
12605 fi
12606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012608else
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012611$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012612int
12613main ()
12614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 /* Are we little or big endian? From Harbison&Steele. */
12617 union
12618 {
12619 long int l;
12620 char c[sizeof (long int)];
12621 } u;
12622 u.l = 1;
12623 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624
12625 ;
12626 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627}
Martin v. Löwis11437992002-04-12 09:54:03 +000012628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012630 ac_cv_c_bigendian=no
12631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12641$as_echo "$ac_cv_c_bigendian" >&6; }
12642 case $ac_cv_c_bigendian in #(
12643 yes)
12644 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12645;; #(
12646 no)
12647 ;; #(
12648 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012649
Matthias Kloseb9621712010-04-24 17:59:49 +000012650$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012651
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 ;; #(
12653 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012654 as_fn_error $? "unknown endianness
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012655 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012657
Michael W. Hudson54241132001-12-07 15:38:26 +000012658
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012659# ABI version string for Python extension modules. This appears between the
12660# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12661# from the following attributes which affect the ABI of this Python build (in
12662# this order):
12663#
12664# * The Python implementation (always 'cpython-' for us)
12665# * The major and minor version numbers
12666# * --with-pydebug (adds a 'd')
12667# * --with-pymalloc (adds a 'm')
12668# * --with-wide-unicode (adds a 'u')
12669#
12670# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012671# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12672# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012673
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12675$as_echo_n "checking ABIFLAGS... " >&6; }
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12677$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12679$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012680SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12682$as_echo "$SOABI" >&6; }
12683
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12685$as_echo_n "checking LDVERSION... " >&6; }
12686LDVERSION='$(VERSION)$(ABIFLAGS)'
12687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12688$as_echo "$LDVERSION" >&6; }
12689
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012690# SO is the extension of shared libraries `(including the dot!)
12691# -- usually .so, .sl on HP-UX, .dll on Cygwin
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12693$as_echo_n "checking SO... " >&6; }
12694if test -z "$SO"
12695then
12696 case $ac_sys_system in
12697 hp*|HP*)
12698 case `uname -m` in
12699 ia64) SO=.so;;
12700 *) SO=.sl;;
12701 esac
12702 ;;
12703 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012704 Linux*|GNU*)
12705 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012706 *) SO=.so;;
12707 esac
12708else
12709 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012710 echo
12711 echo '====================================================================='
12712 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012713 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012714 echo '+ Do you really mean to change the extension for shared libraries? +'
12715 echo '+ Continuing in 10 seconds to let you to ponder. +'
12716 echo '+ +'
12717 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012718 sleep 10
12719fi
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12721$as_echo "$SO" >&6; }
12722
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012723# Check whether right shifting a negative integer extends the sign bit
12724# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12726$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012727if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012729else
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012732 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012736
12737int main()
12738{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012739 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012740}
12741
Martin v. Löwis11437992002-04-12 09:54:03 +000012742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012744 ac_cv_rshift_extends_sign=yes
12745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012750fi
12751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752fi
12753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12755$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012756if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012757then
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012760
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012761fi
12762
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012763# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12765$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012766if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012768else
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012772#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012773int
12774main ()
12775{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012776
12777 FILE *f = fopen("/dev/null", "r");
12778 flockfile(f);
12779 getc_unlocked(f);
12780 funlockfile(f);
12781
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ;
12783 return 0;
12784}
12785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012786if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012787 ac_cv_have_getc_unlocked=yes
12788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 ac_cv_have_getc_unlocked=no
12790fi
12791rm -f core conftest.err conftest.$ac_objext \
12792 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12796$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012797if test "$ac_cv_have_getc_unlocked" = yes
12798then
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012801
12802fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012803
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012804# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012805# save the value of LIBS so we don't actually link Python with readline
12806LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012807
Gregory P. Smith18820942008-09-07 06:24:49 +000012808# On some systems we need to link readline to a termcap compatible
12809# library. NOTE: Keep the precedence of listed libraries synchronised
12810# with setup.py.
12811py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12813$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012814for py_libtermcap in "" ncursesw ncurses curses termcap; do
12815 if test -z "$py_libtermcap"; then
12816 READLINE_LIBS="-lreadline"
12817 else
12818 READLINE_LIBS="-lreadline -l$py_libtermcap"
12819 fi
12820 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012822/* end confdefs.h. */
12823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824/* Override any GCC internal prototype to avoid an error.
12825 Use char because int might match the return type of a GCC
12826 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012827#ifdef __cplusplus
12828extern "C"
12829#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012830char readline ();
12831int
12832main ()
12833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012835 ;
12836 return 0;
12837}
12838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012839if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012840 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842rm -f core conftest.err conftest.$ac_objext \
12843 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012844 if test $py_cv_lib_readline = yes; then
12845 break
12846 fi
12847done
12848# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12849#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012850if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12852$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012853else
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12855$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012858
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012859fi
12860
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12863$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012864if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012866else
12867 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012868LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870/* end confdefs.h. */
12871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872/* Override any GCC internal prototype to avoid an error.
12873 Use char because int might match the return type of a GCC
12874 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875#ifdef __cplusplus
12876extern "C"
12877#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012878char rl_callback_handler_install ();
12879int
12880main ()
12881{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012883 ;
12884 return 0;
12885}
12886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012888 ac_cv_lib_readline_rl_callback_handler_install=yes
12889else
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012892rm -f core conftest.err conftest.$ac_objext \
12893 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012894LIBS=$ac_check_lib_save_LIBS
12895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12897$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012898if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901
12902fi
12903
12904
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012905# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012908#include <readline/readline.h>
12909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012910if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012911 have_readline=yes
12912else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012913 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012914
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012915fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012916rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012917if test $have_readline = yes
12918then
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012920/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012921#include <readline/readline.h>
12922
12923_ACEOF
12924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012928
12929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012930rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012933/* end confdefs.h. */
12934#include <readline/readline.h>
12935
12936_ACEOF
12937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012941
12942fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012943rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012944
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012945fi
12946
Martin v. Löwis0daad592001-09-30 21:09:59 +000012947# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12949$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012950if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012954LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012961#ifdef __cplusplus
12962extern "C"
12963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012964char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012978rm -f core conftest.err conftest.$ac_objext \
12979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012980LIBS=$ac_check_lib_save_LIBS
12981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12983$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012984if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012987
Martin v. Löwis0daad592001-09-30 21:09:59 +000012988fi
12989
Michael W. Hudson54241132001-12-07 15:38:26 +000012990
Thomas Wouters89d996e2007-09-08 17:39:28 +000012991# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12993$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020012994if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012996else
12997 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012998LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013000/* end confdefs.h. */
13001
13002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
13005#ifdef __cplusplus
13006extern "C"
13007#endif
13008char rl_completion_display_matches_hook ();
13009int
13010main ()
13011{
13012return rl_completion_display_matches_hook ();
13013 ;
13014 return 0;
13015}
13016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013017if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013018 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13019else
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013022rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013024LIBS=$ac_check_lib_save_LIBS
13025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13027$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013028if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013031
13032fi
13033
13034
Martin v. Löwis0daad592001-09-30 21:09:59 +000013035# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13037$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013038if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013040else
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013042LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046/* Override any GCC internal prototype to avoid an error.
13047 Use char because int might match the return type of a GCC
13048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013049#ifdef __cplusplus
13050extern "C"
13051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013052char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013053int
13054main ()
13055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 ;
13058 return 0;
13059}
13060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013066rm -f core conftest.err conftest.$ac_objext \
13067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013068LIBS=$ac_check_lib_save_LIBS
13069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13071$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013072if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013075
Guido van Rossum353ae582001-07-10 16:45:32 +000013076fi
13077
Jack Jansendd19cf82001-12-06 22:36:17 +000013078
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013079# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013081/* end confdefs.h. */
13082#include <readline/readline.h>
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013085 have_readline=yes
13086else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013087 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013089fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013090rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013091if test $have_readline = yes
13092then
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013094/* end confdefs.h. */
13095#include <readline/readline.h>
13096
13097_ACEOF
13098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013102
13103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013104rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013105
13106fi
13107
Martin v. Löwis82bca632006-02-10 20:49:30 +000013108# End of readline checks: restore LIBS
13109LIBS=$LIBS_no_readline
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13112$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013113if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013115else
Martin v. Löwis11437992002-04-12 09:54:03 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013118 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013119else
Matthias Kloseb9621712010-04-24 17:59:49 +000013120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013122
13123int main()
13124{
13125 int val1 = nice(1);
13126 if (val1 != -1 && val1 == nice(2))
13127 exit(0);
13128 exit(1);
13129}
13130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013132if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013133 ac_cv_broken_nice=yes
13134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013139fi
13140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141fi
13142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13144$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013145if test "$ac_cv_broken_nice" = yes
13146then
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013149
13150fi
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13153$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013154if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013158 ac_cv_broken_poll=no
13159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013161/* end confdefs.h. */
13162
13163#include <poll.h>
13164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013165int main()
13166{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013167 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013168 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013169
13170 close (42);
13171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013172 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013173 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013174 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013175 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013176 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013177 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178 return 1;
13179}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013180
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013183 ac_cv_broken_poll=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191fi
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13194$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013195if test "$ac_cv_broken_poll" = yes
13196then
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013199
13200fi
13201
Brett Cannon43802422005-02-10 20:48:03 +000013202# 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 +000013203# (which is not required by ISO C or UNIX spec) and/or if we support
13204# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013205ac_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 +000013206#include <$ac_cv_struct_tm>
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013209if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013210
13211cat >>confdefs.h <<_ACEOF
13212#define HAVE_STRUCT_TM_TM_ZONE 1
13213_ACEOF
13214
13215
13216fi
13217
13218if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013221
13222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13224"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013225if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229fi
13230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233_ACEOF
13234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13236$as_echo_n "checking for tzname... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013237if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013238 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013241/* end confdefs.h. */
13242#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243#if !HAVE_DECL_TZNAME
13244extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013245#endif
13246
13247int
13248main ()
13249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013250return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013251 ;
13252 return 0;
13253}
13254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013256 ac_cv_var_tzname=yes
13257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013260rm -f core conftest.err conftest.$ac_objext \
13261 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13264$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013265 if test $ac_cv_var_tzname = yes; then
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013268
13269 fi
13270fi
13271
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013272
Martin v. Löwis1d459062005-03-14 21:23:33 +000013273# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13275$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013276if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013278else
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013281 ac_cv_working_tzset=no
13282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013285
13286#include <stdlib.h>
13287#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013288#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013289
13290#if HAVE_TZNAME
13291extern char *tzname[];
13292#endif
13293
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013294int main()
13295{
Brett Cannon18367812003-09-19 00:59:16 +000013296 /* Note that we need to ensure that not only does tzset(3)
13297 do 'something' with localtime, but it works as documented
13298 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013299 This includes making sure that tzname is set properly if
13300 tm->tm_zone does not exist since it is the alternative way
13301 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013302
13303 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013304 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013305 */
13306
Martin v. Löwis1d459062005-03-14 21:23:33 +000013307 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013308 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13309
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013310 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013311 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013312 if (localtime(&groundhogday)->tm_hour != 0)
13313 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013314#if HAVE_TZNAME
13315 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13316 if (strcmp(tzname[0], "UTC") ||
13317 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13318 exit(1);
13319#endif
Brett Cannon18367812003-09-19 00:59:16 +000013320
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013321 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013323 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013324 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013325#if HAVE_TZNAME
13326 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13327 exit(1);
13328#endif
Brett Cannon18367812003-09-19 00:59:16 +000013329
13330 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13331 tzset();
13332 if (localtime(&groundhogday)->tm_hour != 11)
13333 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013334#if HAVE_TZNAME
13335 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13336 exit(1);
13337#endif
13338
13339#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013340 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13341 exit(1);
13342 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013344#endif
Brett Cannon18367812003-09-19 00:59:16 +000013345
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013346 exit(0);
13347}
13348
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013351 ac_cv_working_tzset=yes
13352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013357fi
13358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359fi
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13362$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013363if test "$ac_cv_working_tzset" = yes
13364then
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013367
13368fi
13369
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013370# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13372$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013373if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013377/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013378#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013379int
13380main ()
13381{
13382
13383struct stat st;
13384st.st_mtim.tv_nsec = 1;
13385
13386 ;
13387 return 0;
13388}
13389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013391 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13396fi
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13399$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013400if test "$ac_cv_stat_tv_nsec" = yes
13401then
13402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013404
13405fi
13406
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013407# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13409$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013410if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013414/* end confdefs.h. */
13415#include <sys/stat.h>
13416int
13417main ()
13418{
13419
13420struct stat st;
13421st.st_mtimespec.tv_nsec = 1;
13422
13423 ;
13424 return 0;
13425}
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013428 ac_cv_stat_tv_nsec2=yes
13429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13436$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013437if test "$ac_cv_stat_tv_nsec2" = yes
13438then
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013441
13442fi
13443
Jack Jansen666b1e72001-10-31 12:11:48 +000013444# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13446$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013447if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013452#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013453int
13454main ()
13455{
Jack Jansen666b1e72001-10-31 12:11:48 +000013456
13457 int rtn;
13458 rtn = mvwdelch(0,0,0);
13459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 ;
13461 return 0;
13462}
13463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013464if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013465 ac_cv_mvwdelch_is_expression=yes
13466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470fi
13471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13473$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013474
13475if test "$ac_cv_mvwdelch_is_expression" = yes
13476then
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013479
13480fi
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13483$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013484if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013489#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013490int
13491main ()
13492{
Jack Jansen666b1e72001-10-31 12:11:48 +000013493
13494 WINDOW *w;
13495 w->_flags = 0;
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 ;
13498 return 0;
13499}
13500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013501if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013502 ac_cv_window_has_flags=yes
13503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13510$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013511
Jack Jansen666b1e72001-10-31 12:11:48 +000013512
13513if test "$ac_cv_window_has_flags" = yes
13514then
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013517
13518fi
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13521$as_echo_n "checking for is_term_resized... " >&6; }
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013523/* end confdefs.h. */
13524#include <curses.h>
13525int
13526main ()
13527{
13528void *x=is_term_resized
13529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013536
Matthias Kloseb159a552010-04-25 21:00:44 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013542
13543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13547$as_echo_n "checking for resize_term... " >&6; }
13548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013549/* end confdefs.h. */
13550#include <curses.h>
13551int
13552main ()
13553{
13554void *x=resize_term
13555 ;
13556 return 0;
13557}
13558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013562
Matthias Kloseb159a552010-04-25 21:00:44 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13567$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013568
13569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13573$as_echo_n "checking for resizeterm... " >&6; }
13574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013575/* end confdefs.h. */
13576#include <curses.h>
13577int
13578main ()
13579{
13580void *x=resizeterm
13581 ;
13582 return 0;
13583}
13584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013585if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013588
Matthias Kloseb159a552010-04-25 21:00:44 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13593$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013594
13595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13599$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013600
13601if test -r /dev/ptmx
13602then
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13604$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013607
Thomas Wouters89f507f2006-12-13 04:49:30 +000013608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13610$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013611fi
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13614$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013615
13616if test -r /dev/ptc
13617then
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13619$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013622
Thomas Wouters89f507f2006-12-13 04:49:30 +000013623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13625$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013626fi
13627
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013628if test "$have_long_long" = yes
13629then
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13631$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013632 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013634else
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013636 ac_cv_have_long_long_format=no
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013639/* end confdefs.h. */
13640
13641 #include <stdio.h>
13642 #include <stddef.h>
13643 #include <string.h>
13644
13645 #ifdef HAVE_SYS_TYPES_H
13646 #include <sys/types.h>
13647 #endif
13648
13649 int main()
13650 {
13651 char buffer[256];
13652
13653 if (sprintf(buffer, "%lld", (long long)123) < 0)
13654 return 1;
13655 if (strcmp(buffer, "123"))
13656 return 1;
13657
13658 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13659 return 1;
13660 if (strcmp(buffer, "-123"))
13661 return 1;
13662
13663 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13664 return 1;
13665 if (strcmp(buffer, "123"))
13666 return 1;
13667
13668 return 0;
13669 }
13670
13671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013672if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013673 ac_cv_have_long_long_format=yes
13674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013679fi
13680
13681
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13685$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013686fi
13687
Mark Dickinson89d7d412009-12-31 20:50:59 +000013688if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013689then
13690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013692
13693fi
13694
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013695if test $ac_sys_system = Darwin
13696then
13697 LIBS="$LIBS -framework CoreFoundation"
13698fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13701$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013702if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013706 ac_cv_have_size_t_format="cross -- assuming yes"
13707
Thomas Wouters477c8d52006-05-27 19:21:47 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013710/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013711
Thomas Wouters477c8d52006-05-27 19:21:47 +000013712#include <stdio.h>
13713#include <stddef.h>
13714#include <string.h>
13715
Christian Heimes2c181612007-12-17 20:04:13 +000013716#ifdef HAVE_SYS_TYPES_H
13717#include <sys/types.h>
13718#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013719
13720#ifdef HAVE_SSIZE_T
13721typedef ssize_t Py_ssize_t;
13722#elif SIZEOF_VOID_P == SIZEOF_LONG
13723typedef long Py_ssize_t;
13724#else
13725typedef int Py_ssize_t;
13726#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013727
Christian Heimes2c181612007-12-17 20:04:13 +000013728int main()
13729{
13730 char buffer[256];
13731
Thomas Wouters477c8d52006-05-27 19:21:47 +000013732 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13733 return 1;
13734
Thomas Wouters89f507f2006-12-13 04:49:30 +000013735 if (strcmp(buffer, "123"))
13736 return 1;
13737
13738 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13739 return 1;
13740
13741 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013742 return 1;
13743
13744 return 0;
13745}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746
Thomas Wouters477c8d52006-05-27 19:21:47 +000013747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013749 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013755fi
13756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13759$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013760if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763
13764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013767#ifdef HAVE_SYS_TYPES_H
13768#include <sys/types.h>
13769#endif
13770#ifdef HAVE_SYS_SOCKET_H
13771#include <sys/socket.h>
13772#endif
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013775if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013776
Martin v. Löwis11437992002-04-12 09:54:03 +000013777else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013780
13781fi
13782
Michael W. Hudson54241132001-12-07 15:38:26 +000013783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13785$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013786if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013788else
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013790 ac_cv_broken_mbstowcs=no
13791else
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013793/* end confdefs.h. */
13794
13795#include<stdlib.h>
13796int main() {
13797 size_t len = -1;
13798 const char *str = "text";
13799 len = mbstowcs(NULL, str, 0);
13800 return (len != 4);
13801}
13802
13803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013805 ac_cv_broken_mbstowcs=no
13806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013811fi
13812
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813fi
13814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13816$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013817if test "$ac_cv_broken_mbstowcs" = yes
13818then
13819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013821
13822fi
13823
Antoine Pitrou042b1282010-08-13 21:15:58 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13825$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013826if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013827 $as_echo_n "(cached) " >&6
13828else
13829 if test "$cross_compiling" = yes; then :
13830 ac_cv_computed_gotos=no
13831else
13832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13833/* end confdefs.h. */
13834
13835int main(int argc, char **argv)
13836{
13837 static void *targets[1] = { &&LABEL1 };
13838 goto LABEL2;
13839LABEL1:
13840 return 0;
13841LABEL2:
13842 goto *targets[0];
13843 return 1;
13844}
13845
13846_ACEOF
13847if ac_fn_c_try_run "$LINENO"; then :
13848 ac_cv_computed_gotos=yes
13849else
13850 ac_cv_computed_gotos=no
13851fi
13852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13853 conftest.$ac_objext conftest.beam conftest.$ac_ext
13854fi
13855
13856fi
13857
13858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13859$as_echo "$ac_cv_computed_gotos" >&6; }
13860if test "$ac_cv_computed_gotos" = yes
13861then
13862
13863$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13864
13865fi
13866
Antoine Pitroub52ec782009-01-25 16:34:23 +000013867# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13869$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013870
13871# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013873 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013874if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013875then
13876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13880$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013881fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013882if test "$withval" = no
13883then
13884
13885$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013889fi
13890
Antoine Pitrou042b1282010-08-13 21:15:58 +000013891else
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13893$as_echo "no value specified" >&6; }
13894fi
13895
Antoine Pitroub52ec782009-01-25 16:34:23 +000013896
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013897case $ac_sys_system in
13898AIX*)
13899
13900$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13901 ;;
13902esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013903
Michael W. Hudson54241132001-12-07 15:38:26 +000013904
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013905
13906
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013907for h in `(cd $srcdir;echo Python/thread_*.h)`
13908do
13909 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13910done
13911
Michael W. Hudson54241132001-12-07 15:38:26 +000013912
Neal Norwitzd24499d2005-12-18 21:36:39 +000013913SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13915$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013916for dir in $SRCDIRS; do
13917 if test ! -d $dir; then
13918 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013919 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013920done
Matthias Kloseb9621712010-04-24 17:59:49 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13922$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013923
Guido van Rossum627b2d71993-12-24 10:39:16 +000013924# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013925ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013926
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013927ac_config_files="$ac_config_files Modules/ld_so_aix"
13928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013930# This file is a shell script that caches the results of configure
13931# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013932# scripts and configure runs, see configure's option --config-cache.
13933# It is not useful on other systems. If it contains results you don't
13934# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013935#
Martin v. Löwis11437992002-04-12 09:54:03 +000013936# config.status only pays attention to the cache file if you give it
13937# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938#
Skip Montanaro6dead952003-09-25 14:50:04 +000013939# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013940# loading this file, other *unset* `ac_cv_foo' will be assigned the
13941# following values.
13942
13943_ACEOF
13944
Guido van Rossumf78abae1997-01-21 22:02:36 +000013945# The following way of writing the cache mishandles newlines in values,
13946# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013948# Ultrix sh set writes to stderr and can't be redirected directly,
13949# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950(
13951 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13952 eval ac_val=\$$ac_var
13953 case $ac_val in #(
13954 *${as_nl}*)
13955 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13957$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 esac
13959 case $ac_var in #(
13960 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13962 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963 esac ;;
13964 esac
13965 done
13966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13969 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 # `set' does not quote correctly, so add quotes: double-quote
13971 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013973 "s/'/'\\\\''/g;
13974 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 *)
13977 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980 esac |
13981 sort
13982) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13988 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13990 :end' >>confcache
13991if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13992 if test -w "$cache_file"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013993 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13995$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnerd169fdc2011-09-08 00:56:17 +020013996 if test ! -f "$cache_file" || test -h "$cache_file"; then
13997 cat confcache >"$cache_file"
13998 else
13999 case $cache_file in #(
14000 */* | ?:*)
14001 mv -f confcache "$cache_file"$$ &&
14002 mv -f "$cache_file"$$ "$cache_file" ;; #(
14003 *)
14004 mv -f confcache "$cache_file" ;;
14005 esac
14006 fi
14007 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014008 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14010$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014011 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014012fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014013rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015test "x$prefix" = xNONE && prefix=$ac_default_prefix
14016# Let make expand exec_prefix.
14017test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014018
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019DEFS=-DHAVE_CONFIG_H
14020
Skip Montanaro6dead952003-09-25 14:50:04 +000014021ac_libobjs=
14022ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014023U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014024for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14025 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014028 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14029 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14031 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014032done
14033LIBOBJS=$ac_libobjs
14034
14035LTLIBOBJS=$ac_ltlibobjs
14036
14037
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Matthias Kloseb9621712010-04-24 17:59:49 +000014039
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014040: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014041ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014042ac_clean_files_save=$ac_clean_files
14043ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014044{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14045$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14046as_write_fail=0
14047cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014048#! $SHELL
14049# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014050# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014051# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014052# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014053
Martin v. Löwis11437992002-04-12 09:54:03 +000014054debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014055ac_cs_recheck=false
14056ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014057
Matthias Kloseb9621712010-04-24 17:59:49 +000014058SHELL=\${CONFIG_SHELL-$SHELL}
14059export SHELL
14060_ASEOF
14061cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14062## -------------------- ##
14063## M4sh Initialization. ##
14064## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066# Be more Bourne compatible
14067DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 emulate sh
14070 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014072 # is contrary to our usage. Disable this feature.
14073 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 case `(set -o) 2>/dev/null` in #(
14077 *posix*) :
14078 set -o posix ;; #(
14079 *) :
14080 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014082fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014083
14084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085as_nl='
14086'
14087export as_nl
14088# Printing a long string crashes Solaris 7 /usr/bin/printf.
14089as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14090as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14091as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14092# Prefer a ksh shell builtin over an external printf program on Solaris,
14093# but without wasting forks for bash or zsh.
14094if test -z "$BASH_VERSION$ZSH_VERSION" \
14095 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14096 as_echo='print -r --'
14097 as_echo_n='print -rn --'
14098elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14099 as_echo='printf %s\n'
14100 as_echo_n='printf %s'
14101else
14102 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14103 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14104 as_echo_n='/usr/ucb/echo -n'
14105 else
14106 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14107 as_echo_n_body='eval
14108 arg=$1;
14109 case $arg in #(
14110 *"$as_nl"*)
14111 expr "X$arg" : "X\\(.*\\)$as_nl";
14112 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14113 esac;
14114 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14115 '
14116 export as_echo_n_body
14117 as_echo_n='sh -c $as_echo_n_body as_echo'
14118 fi
14119 export as_echo_body
14120 as_echo='sh -c $as_echo_body as_echo'
14121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
14123# The user is always right.
14124if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 PATH_SEPARATOR=:
14126 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14127 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14128 PATH_SEPARATOR=';'
14129 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132
14133# IFS
14134# We need space, tab and new line, in precisely that order. Quoting is
14135# there to prevent editors from complaining about space-tab.
14136# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14137# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138IFS=" "" $as_nl"
14139
14140# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014141as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014142case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143 *[\\/]* ) as_myself=$0 ;;
14144 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014145for as_dir in $PATH
14146do
14147 IFS=$as_save_IFS
14148 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14150 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153 ;;
14154esac
14155# We did not find ourselves, most probably we were run as `sh COMMAND'
14156# in which case we are not to be found in the path.
14157if test "x$as_myself" = x; then
14158 as_myself=$0
14159fi
14160if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14162 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163fi
14164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165# Unset variables that we do not need and which cause bugs (e.g. in
14166# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14167# suppresses any "Segmentation fault" message there. '((' could
14168# trigger a bug in pdksh 5.2.14.
14169for as_var in BASH_ENV ENV MAIL MAILPATH
14170do eval test x\${$as_var+set} = xset \
14171 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172done
14173PS1='$ '
14174PS2='> '
14175PS4='+ '
14176
14177# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014178LC_ALL=C
14179export LC_ALL
14180LANGUAGE=C
14181export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183# CDPATH.
14184(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14185
14186
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014187# as_fn_error STATUS ERROR [LINENO LOG_FD]
14188# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014189# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14190# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014191# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014192as_fn_error ()
14193{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014194 as_status=$1; test $as_status -eq 0 && as_status=1
14195 if test "$4"; then
14196 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14197 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014199 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 as_fn_exit $as_status
14201} # as_fn_error
14202
14203
14204# as_fn_set_status STATUS
14205# -----------------------
14206# Set $? to STATUS, without forking.
14207as_fn_set_status ()
14208{
14209 return $1
14210} # as_fn_set_status
14211
14212# as_fn_exit STATUS
14213# -----------------
14214# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14215as_fn_exit ()
14216{
14217 set +e
14218 as_fn_set_status $1
14219 exit $1
14220} # as_fn_exit
14221
14222# as_fn_unset VAR
14223# ---------------
14224# Portably unset VAR.
14225as_fn_unset ()
14226{
14227 { eval $1=; unset $1;}
14228}
14229as_unset=as_fn_unset
14230# as_fn_append VAR VALUE
14231# ----------------------
14232# Append the text in VALUE to the end of the definition contained in VAR. Take
14233# advantage of any shell optimizations that allow amortized linear growth over
14234# repeated appends, instead of the typical quadratic growth present in naive
14235# implementations.
14236if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14237 eval 'as_fn_append ()
14238 {
14239 eval $1+=\$2
14240 }'
14241else
14242 as_fn_append ()
14243 {
14244 eval $1=\$$1\$2
14245 }
14246fi # as_fn_append
14247
14248# as_fn_arith ARG...
14249# ------------------
14250# Perform arithmetic evaluation on the ARGs, and store the result in the
14251# global $as_val. Take advantage of shells that can avoid forks. The arguments
14252# must be portable across $(()) and expr.
14253if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14254 eval 'as_fn_arith ()
14255 {
14256 as_val=$(( $* ))
14257 }'
14258else
14259 as_fn_arith ()
14260 {
14261 as_val=`expr "$@" || test $? -eq 1`
14262 }
14263fi # as_fn_arith
14264
14265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266if expr a : '\(a\)' >/dev/null 2>&1 &&
14267 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14268 as_expr=expr
14269else
14270 as_expr=false
14271fi
14272
14273if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14274 as_basename=basename
14275else
14276 as_basename=false
14277fi
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14280 as_dirname=dirname
14281else
14282 as_dirname=false
14283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285as_me=`$as_basename -- "$0" ||
14286$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14287 X"$0" : 'X\(//\)$' \| \
14288 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290 sed '/^.*\/\([^/][^/]*\)\/*$/{
14291 s//\1/
14292 q
14293 }
14294 /^X\/\(\/\/\)$/{
14295 s//\1/
14296 q
14297 }
14298 /^X\/\(\/\).*/{
14299 s//\1/
14300 q
14301 }
14302 s/.*/./; q'`
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304# Avoid depending upon Character Ranges.
14305as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14306as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14307as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14308as_cr_digits='0123456789'
14309as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310
14311ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014312case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 xy) ECHO_C='\c';;
14317 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14318 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319 esac;;
14320*)
14321 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014323
Martin v. Löwis11437992002-04-12 09:54:03 +000014324rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325if test -d conf$$.dir; then
14326 rm -f conf$$.dir/conf$$.file
14327else
14328 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014331if (echo >conf$$.file) 2>/dev/null; then
14332 if ln -s conf$$.file conf$$ 2>/dev/null; then
14333 as_ln_s='ln -s'
14334 # ... but there are two gotchas:
14335 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14336 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14337 # In both cases, we have to default to `cp -p'.
14338 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14339 as_ln_s='cp -p'
14340 elif ln conf$$.file conf$$ 2>/dev/null; then
14341 as_ln_s=ln
14342 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014345else
14346 as_ln_s='cp -p'
14347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14349rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351
14352# as_fn_mkdir_p
14353# -------------
14354# Create "$as_dir" as a directory, including parents if necessary.
14355as_fn_mkdir_p ()
14356{
14357
14358 case $as_dir in #(
14359 -*) as_dir=./$as_dir;;
14360 esac
14361 test -d "$as_dir" || eval $as_mkdir_p || {
14362 as_dirs=
14363 while :; do
14364 case $as_dir in #(
14365 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14366 *) as_qdir=$as_dir;;
14367 esac
14368 as_dirs="'$as_qdir' $as_dirs"
14369 as_dir=`$as_dirname -- "$as_dir" ||
14370$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14371 X"$as_dir" : 'X\(//\)[^/]' \| \
14372 X"$as_dir" : 'X\(//\)$' \| \
14373 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14374$as_echo X"$as_dir" |
14375 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14376 s//\1/
14377 q
14378 }
14379 /^X\(\/\/\)[^/].*/{
14380 s//\1/
14381 q
14382 }
14383 /^X\(\/\/\)$/{
14384 s//\1/
14385 q
14386 }
14387 /^X\(\/\).*/{
14388 s//\1/
14389 q
14390 }
14391 s/.*/./; q'`
14392 test -d "$as_dir" && break
14393 done
14394 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014395 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014396
14397
14398} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014399if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014401else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014402 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014403 as_mkdir_p=false
14404fi
14405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406if test -x / >/dev/null 2>&1; then
14407 as_test_x='test -x'
14408else
14409 if ls -dL / >/dev/null 2>&1; then
14410 as_ls_L_option=L
14411 else
14412 as_ls_L_option=
14413 fi
14414 as_test_x='
14415 eval sh -c '\''
14416 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 case $1 in #(
14420 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423 ???[sx]*):;;*)false;;esac;fi
14424 '\'' sh
14425 '
14426fi
14427as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
14429# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014430as_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 +000014431
14432# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014433as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
14435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014437## ----------------------------------- ##
14438## Main body of $CONFIG_STATUS script. ##
14439## ----------------------------------- ##
14440_ASEOF
14441test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14444# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014445# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446# values after options handling.
14447ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014448This file was extended by python $as_me 3.3, which was
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014449generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
14451 CONFIG_FILES = $CONFIG_FILES
14452 CONFIG_HEADERS = $CONFIG_HEADERS
14453 CONFIG_LINKS = $CONFIG_LINKS
14454 CONFIG_COMMANDS = $CONFIG_COMMANDS
14455 $ $0 $@
14456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457on `(hostname || uname -n) 2>/dev/null | sed 1q`
14458"
14459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462case $ac_config_files in *"
14463"*) set x $ac_config_files; shift; ac_config_files=$*;;
14464esac
14465
14466case $ac_config_headers in *"
14467"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14468esac
14469
14470
14471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014472# Files that config.status was made for.
Benjamin Peterson94b580d2011-08-02 17:30:04 -050014473config_files="$ac_config_files"
14474config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014479ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014480\`$as_me' instantiates files and other configuration actions
14481from templates according to the current configuration. Unless the files
14482and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
14486 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 --config print configuration, then exit
14489 -q, --quiet, --silent
14490 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 -d, --debug don't remove temporary files
14492 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 --file=FILE[:TEMPLATE]
14494 instantiate the configuration file FILE
14495 --header=FILE[:TEMPLATE]
14496 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
14498Configuration files:
14499$config_files
14500
14501Configuration headers:
14502$config_headers
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14508ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014509ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014510python config.status 3.3
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014511configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014514Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014515This config.status script is free software; the Free Software Foundation
14516gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517
14518ac_pwd='$ac_pwd'
14519srcdir='$srcdir'
14520INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014521test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
14523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14525# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014526ac_need_defaults=:
14527while test $# != 0
14528do
14529 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014530 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14532 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014533 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014535 --*=)
14536 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14537 ac_optarg=
14538 ac_shift=:
14539 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014541 ac_option=$1
14542 ac_optarg=$2
14543 ac_shift=shift
14544 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 esac
14546
Skip Montanaro6dead952003-09-25 14:50:04 +000014547 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014548 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014549 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14550 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 $as_echo "$ac_cs_version"; exit ;;
14553 --config | --confi | --conf | --con | --co | --c )
14554 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 debug=: ;;
14557 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014558 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 case $ac_optarg in
14560 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014561 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 esac
14563 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 ac_need_defaults=false;;
14565 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014566 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 case $ac_optarg in
14568 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14569 esac
14570 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572 --he | --h)
14573 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014574 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014575Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014578 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14579 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14580 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
14582 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014583 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014584Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
14589 esac
14590 shift
14591done
14592
Skip Montanaro6dead952003-09-25 14:50:04 +000014593ac_configure_extra_args=
14594
14595if $ac_cs_silent; then
14596 exec 6>/dev/null
14597 ac_configure_extra_args="$ac_configure_extra_args --silent"
14598fi
14599
14600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014602if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14604 shift
14605 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14606 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014609fi
14610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014612cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613exec 5>>config.log
14614{
14615 echo
14616 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14617## Running $as_me. ##
14618_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627
14628# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014629for ac_config_target in $ac_config_targets
14630do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 case $ac_config_target in
14632 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14633 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14634 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014635 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14636 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14638 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014639 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014640 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014642 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 esac
14644done
14645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647# If the user did not use the arguments to specify the items to instantiate,
14648# then the envvar interface is used. Set only those that are not.
14649# We use the long form for the default assignment because of an extremely
14650# bizarre bug on SunOS 4.1.3.
14651if $ac_need_defaults; then
14652 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14653 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14654fi
14655
Skip Montanaro6dead952003-09-25 14:50:04 +000014656# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014658# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659# Hook for its removal unless debugging.
14660# Note that there is a small window in which the directory will not be cleaned:
14661# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014662$debug ||
14663{
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014664 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665 trap 'exit_status=$?
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014666 : "${ac_tmp:=$tmp}"
14667 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014670}
Martin v. Löwis11437992002-04-12 09:54:03 +000014671# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014675 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014676} ||
14677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 tmp=./conf$$-$RANDOM
14679 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014680} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014681ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683# Set up the scripts for CONFIG_FILES section.
14684# No need to generate them if there are no CONFIG_FILES.
14685# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688
14689ac_cr=`echo X | tr X '\015'`
14690# On cygwin, bash can eat \r inside `` if the user requested igncr.
14691# But we know of no other shell where ac_cr would be empty at this
14692# point, so we can use a bashism as a fallback.
14693if test "x$ac_cr" = x; then
14694 eval ac_cr=\$\'\\r\'
14695fi
14696ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14697if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014698 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014699else
14700 ac_cs_awk_cr=$ac_cr
14701fi
14702
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014703echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014704_ACEOF
14705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707{
14708 echo "cat >conf$$subs.awk <<_ACEOF" &&
14709 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14710 echo "_ACEOF"
14711} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014712 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14713ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714ac_delim='%!_!# '
14715for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014717 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14720 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721 break
14722 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014723 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724 else
14725 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727done
Matthias Kloseb9621712010-04-24 17:59:49 +000014728rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014731cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014733sed -n '
14734h
14735s/^/S["/; s/!.*/"]=/
14736p
14737g
14738s/^[^!]*!//
14739:repl
14740t repl
14741s/'"$ac_delim"'$//
14742t delim
14743:nl
14744h
14745s/\(.\{148\}\)..*/\1/
14746t more1
14747s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14748p
14749n
14750b repl
14751:more1
14752s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14753p
14754g
14755s/.\{148\}//
14756t nl
14757:delim
14758h
14759s/\(.\{148\}\)..*/\1/
14760t more2
14761s/["\\]/\\&/g; s/^/"/; s/$/"/
14762p
14763b
14764:more2
14765s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14766p
14767g
14768s/.\{148\}//
14769t delim
14770' <conf$$subs.awk | sed '
14771/^[^""]/{
14772 N
14773 s/\n//
14774}
14775' >>$CONFIG_STATUS || ac_write_fail=1
14776rm -f conf$$subs.awk
14777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14778_ACAWK
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014779cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 for (key in S) S_is_set[key] = 1
14781 FS = ""
14782
14783}
14784{
14785 line = $ 0
14786 nfields = split(line, field, "@")
14787 substed = 0
14788 len = length(field[1])
14789 for (i = 2; i < nfields; i++) {
14790 key = field[i]
14791 keylen = length(key)
14792 if (S_is_set[key]) {
14793 value = S[key]
14794 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14795 len += length(value) + length(field[++i])
14796 substed = 1
14797 } else
14798 len += 1 + keylen
14799 }
14800
14801 print line
14802}
14803
14804_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14807if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14808 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14809else
14810 cat
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014811fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014812 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014813_ACEOF
14814
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014815# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14816# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817# trailing colons and then remove the whole line if VPATH becomes empty
14818# (actually we leave an empty line to preserve line numbers).
14819if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014820 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14821h
14822s///
14823s/^/:/
14824s/[ ]*$/:/
14825s/:\$(srcdir):/:/g
14826s/:\${srcdir}:/:/g
14827s/:@srcdir@:/:/g
14828s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014830x
14831s/\(=[ ]*\).*/\1/
14832G
14833s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834s/^[^=]*=[ ]*$//
14835}'
14836fi
14837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014839fi # test -n "$CONFIG_FILES"
14840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841# Set up the scripts for CONFIG_HEADERS section.
14842# No need to generate them if there are no CONFIG_HEADERS.
14843# This happens for instance with `./config.status Makefile'.
14844if test -n "$CONFIG_HEADERS"; then
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014845cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014846BEGIN {
14847_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849# Transform confdefs.h into an awk script `defines.awk', embedded as
14850# here-document in config.status, that substitutes the proper values into
14851# config.h.in to produce config.h.
14852
14853# Create a delimiter string that does not exist in confdefs.h, to ease
14854# handling of long lines.
14855ac_delim='%!_!# '
14856for ac_last_try in false false :; do
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014857 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14858 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 break
14860 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014861 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 else
14863 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14864 fi
14865done
14866
14867# For the awk script, D is an array of macro values keyed by name,
14868# likewise P contains macro parameters if any. Preserve backslash
14869# newline sequences.
14870
14871ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14872sed -n '
14873s/.\{148\}/&'"$ac_delim"'/g
14874t rset
14875:rset
14876s/^[ ]*#[ ]*define[ ][ ]*/ /
14877t def
14878d
14879:def
14880s/\\$//
14881t bsnl
14882s/["\\]/\\&/g
14883s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14884D["\1"]=" \3"/p
14885s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14886d
14887:bsnl
14888s/["\\]/\\&/g
14889s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14890D["\1"]=" \3\\\\\\n"\\/p
14891t cont
14892s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14893t cont
14894d
14895:cont
14896n
14897s/.\{148\}/&'"$ac_delim"'/g
14898t clear
14899:clear
14900s/\\$//
14901t bsnlc
14902s/["\\]/\\&/g; s/^/"/; s/$/"/p
14903d
14904:bsnlc
14905s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14906b cont
14907' <confdefs.h | sed '
14908s/'"$ac_delim"'/"\\\
14909"/g' >>$CONFIG_STATUS || ac_write_fail=1
14910
14911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14912 for (key in D) D_is_set[key] = 1
14913 FS = ""
14914}
14915/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14916 line = \$ 0
14917 split(line, arg, " ")
14918 if (arg[1] == "#") {
14919 defundef = arg[2]
14920 mac1 = arg[3]
14921 } else {
14922 defundef = substr(arg[1], 2)
14923 mac1 = arg[2]
14924 }
14925 split(mac1, mac2, "(") #)
14926 macro = mac2[1]
14927 prefix = substr(line, 1, index(line, defundef) - 1)
14928 if (D_is_set[macro]) {
14929 # Preserve the white space surrounding the "#".
14930 print prefix "define", macro P[macro] D[macro]
14931 next
14932 } else {
14933 # Replace #undef with comments. This is necessary, for example,
14934 # in the case of _POSIX_SOURCE, which is predefined and required
14935 # on some systems where configure will not decide to define it.
14936 if (defundef == "undef") {
14937 print "/*", prefix defundef, macro, "*/"
14938 next
14939 }
14940 }
14941}
14942{ print }
14943_ACAWK
14944_ACEOF
14945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014946 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014947fi # test -n "$CONFIG_HEADERS"
14948
14949
14950eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14951shift
14952for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953do
14954 case $ac_tag in
14955 :[FHLC]) ac_mode=$ac_tag; continue;;
14956 esac
14957 case $ac_mode$ac_tag in
14958 :[FHL]*:*);;
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014959 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 :[FH]-) ac_tag=-:-;;
14961 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14962 esac
14963 ac_save_IFS=$IFS
14964 IFS=:
14965 set x $ac_tag
14966 IFS=$ac_save_IFS
14967 shift
14968 ac_file=$1
14969 shift
14970
14971 case $ac_mode in
14972 :L) ac_source=$1;;
14973 :[FH])
14974 ac_file_inputs=
14975 for ac_f
14976 do
14977 case $ac_f in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014978 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979 *) # Look for the file first in the build tree, then in the source tree
14980 # (if the path is not absolute). The absolute path cannot be DOS-style,
14981 # because $ac_f cannot contain `:'.
14982 test -f "$ac_f" ||
14983 case $ac_f in
14984 [\\/$]*) false;;
14985 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14986 esac ||
Victor Stinnerd169fdc2011-09-08 00:56:17 +020014987 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14990 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 done
14992
14993 # Let's still pretend it is `configure' which instantiates (i.e., don't
14994 # use $as_me), people would be surprised to read:
14995 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 configure_input='Generated from '`
14997 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14998 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 if test x"$ac_file" != x-; then
15000 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15002$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 # Neutralize special characters interpreted by sed in replacement strings.
15005 case $configure_input in #(
15006 *\&* | *\|* | *\\* )
15007 ac_sed_conf_input=`$as_echo "$configure_input" |
15008 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15009 *) ac_sed_conf_input=$configure_input;;
15010 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
15012 case $ac_tag in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015013 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15014 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 esac
15016 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 esac
15018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015020$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021 X"$ac_file" : 'X\(//\)[^/]' \| \
15022 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15026 s//\1/
15027 q
15028 }
15029 /^X\(\/\/\)[^/].*/{
15030 s//\1/
15031 q
15032 }
15033 /^X\(\/\/\)$/{
15034 s//\1/
15035 q
15036 }
15037 /^X\(\/\).*/{
15038 s//\1/
15039 q
15040 }
15041 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ac_builddir=.
15044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045case "$ac_dir" in
15046.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15047*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051 case $ac_top_builddir_sub in
15052 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15053 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15054 esac ;;
15055esac
15056ac_abs_top_builddir=$ac_pwd
15057ac_abs_builddir=$ac_pwd$ac_dir_suffix
15058# for backward compatibility:
15059ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
15061case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 ac_top_srcdir=$ac_top_builddir_sub
15065 ac_abs_top_srcdir=$ac_pwd ;;
15066 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 ac_top_srcdir=$srcdir
15069 ac_abs_top_srcdir=$srcdir ;;
15070 *) # Relative name.
15071 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15072 ac_top_srcdir=$ac_top_build_prefix$srcdir
15073 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015074esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078 case $ac_mode in
15079 :F)
15080 #
15081 # CONFIG_FILE
15082 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
15084 case $INSTALL in
15085 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015088_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091# If the template does not know about datarootdir, expand it.
15092# FIXME: This hack should be removed a few years after 2.60.
15093ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015094ac_sed_dataroot='
15095/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096 p
15097 q
15098}
15099/@datadir@/p
15100/@docdir@/p
15101/@infodir@/p
15102/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015103/@mandir@/p'
15104case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105*datarootdir*) ac_datarootdir_seen=yes;;
15106*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15108$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015110cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 ac_datarootdir_hack='
15112 s&@datadir@&$datadir&g
15113 s&@docdir@&$docdir&g
15114 s&@infodir@&$infodir&g
15115 s&@localedir@&$localedir&g
15116 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118esac
15119_ACEOF
15120
15121# Neutralize VPATH when `$srcdir' = `.'.
15122# Shell code in configure.ac might set extrasub.
15123# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015124cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15125ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015126$extrasub
15127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015128cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129:t
15130/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015131s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015133s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134s&@srcdir@&$ac_srcdir&;t t
15135s&@abs_srcdir@&$ac_abs_srcdir&;t t
15136s&@top_srcdir@&$ac_top_srcdir&;t t
15137s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15138s&@builddir@&$ac_builddir&;t t
15139s&@abs_builddir@&$ac_abs_builddir&;t t
15140s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15141s&@INSTALL@&$ac_INSTALL&;t t
15142$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015143"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015144eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15145 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015148 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15149 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15150 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015152which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015153$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015154which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015155
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015156 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 case $ac_file in
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015158 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15159 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015161 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 ;;
15163 :H)
15164 #
15165 # CONFIG_HEADER
15166 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 {
15169 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015170 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15171 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015172 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015173 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15175$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 rm -f "$ac_file"
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015178 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015179 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 fi
15181 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 $as_echo "/* $configure_input */" \
Victor Stinnerd169fdc2011-09-08 00:56:17 +020015183 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015184 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188
15189 esac
15190
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015191
15192 case $ac_file$ac_mode in
15193 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15194
15195 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196done # for ac_tag
15197
Guido van Rossum627b2d71993-12-24 10:39:16 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015200_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015201ac_clean_files=$ac_clean_files_save
15202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015204 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
15207# configure is writing to config.log, and then calls config.status.
15208# config.status does its own redirection, appending to config.log.
15209# Unfortunately, on DOS this fails, as config.log is still kept open
15210# by configure, so config.status won't be able to write to it; its
15211# output is simply discarded. So we exec the FD to /dev/null,
15212# effectively closing config.log, so it can be properly (re)opened and
15213# appended to by config.status. When coming back to configure, we
15214# need to make the FD available again.
15215if test "$no_create" != yes; then
15216 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015217 ac_config_status_args=
15218 test "$silent" = yes &&
15219 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015221 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 exec 5>>config.log
15223 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15224 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015225 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015226fi
15227if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15229$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015230fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015231
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015232
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015233echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015234if test ! -f Modules/Setup
15235then
15236 cp $srcdir/Modules/Setup.dist Modules/Setup
15237fi
15238
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015239echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015240if test ! -f Modules/Setup.local
15241then
15242 echo "# Edit this file for local setup changes" >Modules/Setup.local
15243fi
15244
15245echo "creating Makefile"
15246$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15247 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015248 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015249mv config.c Modules