blob: 98ae6e651dfdc46715acb76e7041d3b793e244bb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $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 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_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 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl1ca2e792011-03-05 20:51:24 +0100647HAS_HG
648HGBRANCH
649HGTAG
650HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000651SVNVERSION
652ARFLAGS
653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
671MAINCC
672CXX
673OBJEXT
674EXEEXT
675ac_ct_CC
676CPPFLAGS
677LDFLAGS
678CFLAGS
679CC
680EXPORT_MACOSX_DEPLOYMENT_TARGET
681CONFIGURE_MACOSX_DEPLOYMENT_TARGET
682SGI_ABI
683MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000684FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
701target_alias
702host_alias
703build_alias
704LIBS
705ECHO_T
706ECHO_N
707ECHO_C
708DEFS
709mandir
710localedir
711libdir
712psdir
713pdfdir
714dvidir
715htmldir
716infodir
717docdir
718oldincludedir
719includedir
720localstatedir
721sharedstatedir
722sysconfdir
723datadir
724datarootdir
725libexecdir
726sbindir
727bindir
728program_transform_name
729prefix
730exec_prefix
731PACKAGE_URL
732PACKAGE_BUGREPORT
733PACKAGE_STRING
734PACKAGE_VERSION
735PACKAGE_TARNAME
736PACKAGE_NAME
737PATH_SEPARATOR
738SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000740ac_user_opts='
741enable_option_checking
742enable_universalsdk
743with_universal_archs
744with_framework_name
745enable_framework
746with_gcc
747with_cxx_main
748with_suffix
749enable_shared
750enable_profiling
751with_pydebug
752with_libs
753with_system_expat
754with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000755enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000756with_dbmliborder
757with_signal_module
758with_dec_threads
759with_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
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000781CPP'
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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000844 *=?*) 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 &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000891 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 &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000917 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 &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001121 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 &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001137 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001167 -*) 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]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001176 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001186 : "${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'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001194 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) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001200 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001223 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001237 $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 .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001253 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" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001255 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 .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001294 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=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001298 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
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001324\`configure' configures python 3.2 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001338 -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
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001385 short | recursive ) echo "Configuration of python 3.2:";;
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
1430 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1431 --with(out)-threads[=DIRECTORY]
1432 disable/enable thread support
1433 --with(out)-thread[=DIRECTORY]
1434 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001436 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001438 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with-fpectl enable SIGFPE catching
1440 --with-libm=STRING math library
1441 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001442 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001443 --with(out)-computed-gotos
1444 Use computed gotos in evaluation loop (enabled by
1445 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Some influential environment variables:
1448 CC C compiler command
1449 CFLAGS C compiler flags
1450 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1451 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 CPP C preprocessor
1456
1457Use these variables to override the choices made by `configure' or to help
1458it to find libraries and programs with nonstandard names/locations.
1459
Georg Brandle2e15612009-05-20 18:25:10 +00001460Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001463fi
1464
1465if test "$ac_init_help" = "recursive"; then
1466 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 test -d "$ac_dir" ||
1469 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1470 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_builddir=.
1472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473case "$ac_dir" in
1474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 case $ac_top_builddir_sub in
1480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1482 esac ;;
1483esac
1484ac_abs_top_builddir=$ac_pwd
1485ac_abs_builddir=$ac_pwd$ac_dir_suffix
1486# for backward compatibility:
1487ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 ac_top_srcdir=$ac_top_builddir_sub
1493 ac_abs_top_srcdir=$ac_pwd ;;
1494 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 ac_top_srcdir=$srcdir
1497 ac_abs_top_srcdir=$srcdir ;;
1498 *) # Relative name.
1499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1500 ac_top_srcdir=$ac_top_build_prefix$srcdir
1501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001502esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 cd "$ac_dir" || { ac_status=$?; continue; }
1506 # Check for guested configure.
1507 if test -f "$ac_srcdir/configure.gnu"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1510 elif test -f "$ac_srcdir/configure"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 fi || ac_status=$?
1516 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 done
1518fi
1519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001521if $ac_init_version; then
1522 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001523python configure 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001524generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001526Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001527This configure script is free software; the Free Software Foundation
1528gives unlimited permission to copy, distribute and modify it.
1529_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001532
1533## ------------------------ ##
1534## Autoconf initialization. ##
1535## ------------------------ ##
1536
1537# ac_fn_c_try_compile LINENO
1538# --------------------------
1539# Try to compile conftest.$ac_ext, and return whether this succeeded.
1540ac_fn_c_try_compile ()
1541{
1542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1543 rm -f conftest.$ac_objext
1544 if { { ac_try="$ac_compile"
1545case "(($ac_try" in
1546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1547 *) ac_try_echo=$ac_try;;
1548esac
1549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1550$as_echo "$ac_try_echo"; } >&5
1551 (eval "$ac_compile") 2>conftest.err
1552 ac_status=$?
1553 if test -s conftest.err; then
1554 grep -v '^ *+' conftest.err >conftest.er1
1555 cat conftest.er1 >&5
1556 mv -f conftest.er1 conftest.err
1557 fi
1558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1559 test $ac_status = 0; } && {
1560 test -z "$ac_c_werror_flag" ||
1561 test ! -s conftest.err
1562 } && test -s conftest.$ac_objext; then :
1563 ac_retval=0
1564else
1565 $as_echo "$as_me: failed program was:" >&5
1566sed 's/^/| /' conftest.$ac_ext >&5
1567
1568 ac_retval=1
1569fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 as_fn_set_status $ac_retval
1572
1573} # ac_fn_c_try_compile
1574
1575# ac_fn_c_try_cpp LINENO
1576# ----------------------
1577# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_cpp ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001596 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 }; then :
1600 ac_retval=0
1601else
1602 $as_echo "$as_me: failed program was:" >&5
1603sed 's/^/| /' conftest.$ac_ext >&5
1604
1605 ac_retval=1
1606fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001607 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_cpp
1611
1612# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1613# -------------------------------------------------------
1614# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1615# the include files in INCLUDES and setting the cache variable VAR
1616# accordingly.
1617ac_fn_c_check_header_mongrel ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001620 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1622$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001623if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo_n "(cached) " >&6
1625fi
1626eval ac_res=\$$3
1627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1628$as_echo "$ac_res" >&6; }
1629else
1630 # Is the header compilable?
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1632$as_echo_n "checking $2 usability... " >&6; }
1633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1634/* end confdefs.h. */
1635$4
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_compile "$LINENO"; then :
1639 ac_header_compiler=yes
1640else
1641 ac_header_compiler=no
1642fi
1643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1645$as_echo "$ac_header_compiler" >&6; }
1646
1647# Is the header present?
1648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1649$as_echo_n "checking $2 presence... " >&6; }
1650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1651/* end confdefs.h. */
1652#include <$2>
1653_ACEOF
1654if ac_fn_c_try_cpp "$LINENO"; then :
1655 ac_header_preproc=yes
1656else
1657 ac_header_preproc=no
1658fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001659rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1661$as_echo "$ac_header_preproc" >&6; }
1662
1663# So? What about this header?
1664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1665 yes:no: )
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1667$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1669$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1670 ;;
1671 no:yes:* )
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1673$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1675$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1677$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1679$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1681$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001682( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001683## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001684## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 ) | sed "s/^/$as_me: WARNING: /" >&2
1686 ;;
1687esac
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1689$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001690if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 $as_echo_n "(cached) " >&6
1692else
1693 eval "$3=\$ac_header_compiler"
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001699 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001700
1701} # ac_fn_c_check_header_mongrel
1702
1703# ac_fn_c_try_run LINENO
1704# ----------------------
1705# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1706# that executables *can* be run.
1707ac_fn_c_try_run ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if { { ac_try="$ac_link"
1711case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_link") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1721 { { case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_try") 2>&5
1728 ac_status=$?
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; }; }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: program exited with status $ac_status" >&5
1734 $as_echo "$as_me: failed program was:" >&5
1735sed 's/^/| /' conftest.$ac_ext >&5
1736
1737 ac_retval=$ac_status
1738fi
1739 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 as_fn_set_status $ac_retval
1742
1743} # ac_fn_c_try_run
1744
1745# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1746# -------------------------------------------------------
1747# Tests whether HEADER exists and can be compiled using the include files in
1748# INCLUDES, setting the cache variable VAR accordingly.
1749ac_fn_c_check_header_compile ()
1750{
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001754if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 $as_echo_n "(cached) " >&6
1756else
1757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 eval "$3=yes"
1764else
1765 eval "$3=no"
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768fi
1769eval ac_res=\$$3
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001773
1774} # ac_fn_c_check_header_compile
1775
1776# ac_fn_c_try_link LINENO
1777# -----------------------
1778# Try to link conftest.$ac_ext, and return whether this succeeded.
1779ac_fn_c_try_link ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782 rm -f conftest.$ac_objext conftest$ac_exeext
1783 if { { ac_try="$ac_link"
1784case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_link") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } && {
1799 test -z "$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 } && test -s conftest$ac_exeext && {
1802 test "$cross_compiling" = yes ||
1803 $as_test_x conftest$ac_exeext
1804 }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: failed program was:" >&5
1808sed 's/^/| /' conftest.$ac_ext >&5
1809
1810 ac_retval=1
1811fi
1812 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1813 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1814 # interfere with the next link command; also delete a directory that is
1815 # left behind by Apple's compiler. We do this before executing the actions.
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_link
1821
1822# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1823# -------------------------------------------
1824# Tests whether TYPE exists after having included INCLUDES, setting cache
1825# variable VAR accordingly.
1826ac_fn_c_check_type ()
1827{
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001831if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 $as_echo_n "(cached) " >&6
1833else
1834 eval "$3=no"
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838int
1839main ()
1840{
1841if (sizeof ($2))
1842 return 0;
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850$4
1851int
1852main ()
1853{
1854if (sizeof (($2)))
1855 return 0;
1856 ;
1857 return 0;
1858}
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861
1862else
1863 eval "$3=yes"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868fi
1869eval ac_res=\$$3
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1871$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001873
1874} # ac_fn_c_check_type
1875
1876# ac_fn_c_find_uintX_t LINENO BITS VAR
1877# ------------------------------------
1878# Finds an unsigned integer type with width BITS, setting cache variable VAR
1879# accordingly.
1880ac_fn_c_find_uintX_t ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1884$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001885if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001886 $as_echo_n "(cached) " >&6
1887else
1888 eval "$3=no"
1889 # Order is important - never check a type that is potentially smaller
1890 # than half of the expected target width.
1891 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1892 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$ac_includes_default
1896int
1897main ()
1898{
1899static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1900test_array [0] = 0
1901
1902 ;
1903 return 0;
1904}
1905_ACEOF
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 case $ac_type in #(
1908 uint$2_t) :
1909 eval "$3=yes" ;; #(
1910 *) :
1911 eval "$3=\$ac_type" ;;
1912esac
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001915 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917else
1918 break
1919fi
1920 done
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_find_uintX_t
1928
1929# ac_fn_c_find_intX_t LINENO BITS VAR
1930# -----------------------------------
1931# Finds a signed integer type with width BITS, setting cache variable VAR
1932# accordingly.
1933ac_fn_c_find_intX_t ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1937$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 # Order is important - never check a type that is potentially smaller
1943 # than half of the expected target width.
1944 for ac_type in int$2_t 'int' 'long int' \
1945 'long long int' 'short int' 'signed char'; do
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001949 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001950int
1951main ()
1952{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001953static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001964 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001965int
1966main ()
1967{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001969 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1970test_array [0] = 0
1971
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977
1978else
1979 case $ac_type in #(
1980 int$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991else
1992 break
1993fi
1994 done
1995fi
1996eval ac_res=\$$3
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001} # ac_fn_c_find_intX_t
2002
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
2037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
2054else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
2079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
2113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
2248# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2249# ----------------------------------------------------
2250# Tries to find if the field MEMBER exists in type AGGR, after including
2251# INCLUDES, setting cache variable VAR accordingly.
2252ac_fn_c_check_member ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2256$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002257if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$5
2279int
2280main ()
2281{
2282static $2 ac_aggr;
2283if (sizeof ac_aggr.$3)
2284return 0;
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_compile "$LINENO"; then :
2290 eval "$4=yes"
2291else
2292 eval "$4=no"
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298eval ac_res=\$$4
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2300$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002301 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002302
2303} # ac_fn_c_check_member
2304
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002305# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2306# ---------------------------------------------
2307# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2308# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002309ac_fn_c_check_decl ()
2310{
2311 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002312 as_decl_name=`echo $2|sed 's/ *(.*//'`
2313 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2315$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2316if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002317 $as_echo_n "(cached) " >&6
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$4
2322int
2323main ()
2324{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002325#ifndef $as_decl_name
2326#ifdef __cplusplus
2327 (void) $as_decl_use;
2328#else
2329 (void) $as_decl_name;
2330#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002331#endif
2332
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$3=yes"
2339else
2340 eval "$3=no"
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$3
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002354It was created by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002355generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# 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 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
2613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$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 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706
Benjamin Petersond23f8222009-04-05 19:13:16 +00002707if test "$prefix" != "/"; then
2708 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2709fi
2710
2711
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
2713
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002714# We don't use PACKAGE_ variables, and they cause conflicts
2715# with other autoconf-based packages that include Python.h
2716grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2717rm confdefs.h
2718mv confdefs.h.new confdefs.h
2719
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002720
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002721VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002722
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002723# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002724
2725SOVERSION=1.0
2726
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002727# The later defininition of _XOPEN_SOURCE disables certain features
2728# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2729
Matthias Kloseb9621712010-04-24 17:59:49 +00002730$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002731
2732
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2735# them.
2736
Matthias Kloseb9621712010-04-24 17:59:49 +00002737$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002738
2739
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2742# them.
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002745
2746
Martin v. Löwisd6320502004-08-12 13:45:08 +00002747# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2748# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002751
2752
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002753# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2754# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2755# them.
2756
Matthias Kloseb9621712010-04-24 17:59:49 +00002757$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002758
2759
2760
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002761define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002762
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002763# Arguments passed to configure.
2764
2765CONFIG_ARGS="$ac_configure_args"
2766
Matthias Kloseb9621712010-04-24 17:59:49 +00002767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2768$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002770if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002772 case $enableval in
2773 yes)
2774 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 if test ! -d "${enableval}"
2776 then
2777 enableval=/
2778 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779 ;;
2780 esac
2781 case $enableval in
2782 no)
2783 UNIVERSALSDK=
2784 enable_universalsdk=
2785 ;;
2786 *)
2787 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002788 if test ! -d "${UNIVERSALSDK}"
2789 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002790 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792 ;;
2793 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002794
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002795
Thomas Wouters477c8d52006-05-27 19:21:47 +00002796else
2797
2798 UNIVERSALSDK=
2799 enable_universalsdk=
2800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002802
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002803if test -n "${UNIVERSALSDK}"
2804then
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2806$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002807else
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002810fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002813
2814
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2818$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002819
2820# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002821if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002822 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2824$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002825 UNIVERSAL_ARCHS="$withval"
2826
2827else
2828
Matthias Kloseb9621712010-04-24 17:59:49 +00002829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2830$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002831
2832fi
2833
2834
2835
2836
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002837
2838# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002839if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002840 withval=$with_framework_name;
2841 PYTHONFRAMEWORK=${withval}
2842 PYTHONFRAMEWORKDIR=${withval}.framework
2843 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2844
2845else
2846
2847 PYTHONFRAMEWORK=Python
2848 PYTHONFRAMEWORKDIR=Python.framework
2849 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2850
2851fi
2852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002853# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002854if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002856 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002858 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 esac
2860 case $enableval in
2861 no)
2862 PYTHONFRAMEWORK=
2863 PYTHONFRAMEWORKDIR=no-framework
2864 PYTHONFRAMEWORKPREFIX=
2865 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002866 FRAMEWORKINSTALLFIRST=
2867 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 FRAMEWORKALTINSTALLFIRST=
2869 FRAMEWORKALTINSTALLLAST=
2870 if test "x${prefix}" = "xNONE"; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2872 else
2873 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2874 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002875 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002876 ;;
2877 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002878 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002879 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002880 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002881 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002882 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2883 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002884 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002885
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 if test "x${prefix}" = "xNONE" ; then
2887 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002888
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002889 else
2890 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2891 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002892
2893 case "${enableval}" in
2894 /System*)
2895 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2896 if test "${prefix}" = "NONE" ; then
2897 # See below
2898 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2899 fi
2900 ;;
2901
2902 /Library*)
2903 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2904 ;;
2905
2906 */Library/Frameworks)
2907 MDIR="`dirname "${enableval}"`"
2908 MDIR="`dirname "${MDIR}"`"
2909 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2910
2911 if test "${prefix}" = "NONE"; then
2912 # User hasn't specified the
2913 # --prefix option, but wants to install
2914 # the framework in a non-default location,
2915 # ensure that the compatibility links get
2916 # installed relative to that prefix as well
2917 # instead of in /usr/local.
2918 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2919 fi
2920 ;;
2921
2922 *)
2923 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2924 ;;
2925 esac
2926
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002929 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002933 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002935 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2936
2937 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2938
Jack Jansene578a632001-08-15 01:27:14 +00002939 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Guido van Rossum563e7081996-09-10 18:20:48 +00002941else
Martin v. Löwis11437992002-04-12 09:54:03 +00002942
Jack Jansene578a632001-08-15 01:27:14 +00002943 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002944 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002945 PYTHONFRAMEWORKPREFIX=
2946 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002947 FRAMEWORKINSTALLFIRST=
2948 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002949 FRAMEWORKALTINSTALLFIRST=
2950 FRAMEWORKALTINSTALLLAST=
2951 if test "x${prefix}" = "xNONE" ; then
2952 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2953 else
2954 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2955 fi
Jack Jansene578a632001-08-15 01:27:14 +00002956 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002957
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959fi
2960
Thomas Wouters477c8d52006-05-27 19:21:47 +00002961
2962
Michael W. Hudson54241132001-12-07 15:38:26 +00002963
2964
2965
2966
Jack Jansene578a632001-08-15 01:27:14 +00002967
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002968
2969
2970
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002971
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002972
Jack Jansene578a632001-08-15 01:27:14 +00002973##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002974## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002975## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002976##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977# Set name for machine-dependent library files
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2980$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002981if test -z "$MACHDEP"
2982then
Guido van Rossum563e7081996-09-10 18:20:48 +00002983 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002984 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002985 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002987 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002990 ac_md_system=`echo $ac_sys_system |
2991 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2992 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002993 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002994 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002995
Guido van Rossum07397971997-04-29 21:49:50 +00002996 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002997 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002998 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002999 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003000 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003001 esac
3002fi
Guido van Rossum91922671997-10-09 20:24:13 +00003003
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003004# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3005# disable features if it is defined, without any means to access these
3006# features as extensions. For these systems, we skip the definition of
3007# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3008# some feature, make sure there is no alternative way to access this
3009# feature. Also, when using wildcards, make sure you have verified the
3010# need for not defining _XOPEN_SOURCE on all systems matching the
3011# wildcard, and that the wildcard does not include future systems
3012# (which may remove their limitations).
3013case $ac_sys_system/$ac_sys_release in
3014 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3015 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003016 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003017 # In addition, Stefan Krah confirms that issue #1244610 exists through
3018 # OpenBSD 4.6, but is fixed in 4.7.
3019 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003020 define_xopen_source=no
3021 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3022 # also defined. This can be overridden by defining _BSD_SOURCE
3023 # As this has a different meaning on Linux, only define it on OpenBSD
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003026
3027 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003028 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003029 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3030 # also defined. This can be overridden by defining _BSD_SOURCE
3031 # As this has a different meaning on Linux, only define it on OpenBSD
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003034
3035 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003036 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3037 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3038 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003039 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 +00003040 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003041 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3042 # request to enable features supported by the standard as a request
3043 # to disable features not supported by the standard. The best way
3044 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3045 # entirely and define __EXTENSIONS__ instead.
3046 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003047 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3049 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003050 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003051 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003052 define_xopen_source=no;;
3053 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003054 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003056 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003057 # On FreeBSD 4, the math functions C89 does not cover are never defined
3058 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3059 FreeBSD/4.*)
3060 define_xopen_source=no;;
3061 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3062 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3063 # identifies itself as Darwin/7.*
3064 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3065 # disables platform specific features beyond repair.
3066 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3067 # has no effect, don't bother defining them
3068 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003069 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003070 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003071 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003072 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3073 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3074 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003075 AIX/4)
3076 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003077 AIX/5)
3078 if test `uname -r` -eq 1; then
3079 define_xopen_source=no
3080 fi
3081 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003082 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3083 # defining NI_NUMERICHOST.
3084 QNX/6.3.2)
3085 define_xopen_source=no
3086 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003087
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003088esac
3089
3090if test $define_xopen_source = yes
3091then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003092
Matthias Kloseb9621712010-04-24 17:59:49 +00003093$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003094
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
3096 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3097 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3098 # several APIs are not declared. Since this is also needed in some
3099 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
3107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003108fi
3109
Guido van Rossum91922671997-10-09 20:24:13 +00003110#
3111# SGI compilers allow the specification of the both the ABI and the
3112# ISA on the command line. Depending on the values of these switches,
3113# different and often incompatable code will be generated.
3114#
3115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3116# thus supply support for various ABI/ISA combinations. The MACHDEP
3117# variable is also adjusted.
3118#
3119
3120if test ! -z "$SGI_ABI"
3121then
3122 CC="cc $SGI_ABI"
3123 LDFLAGS="$SGI_ABI $LDFLAGS"
3124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3127$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003128
Jack Jansen6b08a402004-06-03 12:41:45 +00003129# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3130# it may influence the way we can build extensions, so distutils
3131# needs to check it
3132
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133
Jack Jansen6b08a402004-06-03 12:41:45 +00003134CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003136
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3138$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003139ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3141$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003142
Guido van Rossum627b2d71993-12-24 10:39:16 +00003143# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003144
3145# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3146# for debug/optimization stuff. BASECFLAGS is for flags that are required
3147# just to get things to compile and link. Users are free to override OPT
3148# when running configure or make. The build should not break if they do.
3149# BASECFLAGS should generally not be messed with, however.
3150
3151# XXX shouldn't some/most/all of this code be merged with the stuff later
3152# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3154$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003157if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003159 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003160 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003161 without_gcc=yes;;
3162 yes) CC=gcc
3163 without_gcc=no;;
3164 *) CC=$withval
3165 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003166 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003167else
Martin v. Löwis11437992002-04-12 09:54:03 +00003168
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003169 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003170 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003171 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003172 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174fi
3175
Matthias Kloseb9621712010-04-24 17:59:49 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3177$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003178
Guido van Rossum8b131c51995-03-09 14:10:13 +00003179# If the user switches compilers, we can't believe the cache
3180if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3181then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003182 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003183(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003184fi
3185
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003186# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3187# when the compiler supports them, but we don't always want -O2, and
3188# we set -g later.
3189if test -z "$CFLAGS"; then
3190 CFLAGS=
3191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003192ac_ext=c
3193ac_cpp='$CPP $CPPFLAGS'
3194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3196ac_compiler_gnu=$ac_cv_c_compiler_gnu
3197if test -n "$ac_tool_prefix"; then
3198 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3199set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3201$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003202if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003204else
3205 if test -n "$CC"; then
3206 ac_cv_prog_CC="$CC" # Let the user override the test.
3207else
Martin v. Löwis11437992002-04-12 09:54:03 +00003208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3209for as_dir in $PATH
3210do
3211 IFS=$as_save_IFS
3212 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 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 +00003215 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 $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 +00003217 break 2
3218 fi
3219done
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Jack Jansendd19cf82001-12-06 22:36:17 +00003223fi
3224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003225CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003226if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3228$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003229else
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3231$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003232fi
3233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234
Martin v. Löwis11437992002-04-12 09:54:03 +00003235fi
3236if test -z "$ac_cv_prog_CC"; then
3237 ac_ct_CC=$CC
3238 # Extract the first word of "gcc", so it can be a program name with args.
3239set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3241$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003242if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003244else
3245 if test -n "$ac_ct_CC"; then
3246 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3247else
3248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254 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 +00003255 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 $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 +00003257 break 2
3258 fi
3259done
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003262
3263fi
3264fi
3265ac_ct_CC=$ac_cv_prog_ac_ct_CC
3266if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3268$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003272fi
3273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test "x$ac_ct_CC" = x; then
3275 CC=""
3276 else
3277 case $cross_compiling:$ac_tool_warned in
3278yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281ac_tool_warned=yes ;;
3282esac
3283 CC=$ac_ct_CC
3284 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003285else
3286 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003287fi
3288
Jack Jansendd19cf82001-12-06 22:36:17 +00003289if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if test -n "$ac_tool_prefix"; then
3291 # 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 +00003292set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3294$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003295if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003297else
3298 if test -n "$CC"; then
3299 ac_cv_prog_CC="$CC" # Let the user override the test.
3300else
Martin v. Löwis11437992002-04-12 09:54:03 +00003301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003307 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 +00003308 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 $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 +00003310 break 2
3311 fi
3312done
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003315
3316fi
3317fi
3318CC=$ac_cv_prog_CC
3319if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3321$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322else
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3324$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003327
Martin v. Löwis11437992002-04-12 09:54:03 +00003328 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003329fi
3330if test -z "$CC"; then
3331 # Extract the first word of "cc", so it can be a program name with args.
3332set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3334$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003335if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003337else
3338 if test -n "$CC"; then
3339 ac_cv_prog_CC="$CC" # Let the user override the test.
3340else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3343for as_dir in $PATH
3344do
3345 IFS=$as_save_IFS
3346 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003347 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 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 +00003349 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3350 ac_prog_rejected=yes
3351 continue
3352 fi
3353 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $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 +00003355 break 2
3356 fi
3357done
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003360
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361if test $ac_prog_rejected = yes; then
3362 # We found a bogon in the path, so make sure we never use it.
3363 set dummy $ac_cv_prog_CC
3364 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366 # We chose a different compiler from the bogus one.
3367 # However, it has the same basename, so the bogon will be chosen
3368 # first if we set CC to just the basename; use the full file name.
3369 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003370 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003371 fi
3372fi
3373fi
3374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003375CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3378$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003379else
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3381$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382fi
3383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384
Martin v. Löwis11437992002-04-12 09:54:03 +00003385fi
3386if test -z "$CC"; then
3387 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 do
3390 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3391set dummy $ac_tool_prefix$ac_prog; 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003394if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 $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 +00003409 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003411done
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
3415fi
3416fi
3417CC=$ac_cv_prog_CC
3418if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3420$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003421else
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003424fi
3425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 test -n "$CC" && break
3428 done
3429fi
3430if test -z "$CC"; then
3431 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003433do
3434 # Extract the first word of "$ac_prog", so it can be a program name with args.
3435set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3437$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003438if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003440else
3441 if test -n "$ac_ct_CC"; then
3442 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3443else
3444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3445for as_dir in $PATH
3446do
3447 IFS=$as_save_IFS
3448 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450 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 +00003451 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 $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 +00003453 break 2
3454 fi
3455done
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459fi
3460fi
3461ac_ct_CC=$ac_cv_prog_ac_ct_CC
3462if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3464$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465else
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3467$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003468fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 test -n "$ac_ct_CC" && break
3472done
Michael W. Hudson54241132001-12-07 15:38:26 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474 if test "x$ac_ct_CC" = x; then
3475 CC=""
3476 else
3477 case $cross_compiling:$ac_tool_warned in
3478yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3480$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481ac_tool_warned=yes ;;
3482esac
3483 CC=$ac_ct_CC
3484 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485fi
3486
3487fi
3488
3489
Matthias Kloseb9621712010-04-24 17:59:49 +00003490test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003492as_fn_error $? "no acceptable C compiler found in \$PATH
3493See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003494
3495# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003496$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3497set X $ac_compile
3498ac_compiler=$2
3499for ac_option in --version -v -V -qversion; do
3500 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501case "(($ac_try" in
3502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3503 *) ac_try_echo=$ac_try;;
3504esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3506$as_echo "$ac_try_echo"; } >&5
3507 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003509 if test -s conftest.err; then
3510 sed '10a\
3511... rest of stderr output deleted ...
3512 10q' conftest.err >conftest.er1
3513 cat conftest.er1 >&5
3514 fi
3515 rm -f conftest.er1 conftest.err
3516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3517 test $ac_status = 0; }
3518done
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Matthias Kloseb9621712010-04-24 17:59:49 +00003520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003521/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523int
3524main ()
3525{
3526
3527 ;
3528 return 0;
3529}
3530_ACEOF
3531ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003532ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003533# Try to create an executable without -o first, disregard a.out.
3534# It will help us diagnose broken compilers, and finding out an intuition
3535# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3537$as_echo_n "checking whether the C compiler works... " >&6; }
3538ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3539
3540# The possible output files:
3541ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543ac_rmfiles=
3544for ac_file in $ac_files
3545do
3546 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003547 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3549 esac
3550done
3551rm -f $ac_rmfiles
3552
Matthias Kloseb9621712010-04-24 17:59:49 +00003553if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554case "(($ac_try" in
3555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556 *) ac_try_echo=$ac_try;;
3557esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3559$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3563 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3565# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3566# in a Makefile. We should not override ac_cv_exeext if it was cached,
3567# so that the user can short-circuit this test for compilers unknown to
3568# Autoconf.
3569for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003570do
3571 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003574 ;;
3575 [ab].out )
3576 # We found the default executable, but exeext='' is most
3577 # certainly right.
3578 break;;
3579 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 then :; else
3582 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3583 fi
3584 # We set ac_cv_exeext here because the later test for it is not
3585 # safe: cross compilers may not add the suffix if given an `-o'
3586 # argument, so we may need to know it at that point already.
3587 # Even if this section looks crufty: it has the advantage of
3588 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003589 break;;
3590 * )
3591 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 esac
3593done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594test "$ac_cv_exeext" = no && ac_cv_exeext=
3595
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003596else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597 ac_file=''
3598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003599if test -z "$ac_file"; then :
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
3602$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003607as_fn_error 77 "C compiler cannot create executables
3608See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003609else
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3611$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3614$as_echo_n "checking for C compiler default output file name... " >&6; }
3615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3616$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618
Matthias Kloseb9621712010-04-24 17:59:49 +00003619rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3622$as_echo_n "checking for suffix of executables... " >&6; }
3623if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624case "(($ac_try" in
3625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3626 *) ac_try_echo=$ac_try;;
3627esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3629$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3633 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3635# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3636# work properly (i.e., refer to `conftest.exe'), while it won't with
3637# `rm'.
3638for ac_file in conftest.exe conftest conftest.*; do
3639 test -f "$ac_file" || continue
3640 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003642 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3643 break;;
3644 * ) break;;
3645 esac
3646done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003650as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3651See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003653rm -f conftest conftest$ac_cv_exeext
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3655$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656
3657rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003658EXEEXT=$ac_cv_exeext
3659ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3661/* end confdefs.h. */
3662#include <stdio.h>
3663int
3664main ()
3665{
3666FILE *f = fopen ("conftest.out", "w");
3667 return ferror (f) || fclose (f) != 0;
3668
3669 ;
3670 return 0;
3671}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003673ac_clean_files="$ac_clean_files conftest.out"
3674# Check that the compiler produces executables we can run. If not, either
3675# the compiler is broken, or we cross compile.
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3677$as_echo_n "checking whether we are cross compiling... " >&6; }
3678if test "$cross_compiling" != yes; then
3679 { { ac_try="$ac_link"
3680case "(($ac_try" in
3681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3682 *) ac_try_echo=$ac_try;;
3683esac
3684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3685$as_echo "$ac_try_echo"; } >&5
3686 (eval "$ac_link") 2>&5
3687 ac_status=$?
3688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3689 test $ac_status = 0; }
3690 if { ac_try='./conftest$ac_cv_exeext'
3691 { { case "(($ac_try" in
3692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3693 *) ac_try_echo=$ac_try;;
3694esac
3695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3696$as_echo "$ac_try_echo"; } >&5
3697 (eval "$ac_try") 2>&5
3698 ac_status=$?
3699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3700 test $ac_status = 0; }; }; then
3701 cross_compiling=no
3702 else
3703 if test "$cross_compiling" = maybe; then
3704 cross_compiling=yes
3705 else
3706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003708as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003710See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 fi
3712 fi
3713fi
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3715$as_echo "$cross_compiling" >&6; }
3716
3717rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3718ac_clean_files=$ac_clean_files_save
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3720$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003721if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo_n "(cached) " >&6
3723else
3724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003725/* end confdefs.h. */
3726
3727int
3728main ()
3729{
3730
3731 ;
3732 return 0;
3733}
3734_ACEOF
3735rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003736if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737case "(($ac_try" in
3738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3739 *) ac_try_echo=$ac_try;;
3740esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3742$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3746 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 for ac_file in conftest.o conftest.obj conftest.*; do
3748 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3752 break;;
3753 esac
3754done
3755else
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003757sed 's/^/| /' conftest.$ac_ext >&5
3758
Matthias Kloseb9621712010-04-24 17:59:49 +00003759{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003761as_fn_error $? "cannot compute suffix of object files: cannot compile
3762See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003764rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3767$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768OBJEXT=$ac_cv_objext
3769ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3771$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003772if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003774else
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778int
3779main ()
3780{
3781#ifndef __GNUC__
3782 choke me
3783#endif
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 ac_compiler_gnu=yes
3791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003795ac_cv_c_compiler_gnu=$ac_compiler_gnu
3796
3797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3799$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3800if test $ac_compiler_gnu = yes; then
3801 GCC=yes
3802else
3803 GCC=
3804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805ac_test_CFLAGS=${CFLAGS+set}
3806ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3808$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003809if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 ac_save_c_werror_flag=$ac_c_werror_flag
3813 ac_c_werror_flag=yes
3814 ac_cv_prog_cc_g=no
3815 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819int
3820main ()
3821{
3822
3823 ;
3824 return 0;
3825}
3826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003827if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 CFLAGS=""
3831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844else
3845 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848/* end confdefs.h. */
3849
3850int
3851main ()
3852{
3853
3854 ;
3855 return 0;
3856}
3857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003858if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3866 ac_c_werror_flag=$ac_save_c_werror_flag
3867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3869$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003870if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872elif test $ac_cv_prog_cc_g = yes; then
3873 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003874 CFLAGS="-g -O2"
3875 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003877 fi
3878else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003879 if test "$GCC" = yes; then
3880 CFLAGS="-O2"
3881 else
3882 CFLAGS=
3883 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3886$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003887if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003889else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003891ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003893/* end confdefs.h. */
3894#include <stdarg.h>
3895#include <stdio.h>
3896#include <sys/types.h>
3897#include <sys/stat.h>
3898/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3899struct buf { int x; };
3900FILE * (*rcsopen) (struct buf *, struct stat *, int);
3901static char *e (p, i)
3902 char **p;
3903 int i;
3904{
3905 return p[i];
3906}
3907static char *f (char * (*g) (char **, int), char **p, ...)
3908{
3909 char *s;
3910 va_list v;
3911 va_start (v,p);
3912 s = g (p, va_arg (v,int));
3913 va_end (v);
3914 return s;
3915}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003916
3917/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3918 function prototypes and stuff, but not '\xHH' hex character constants.
3919 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003921 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3922 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003924int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3927 inside strings and character constants. */
3928#define FOO(x) 'x'
3929int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3930
Skip Montanaro6dead952003-09-25 14:50:04 +00003931int test (int i, double x);
3932struct s1 {int (*f) (int a);};
3933struct s2 {int (*f) (double a);};
3934int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3935int argc;
3936char **argv;
3937int
3938main ()
3939{
3940return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3941 ;
3942 return 0;
3943}
3944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3946 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952rm -f core conftest.err conftest.$ac_objext
3953 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003954done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003956CC=$ac_save_CC
3957
3958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959# AC_CACHE_VAL
3960case "x$ac_cv_prog_cc_c89" in
3961 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3963$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3966$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3970$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003971esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003972if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003975
Martin v. Löwis11437992002-04-12 09:54:03 +00003976ac_ext=c
3977ac_cpp='$CPP $CPPFLAGS'
3978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3980ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003982
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983
3984
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3986$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003989if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992 case $withval in
3993 no) with_cxx_main=no
3994 MAINCC='$(CC)';;
3995 yes) with_cxx_main=yes
3996 MAINCC='$(CXX)';;
3997 *) with_cxx_main=yes
3998 MAINCC=$withval
3999 if test -z "$CXX"
4000 then
4001 CXX=$withval
4002 fi;;
4003 esac
4004else
4005
4006 with_cxx_main=no
4007 MAINCC='$(CC)'
4008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009fi
4010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4012$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004013
4014preset_cxx="$CXX"
4015if test -z "$CXX"
4016then
4017 case "$CC" in
4018 gcc) # Extract the first word of "g++", so it can be a program name with args.
4019set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004022if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024else
4025 case $CXX in
4026 [\\/]* | ?:[\\/]*)
4027 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4028 ;;
4029 *)
4030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031for as_dir in notfound
4032do
4033 IFS=$as_save_IFS
4034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 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 +00004037 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039 break 2
4040 fi
4041done
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
4045 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4046 ;;
4047esac
4048fi
4049CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004050if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4052$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004053else
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4055$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 ;;
4059 cc) # Extract the first word of "c++", so it can be a program name with args.
4060set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004063if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065else
4066 case $CXX in
4067 [\\/]* | ?:[\\/]*)
4068 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4069 ;;
4070 *)
4071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in notfound
4073do
4074 IFS=$as_save_IFS
4075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 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 +00004078 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080 break 2
4081 fi
4082done
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085
4086 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4087 ;;
4088esac
4089fi
4090CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004091if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4093$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004094else
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4096$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004098
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004099 ;;
4100 esac
4101 if test "$CXX" = "notfound"
4102 then
4103 CXX=""
4104 fi
4105fi
4106if test -z "$CXX"
4107then
4108 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4109do
4110 # Extract the first word of "$ac_prog", so it can be a program name with args.
4111set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4113$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004114if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116else
4117 if test -n "$CXX"; then
4118 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4119else
4120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in $PATH
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 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 +00004127 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129 break 2
4130 fi
4131done
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134
4135fi
4136fi
4137CXX=$ac_cv_prog_CXX
4138if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4140$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144fi
4145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147 test -n "$CXX" && break
4148done
4149test -n "$CXX" || CXX="notfound"
4150
4151 if test "$CXX" = "notfound"
4152 then
4153 CXX=""
4154 fi
4155fi
4156if test "$preset_cxx" != "$CXX"
4157then
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004159
4160 By default, distutils will build C++ extension modules with \"$CXX\".
4161 If this is not intended, then set CXX on the configure command line.
4162 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004163$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004164
4165 By default, distutils will build C++ extension modules with \"$CXX\".
4166 If this is not intended, then set CXX on the configure command line.
4167 " >&2;}
4168fi
4169
4170
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
4173ac_ext=c
4174ac_cpp='$CPP $CPPFLAGS'
4175ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4176ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4177ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4179$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004180# On Suns, sometimes $CPP names a directory.
4181if test -n "$CPP" && test -d "$CPP"; then
4182 CPP=
4183fi
4184if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004185 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 # Double quotes because CPP needs to be expanded
4189 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4190 do
4191 ac_preproc_ok=false
4192for ac_c_preproc_warn_flag in '' yes
4193do
4194 # Use a header file that comes with gcc, so configuring glibc
4195 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004196 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4197 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004198 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
4202#ifdef __STDC__
4203# include <limits.h>
4204#else
4205# include <assert.h>
4206#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004207 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004210
Matthias Kloseb9621712010-04-24 17:59:49 +00004211else
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 # Broken: fails on valid input.
4213continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004214fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004215rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004218 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221#include <ac_nonexistent.h>
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 # Broken: success on invalid input.
4225continue
4226else
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 # Passes both tests.
4228ac_preproc_ok=:
4229break
4230fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004231rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004232
4233done
4234# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004235rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 break
4238fi
4239
4240 done
4241 ac_cv_prog_CPP=$CPP
4242
4243fi
4244 CPP=$ac_cv_prog_CPP
4245else
4246 ac_cv_prog_CPP=$CPP
4247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4249$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004250ac_preproc_ok=false
4251for ac_c_preproc_warn_flag in '' yes
4252do
4253 # Use a header file that comes with gcc, so configuring glibc
4254 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004255 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4256 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # On the NeXT, cc -E runs the code through the compiler's parser,
4258 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004260/* end confdefs.h. */
4261#ifdef __STDC__
4262# include <limits.h>
4263#else
4264# include <assert.h>
4265#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004266 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004268if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004269
Matthias Kloseb9621712010-04-24 17:59:49 +00004270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 # Broken: fails on valid input.
4272continue
4273fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004274rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004280#include <ac_nonexistent.h>
4281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004282if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 # Broken: success on invalid input.
4284continue
4285else
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 # Passes both tests.
4287ac_preproc_ok=:
4288break
4289fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004290rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004291
4292done
4293# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004294rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004295if $ac_preproc_ok; then :
4296
Martin v. Löwis11437992002-04-12 09:54:03 +00004297else
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004300as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4301See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004302fi
4303
4304ac_ext=c
4305ac_cpp='$CPP $CPPFLAGS'
4306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4308ac_compiler_gnu=$ac_cv_c_compiler_gnu
4309
4310
Matthias Kloseb9621712010-04-24 17:59:49 +00004311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4312$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004313if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004315else
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 # Loop through the user's path and test for each of PROGNAME-LIST
4319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4321do
4322 IFS=$as_save_IFS
4323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 for ac_prog in grep ggrep; do
4325 for ac_exec_ext in '' $ac_executable_extensions; do
4326 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4327 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4328# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 # Check for GNU $ac_path_GREP
4330case `"$ac_path_GREP" --version 2>&1` in
4331*GNU*)
4332 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4333*)
4334 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 while :
4337 do
4338 cat "conftest.in" "conftest.in" >"conftest.tmp"
4339 mv "conftest.tmp" "conftest.in"
4340 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4343 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4346 # Best one so far, save it but keep looking for a better one
4347 ac_cv_path_GREP="$ac_path_GREP"
4348 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004349 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 # 10*(2^10) chars as input seems more than enough
4351 test $ac_count -gt 10 && break
4352 done
4353 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4354esac
4355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 $ac_path_GREP_found && break 3
4357 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004362 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 +00004363 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364else
4365 ac_cv_path_GREP=$GREP
4366fi
4367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4370$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 GREP="$ac_cv_path_GREP"
4372
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4375$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004376if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378else
4379 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4380 then ac_cv_path_EGREP="$GREP -E"
4381 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 # Loop through the user's path and test for each of PROGNAME-LIST
4385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4387do
4388 IFS=$as_save_IFS
4389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 for ac_prog in egrep; do
4391 for ac_exec_ext in '' $ac_executable_extensions; do
4392 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4393 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4394# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 # Check for GNU $ac_path_EGREP
4396case `"$ac_path_EGREP" --version 2>&1` in
4397*GNU*)
4398 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4399*)
4400 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 while :
4403 do
4404 cat "conftest.in" "conftest.in" >"conftest.tmp"
4405 mv "conftest.tmp" "conftest.in"
4406 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4409 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4412 # Best one so far, save it but keep looking for a better one
4413 ac_cv_path_EGREP="$ac_path_EGREP"
4414 ac_path_EGREP_max=$ac_count
4415 fi
4416 # 10*(2^10) chars as input seems more than enough
4417 test $ac_count -gt 10 && break
4418 done
4419 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4420esac
4421
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 $ac_path_EGREP_found && break 3
4423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004428 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 +00004429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430else
4431 ac_cv_path_EGREP=$EGREP
4432fi
4433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 fi
4435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4437$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004439
4440
Matthias Kloseb9621712010-04-24 17:59:49 +00004441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4442$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004443if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $as_echo_n "(cached) " >&6
4445else
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004447/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004448#include <stdlib.h>
4449#include <stdarg.h>
4450#include <string.h>
4451#include <float.h>
4452
4453int
4454main ()
4455{
4456
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461if ac_fn_c_try_compile "$LINENO"; then :
4462 ac_cv_header_stdc=yes
4463else
4464 ac_cv_header_stdc=no
4465fi
4466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467
4468if test $ac_cv_header_stdc = yes; then
4469 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004473
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004474_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004478else
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004480fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004481rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004482
Matthias Kloseb9621712010-04-24 17:59:49 +00004483fi
4484
4485if test $ac_cv_header_stdc = yes; then
4486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488/* end confdefs.h. */
4489#include <stdlib.h>
4490
4491_ACEOF
4492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4493 $EGREP "free" >/dev/null 2>&1; then :
4494
4495else
4496 ac_cv_header_stdc=no
4497fi
4498rm -f conftest*
4499
4500fi
4501
4502if test $ac_cv_header_stdc = yes; then
4503 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4504 if test "$cross_compiling" = yes; then :
4505 :
4506else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <ctype.h>
4510#include <stdlib.h>
4511#if ((' ' & 0x0FF) == 0x020)
4512# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4513# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4514#else
4515# define ISLOWER(c) \
4516 (('a' <= (c) && (c) <= 'i') \
4517 || ('j' <= (c) && (c) <= 'r') \
4518 || ('s' <= (c) && (c) <= 'z'))
4519# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4520#endif
4521
4522#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4523int
4524main ()
4525{
4526 int i;
4527 for (i = 0; i < 256; i++)
4528 if (XOR (islower (i), ISLOWER (i))
4529 || toupper (i) != TOUPPER (i))
4530 return 2;
4531 return 0;
4532}
4533_ACEOF
4534if ac_fn_c_try_run "$LINENO"; then :
4535
4536else
4537 ac_cv_header_stdc=no
4538fi
4539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4540 conftest.$ac_objext conftest.beam conftest.$ac_ext
4541fi
4542
4543fi
4544fi
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4546$as_echo "$ac_cv_header_stdc" >&6; }
4547if test $ac_cv_header_stdc = yes; then
4548
4549$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4550
4551fi
4552
4553# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4554for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4555 inttypes.h stdint.h unistd.h
4556do :
4557 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4558ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4559"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004560if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 cat >>confdefs.h <<_ACEOF
4562#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4563_ACEOF
4564
4565fi
4566
4567done
4568
4569
4570
4571 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004572if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004573 MINIX=yes
4574else
4575 MINIX=
4576fi
4577
4578
4579 if test "$MINIX" = yes; then
4580
4581$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4582
4583
4584$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4585
4586
4587$as_echo "#define _MINIX 1" >>confdefs.h
4588
4589 fi
4590
4591
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4593$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004594if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 $as_echo_n "(cached) " >&6
4596else
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598/* end confdefs.h. */
4599
4600# define __EXTENSIONS__ 1
4601 $ac_includes_default
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610if ac_fn_c_try_compile "$LINENO"; then :
4611 ac_cv_safe_to_define___extensions__=yes
4612else
4613 ac_cv_safe_to_define___extensions__=no
4614fi
4615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616fi
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4618$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4619 test $ac_cv_safe_to_define___extensions__ = yes &&
4620 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4621
4622 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4623
4624 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4625
4626 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4627
4628 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4629
4630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004632# Check for unsupported systems
4633case $ac_sys_system/$ac_sys_release in
4634atheos*|Linux*/1*)
4635 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4636 echo See README for details.
4637 exit 1;;
4638esac
4639
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4642$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643
4644# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004645if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646 withval=$with_suffix;
4647 case $withval in
4648 no) EXEEXT=;;
4649 yes) EXEEXT=.exe;;
4650 *) EXEEXT=$withval;;
4651 esac
4652fi
4653
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4655$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656
4657# Test whether we're running on a non-case-sensitive system, in which
4658# case we give a warning if no ext is given
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4661$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004662if test ! -d CaseSensitiveTestDir; then
4663mkdir CaseSensitiveTestDir
4664fi
4665
4666if test -d casesensitivetestdir
4667then
Matthias Kloseb9621712010-04-24 17:59:49 +00004668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4669$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 BUILDEXEEXT=.exe
4671else
Matthias Kloseb9621712010-04-24 17:59:49 +00004672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674 BUILDEXEEXT=$EXEEXT
4675fi
4676rmdir CaseSensitiveTestDir
4677
4678case $MACHDEP in
4679bsdos*)
4680 case $CC in
4681 gcc) CC="$CC -D_HAVE_BSDI";;
4682 esac;;
4683esac
4684
4685case $ac_sys_system in
4686hp*|HP*)
4687 case $CC in
4688 cc|*/cc) CC="$CC -Ae";;
4689 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690esac
4691
4692
4693
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4695$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696if test -z "$LIBRARY"
4697then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004698 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4701$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004702
4703# LDLIBRARY is the name of the library to link against (as opposed to the
4704# name of the library into which to insert object files). BLDLIBRARY is also
4705# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4706# is blank as the main program is not linked directly against LDLIBRARY.
4707# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4708# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4709# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4710# DLLLIBRARY is the shared (i.e., DLL) library.
4711#
4712# RUNSHARED is used to run shared python without installed libraries
4713#
4714# INSTSONAME is the name of the shared library that will be use to install
4715# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716#
4717# LDVERSION is the shared library version number, normally the Python version
4718# with the ABI build flags appended.
4719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
4721
4722
4723
4724
4725
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727LDLIBRARY="$LIBRARY"
4728BLDLIBRARY='$(LDLIBRARY)'
4729INSTSONAME='$(LDLIBRARY)'
4730DLLLIBRARY=''
4731LDLIBRARYDIR=''
4732RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004733LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734
4735# LINKCC is the command that links the python executable -- default is $(CC).
4736# If CXX is set, and if it is needed to link a main function that was
4737# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4738# python might then depend on the C++ runtime
4739# This is altered for AIX in order to build the export list before
4740# linking.
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4743$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744if test -z "$LINKCC"
4745then
4746 LINKCC='$(PURIFY) $(MAINCC)'
4747 case $ac_sys_system in
4748 AIX*)
4749 exp_extra="\"\""
4750 if test $ac_sys_release -ge 5 -o \
4751 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4752 exp_extra="."
4753 fi
4754 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 QNX*)
4756 # qcc must be used because the other compilers do not
4757 # support -N.
4758 LINKCC=qcc;;
4759 esac
4760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4762$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763
4764# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4765# make sure we default having it set to "no": this is used by
4766# distutils.unixccompiler to know if it should add --enable-new-dtags
4767# to linker command lines, and failing to detect GNU ld simply results
4768# in the same bahaviour as before.
4769
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4771$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772ac_prog=ld
4773if test "$GCC" = yes; then
4774 ac_prog=`$CC -print-prog-name=ld`
4775fi
4776case `"$ac_prog" -V 2>&1 < /dev/null` in
4777 *GNU*)
4778 GNULD=yes;;
4779 *)
4780 GNULD=no;;
4781esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4783$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4786$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004787if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004788 $as_echo_n "(cached) " >&6
4789else
4790 ac_cv_c_inline=no
4791for ac_kw in inline __inline__ __inline; do
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793/* end confdefs.h. */
4794#ifndef __cplusplus
4795typedef int foo_t;
4796static $ac_kw foo_t static_foo () {return 0; }
4797$ac_kw foo_t foo () {return 0; }
4798#endif
4799
4800_ACEOF
4801if ac_fn_c_try_compile "$LINENO"; then :
4802 ac_cv_c_inline=$ac_kw
4803fi
4804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4805 test "$ac_cv_c_inline" != no && break
4806done
4807
4808fi
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4810$as_echo "$ac_cv_c_inline" >&6; }
4811
4812case $ac_cv_c_inline in
4813 inline | yes) ;;
4814 *)
4815 case $ac_cv_c_inline in
4816 no) ac_val=;;
4817 *) ac_val=$ac_cv_c_inline;;
4818 esac
4819 cat >>confdefs.h <<_ACEOF
4820#ifndef __cplusplus
4821#define inline $ac_val
4822#endif
4823_ACEOF
4824 ;;
4825esac
4826
4827if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004828
4829$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004830
4831
4832fi
4833
4834
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4836$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 enableval=$enable_shared;
4840fi
4841
4842
4843if test -z "$enable_shared"
4844then
4845 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004846 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 enable_shared="yes";;
4848 *)
4849 enable_shared="no";;
4850 esac
4851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4853$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4856$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859 enableval=$enable_profiling; ac_save_cc="$CC"
4860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 ac_enable_profiling="no"
4863else
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865/* end confdefs.h. */
4866int main() { return 0; }
4867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869 ac_enable_profiling="yes"
4870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875fi
4876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877 CC="$ac_save_cc"
4878fi
4879
Matthias Kloseb9621712010-04-24 17:59:49 +00004880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4881$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882
4883case "$ac_enable_profiling" in
4884 "yes")
4885 BASECFLAGS="-pg $BASECFLAGS"
4886 LDFLAGS="-pg $LDFLAGS"
4887 ;;
4888esac
4889
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4891$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892
4893# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4894# library that we build, but we do not want to link against it (we
4895# will find it with a -framework option). For this reason there is an
4896# extra variable BLDLIBRARY against which Python and the extension
4897# modules are linked, BLDLIBRARY. This is normally the same as
4898# LDLIBRARY, but empty for MacOSX framework builds.
4899if test "$enable_framework"
4900then
4901 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4902 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4903 BLDLIBRARY=''
4904else
4905 BLDLIBRARY='$(LDLIBRARY)'
4906fi
4907
4908# Other platforms follow
4909if test $enable_shared = "yes"; then
4910
Matthias Kloseb9621712010-04-24 17:59:49 +00004911$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913 case $ac_sys_system in
4914 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004915 LDLIBRARY='libpython$(LDVERSION).dll.a'
4916 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 ;;
4918 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004919 LDLIBRARY='libpython$(LDVERSION).so'
4920 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004921 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004924 then
4925 PY3LIBRARY=libpython3.so
4926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 ;;
4928 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004929 LDLIBRARY='libpython$(LDVERSION).so'
4930 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4932 case $ac_sys_system in
4933 FreeBSD*)
4934 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4935 ;;
4936 esac
4937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004939 then
4940 PY3LIBRARY=libpython3.so
4941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 ;;
4943 hp*|HP*)
4944 case `uname -m` in
4945 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 ;;
4948 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ;;
4951 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4954 ;;
4955 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004956 LDLIBRARY='libpython$(LDVERSION).so'
4957 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4959 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004961 LDLIBRARY='libpython$(LDVERSION).dylib'
4962 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4964 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004965 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004967 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4968 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969
4970 esac
4971else # shared is disabled
4972 case $ac_sys_system in
4973 CYGWIN*)
4974 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004975 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976 ;;
4977 esac
4978fi
4979
Matthias Kloseb9621712010-04-24 17:59:49 +00004980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4981$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982
4983if test -n "$ac_tool_prefix"; then
4984 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4985set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004988if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
4991 if test -n "$RANLIB"; then
4992 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4993else
4994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5001 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 break 2
5004 fi
5005done
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007IFS=$as_save_IFS
5008
5009fi
5010fi
5011RANLIB=$ac_cv_prog_RANLIB
5012if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5014$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018fi
5019
5020
5021fi
5022if test -z "$ac_cv_prog_RANLIB"; then
5023 ac_ct_RANLIB=$RANLIB
5024 # Extract the first word of "ranlib", so it can be a program name with args.
5025set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005028if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
5031 if test -n "$ac_ct_RANLIB"; then
5032 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5033else
5034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in $PATH
5036do
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5041 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 break 2
5044 fi
5045done
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047IFS=$as_save_IFS
5048
5049fi
5050fi
5051ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5052if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5054$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055else
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058fi
5059
5060 if test "x$ac_ct_RANLIB" = x; then
5061 RANLIB=":"
5062 else
5063 case $cross_compiling:$ac_tool_warned in
5064yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067ac_tool_warned=yes ;;
5068esac
5069 RANLIB=$ac_ct_RANLIB
5070 fi
5071else
5072 RANLIB="$ac_cv_prog_RANLIB"
5073fi
5074
5075
5076for ac_prog in ar aal
5077do
5078 # Extract the first word of "$ac_prog", so it can be a program name with args.
5079set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005082if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
5085 if test -n "$AR"; then
5086 ac_cv_prog_AR="$AR" # Let the user override the test.
5087else
5088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091 IFS=$as_save_IFS
5092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5095 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097 break 2
5098 fi
5099done
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101IFS=$as_save_IFS
5102
5103fi
5104fi
5105AR=$ac_cv_prog_AR
5106if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5108$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112fi
5113
5114
5115 test -n "$AR" && break
5116done
5117test -n "$AR" || AR="ar"
5118
5119
5120# tweak ARFLAGS only if the user didn't set it on the command line
5121
5122if test -z "$ARFLAGS"
5123then
5124 ARFLAGS="rc"
5125fi
5126
5127
5128# Extract the first word of "svnversion", so it can be a program name with args.
5129set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005132if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134else
5135 if test -n "$SVNVERSION"; then
5136 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5137else
5138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141 IFS=$as_save_IFS
5142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5145 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 break 2
5148 fi
5149done
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151IFS=$as_save_IFS
5152
5153 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5154fi
5155fi
5156SVNVERSION=$ac_cv_prog_SVNVERSION
5157if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5159$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160else
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5162$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163fi
5164
5165
5166if test $SVNVERSION = found
5167then
5168 SVNVERSION="svnversion \$(srcdir)"
5169else
5170 SVNVERSION="echo Unversioned directory"
5171fi
5172
Georg Brandl1ca2e792011-03-05 20:51:24 +01005173
5174
5175
5176# Extract the first word of "hg", so it can be a program name with args.
5177set dummy hg; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if ${ac_cv_prog_HAS_HG+:} false; then :
5181 $as_echo_n "(cached) " >&6
5182else
5183 if test -n "$HAS_HG"; then
5184 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5185else
5186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189 IFS=$as_save_IFS
5190 test -z "$as_dir" && as_dir=.
5191 for ac_exec_ext in '' $ac_executable_extensions; do
5192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5193 ac_cv_prog_HAS_HG="found"
5194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195 break 2
5196 fi
5197done
5198 done
5199IFS=$as_save_IFS
5200
5201 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5202fi
5203fi
5204HAS_HG=$ac_cv_prog_HAS_HG
5205if test -n "$HAS_HG"; then
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5207$as_echo "$HAS_HG" >&6; }
5208else
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
5211fi
5212
5213
5214if test $HAS_HG = found
5215then
5216 HGVERSION="hg id -i \$(srcdir)"
5217 HGTAG="hg id -t \$(srcdir)"
5218 HGBRANCH="hg id -b \$(srcdir)"
5219else
5220 HGVERSION=""
5221 HGTAG=""
5222 HGBRANCH=""
5223fi
5224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225case $MACHDEP in
5226bsdos*|hp*|HP*)
5227 # install -d does not work on BSDI or HP-UX
5228 if test -z "$INSTALL"
5229 then
5230 INSTALL="${srcdir}/install-sh -c"
5231 fi
5232esac
5233ac_aux_dir=
5234for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005235 if test -f "$ac_dir/install-sh"; then
5236 ac_aux_dir=$ac_dir
5237 ac_install_sh="$ac_aux_dir/install-sh -c"
5238 break
5239 elif test -f "$ac_dir/install.sh"; then
5240 ac_aux_dir=$ac_dir
5241 ac_install_sh="$ac_aux_dir/install.sh -c"
5242 break
5243 elif test -f "$ac_dir/shtool"; then
5244 ac_aux_dir=$ac_dir
5245 ac_install_sh="$ac_aux_dir/shtool install -c"
5246 break
5247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248done
5249if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005250 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251fi
5252
5253# These three variables are undocumented and unsupported,
5254# and are intended to be withdrawn in a future Autoconf release.
5255# They can cause serious problems if a builder's source tree is in a directory
5256# whose full name contains unusual characters.
5257ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5258ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5259ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5260
5261
5262# Find a good install program. We prefer a C program (faster),
5263# so one script is as good as another. But avoid the broken or
5264# incompatible versions:
5265# SysV /etc/install, /usr/sbin/install
5266# SunOS /usr/etc/install
5267# IRIX /sbin/install
5268# AIX /bin/install
5269# AmigaOS /C/install, which installs bootblocks on floppy discs
5270# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5271# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5272# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5273# OS/2's system install, which has a completely different semantic
5274# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005275# Reject install programs that cannot install multiple files.
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5277$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005279if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281else
5282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5283for as_dir in $PATH
5284do
5285 IFS=$as_save_IFS
5286 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 # Account for people who put trailing slashes in PATH elements.
5288case $as_dir/ in #((
5289 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005291 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 /usr/ucb/* ) ;;
5293 *)
5294 # OSF1 and SCO ODT 3.0 have their own names for install.
5295 # Don't use installbsd from OSF since it installs stuff as root
5296 # by default.
5297 for ac_prog in ginstall scoinst install; do
5298 for ac_exec_ext in '' $ac_executable_extensions; do
5299 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5300 if test $ac_prog = install &&
5301 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5302 # AIX install. It has an incompatible calling convention.
5303 :
5304 elif test $ac_prog = install &&
5305 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5306 # program-specific install script used by HP pwplus--don't use.
5307 :
5308 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005309 rm -rf conftest.one conftest.two conftest.dir
5310 echo one > conftest.one
5311 echo two > conftest.two
5312 mkdir conftest.dir
5313 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5314 test -s conftest.one && test -s conftest.two &&
5315 test -s conftest.dir/conftest.one &&
5316 test -s conftest.dir/conftest.two
5317 then
5318 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5319 break 3
5320 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 fi
5322 fi
5323 done
5324 done
5325 ;;
5326esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005327
5328 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329IFS=$as_save_IFS
5330
Matthias Kloseb9621712010-04-24 17:59:49 +00005331rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332
5333fi
5334 if test "${ac_cv_path_install+set}" = set; then
5335 INSTALL=$ac_cv_path_install
5336 else
5337 # As a last resort, use the slow shell script. Don't cache a
5338 # value for INSTALL within a source directory, because that will
5339 # break other packages using the cache if that directory is
5340 # removed, or if the value is a relative name.
5341 INSTALL=$ac_install_sh
5342 fi
5343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5345$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346
5347# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5348# It thinks the first close brace ends the variable substitution.
5349test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5350
5351test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5352
5353test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5354
5355
5356# Not every filesystem supports hard links
5357
5358if test -z "$LN" ; then
5359 case $ac_sys_system in
5360 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361 *) LN=ln;;
5362 esac
5363fi
5364
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005365# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005366
5367ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5371$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005374if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 withval=$with_pydebug;
5376if test "$withval" != no
5377then
5378
Matthias Kloseb9621712010-04-24 17:59:49 +00005379$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005384 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387fi
5388else
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391fi
5392
5393
5394# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5395# merged with this chunk of code?
5396
5397# Optimizer/debugger flags
5398# ------------------------
5399# (The following bit of code is complicated enough - please keep things
5400# indented properly. Just pretend you're editing Python code. ;-)
5401
5402# There are two parallel sets of case statements below, one that checks to
5403# see if OPT was set and one that does BASECFLAGS setting based upon
5404# compiler and platform. BASECFLAGS tweaks need to be made even if the
5405# user set OPT.
5406
5407# tweak OPT based on compiler and platform, only if the user didn't set
5408# it on the command line
5409
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005410if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411then
5412 case $GCC in
5413 yes)
5414 if test "$CC" != 'g++' ; then
5415 STRICT_PROTO="-Wstrict-prototypes"
5416 fi
5417 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5418 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5419 WRAP="-fwrapv"
5420 fi
5421 case $ac_cv_prog_cc_g in
5422 yes)
5423 if test "$Py_DEBUG" = 'true' ; then
5424 # Optimization messes up debuggers, so turn it off for
5425 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005426 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 else
5428 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5429 fi
5430 ;;
5431 *)
5432 OPT="-O3 -Wall $STRICT_PROTO"
5433 ;;
5434 esac
5435 case $ac_sys_system in
5436 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5437 ;;
5438 esac
5439 ;;
5440
5441 *)
5442 OPT="-O"
5443 ;;
5444 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445fi
5446
5447
5448
5449# The -arch flags for universal builds on OSX
5450UNIVERSAL_ARCH_FLAGS=
5451
5452
5453# tweak BASECFLAGS based on compiler and platform
5454case $GCC in
5455yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005456 # Python doesn't violate C99 aliasing rules, but older versions of
5457 # GCC produce warnings for legal Python code. Enable
5458 # -fno-strict-aliasing on versions of GCC that support but produce
5459 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5461$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462 ac_save_cc="$CC"
5463 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005464 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005465 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005467else
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005470
Matthias Kloseb159a552010-04-25 21:00:44 +00005471
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005472int
5473main ()
5474{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005475
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005476 ;
5477 return 0;
5478}
Matthias Kloseb159a552010-04-25 21:00:44 +00005479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005481if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005482
5483 CC="$ac_save_cc -fstrict-aliasing"
5484 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005486/* end confdefs.h. */
5487
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005488 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005489int
5490main ()
5491{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005492double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005493 ;
5494 return 0;
5495}
Matthias Kloseb159a552010-04-25 21:00:44 +00005496
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005498if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005499
5500 ac_cv_no_strict_aliasing=no
5501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502else
Matthias Kloseb159a552010-04-25 21:00:44 +00005503
5504 ac_cv_no_strict_aliasing=yes
5505
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005506fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005508
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005509else
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
5511 ac_cv_no_strict_aliasing=no
5512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005515fi
5516
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5520$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 then
5523 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5524 fi
5525
5526 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5527 # support. Without this, treatment of subnormals doesn't follow
5528 # the standard.
5529 case $ac_sys_machine in
5530 alpha*)
5531 BASECFLAGS="$BASECFLAGS -mieee"
5532 ;;
5533 esac
5534
5535 case $ac_sys_system in
5536 SCO_SV*)
5537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5538 ;;
5539 # is there any other compiler on Darwin besides gcc?
5540 Darwin*)
5541 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5542 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005543 if test "${CC}" = gcc
5544 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5546$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005547 case "${UNIVERSALSDK}" in
5548 */MacOSX10.4u.sdk)
5549 # Build using 10.4 SDK, force usage of gcc when the
5550 # compiler is gcc, otherwise the user will get very
5551 # confusing error messages when building on OSX 10.6
5552 CC=gcc-4.0
5553 CPP=cpp-4.0
5554 ;;
5555 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5557$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005558 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559
5560
5561 if test "${enable_universalsdk}"; then
5562 UNIVERSAL_ARCH_FLAGS=""
5563 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5564 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5565 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005566 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5568 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005569 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005570 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5573 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005574 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005575 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005577 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5578 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005579 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005580 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005581
5582 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5583 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005584 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005585 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005588 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 +00005589
5590 fi
5591
5592
Ronald Oussoren666028b2010-04-18 19:07:43 +00005593 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5594 if test "${UNIVERSALSDK}" != "/"
5595 then
5596 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5597 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005598 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 fi
5600 fi
5601
5602 # Calculate the right deployment target for this build.
5603 #
5604 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5605 if test ${cur_target} '>' 10.2; then
5606 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005607 if test ${enable_universalsdk}; then
5608 if test "${UNIVERSAL_ARCHS}" = "all"; then
5609 # Ensure that the default platform for a
5610 # 4-way universal build is OSX 10.5,
5611 # that's the first OS release where
5612 # 4-way builds make sense.
5613 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005614
5615 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5616 cur_target='10.5'
5617
5618 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5619 cur_target='10.5'
5620
5621 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5622 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005623 fi
5624 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005625 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005626 # On Intel macs default to a deployment
5627 # target of 10.4, that's the first OSX
5628 # release with Intel support.
5629 cur_target="10.4"
5630 fi
5631 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 fi
5633 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5634
5635 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5636 # environment with a value that is the same as what we'll use
5637 # in the Makefile to ensure that we'll get the same compiler
5638 # environment during configure and build time.
5639 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5640 export MACOSX_DEPLOYMENT_TARGET
5641 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5642
5643 ;;
5644 OSF*)
5645 BASECFLAGS="$BASECFLAGS -mieee"
5646 ;;
5647 esac
5648 ;;
5649
5650*)
5651 case $ac_sys_system in
5652 OpenUNIX*|UnixWare*)
5653 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5654 ;;
5655 OSF*)
5656 BASECFLAGS="$BASECFLAGS -ieee -std"
5657 ;;
5658 SCO_SV*)
5659 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5660 ;;
5661 esac
5662 ;;
5663esac
5664
5665if test "$Py_DEBUG" = 'true'; then
5666 :
5667else
5668 OPT="-DNDEBUG $OPT"
5669fi
5670
5671if test "$ac_arch_flags"
5672then
5673 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5674fi
5675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676# Check whether GCC supports PyArg_ParseTuple format
5677if test "$GCC" = "yes"
5678then
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5680$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 save_CFLAGS=$CFLAGS
5682 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684/* end confdefs.h. */
5685
5686 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687int
5688main ()
5689{
5690
5691 ;
5692 return 0;
5693}
Matthias Kloseb159a552010-04-25 21:00:44 +00005694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
Matthias Kloseb159a552010-04-25 21:00:44 +00005698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
Matthias Kloseb159a552010-04-25 21:00:44 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005702$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704else
Matthias Kloseb159a552010-04-25 21:00:44 +00005705
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005707$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711 CFLAGS=$save_CFLAGS
5712fi
5713
5714# On some compilers, pthreads are available without further options
5715# (e.g. MacOS X). On some of these systems, the compiler will not
5716# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5717# So we have to see first whether pthreads are available without
5718# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5720$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005721if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 ac_cv_pthread_is_default=no
5726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728/* end confdefs.h. */
5729
5730#include <pthread.h>
5731
5732void* routine(void* p){return NULL;}
5733
5734int main(){
5735 pthread_t p;
5736 if(pthread_create(&p,NULL,routine,NULL)!=0)
5737 return 1;
5738 (void)pthread_detach(p);
5739 return 0;
5740}
5741
5742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745 ac_cv_pthread_is_default=yes
5746 ac_cv_kthread=no
5747 ac_cv_pthread=no
5748
5749else
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754fi
5755
5756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757fi
5758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5760$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762
5763if test $ac_cv_pthread_is_default = yes
5764then
5765 ac_cv_kpthread=no
5766else
5767# -Kpthread, if available, provides the right #defines
5768# and linker options to make pthread_create available
5769# Some compilers won't report that they do not support -Kpthread,
5770# so we need to run a program to see whether it really made the
5771# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5773$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005774if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776else
5777 ac_save_cc="$CC"
5778CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005779if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 ac_cv_kpthread=no
5781else
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783/* end confdefs.h. */
5784
5785#include <pthread.h>
5786
5787void* routine(void* p){return NULL;}
5788
5789int main(){
5790 pthread_t p;
5791 if(pthread_create(&p,NULL,routine,NULL)!=0)
5792 return 1;
5793 (void)pthread_detach(p);
5794 return 0;
5795}
5796
5797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005798if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ac_cv_kpthread=yes
5800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805fi
5806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807CC="$ac_save_cc"
5808fi
5809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5811$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812fi
5813
5814if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5815then
5816# -Kthread, if available, provides the right #defines
5817# and linker options to make pthread_create available
5818# Some compilers won't report that they do not support -Kthread,
5819# so we need to run a program to see whether it really made the
5820# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5822$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005823if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825else
5826 ac_save_cc="$CC"
5827CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 ac_cv_kthread=no
5830else
Matthias Kloseb9621712010-04-24 17:59:49 +00005831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832/* end confdefs.h. */
5833
5834#include <pthread.h>
5835
5836void* routine(void* p){return NULL;}
5837
5838int main(){
5839 pthread_t p;
5840 if(pthread_create(&p,NULL,routine,NULL)!=0)
5841 return 1;
5842 (void)pthread_detach(p);
5843 return 0;
5844}
5845
5846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 ac_cv_kthread=yes
5849else
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856CC="$ac_save_cc"
5857fi
5858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5860$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
5863if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5864then
5865# -pthread, if available, provides the right #defines
5866# and linker options to make pthread_create available
5867# Some compilers won't report that they do not support -pthread,
5868# so we need to run a program to see whether it really made the
5869# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5871$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005872if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005873 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874else
5875 ac_save_cc="$CC"
5876CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005877if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ac_cv_pthread=no
5879else
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881/* end confdefs.h. */
5882
5883#include <pthread.h>
5884
5885void* routine(void* p){return NULL;}
5886
5887int main(){
5888 pthread_t p;
5889 if(pthread_create(&p,NULL,routine,NULL)!=0)
5890 return 1;
5891 (void)pthread_detach(p);
5892 return 0;
5893}
5894
5895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ac_cv_pthread=yes
5898else
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903fi
5904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905CC="$ac_save_cc"
5906fi
5907
Matthias Kloseb9621712010-04-24 17:59:49 +00005908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5909$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
5911
5912# If we have set a CC compiler flag for thread support then
5913# check if it works for CXX, too.
5914ac_cv_cxx_thread=no
5915if test ! -z "$CXX"
5916then
Matthias Kloseb9621712010-04-24 17:59:49 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5918$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919ac_save_cxx="$CXX"
5920
5921if test "$ac_cv_kpthread" = "yes"
5922then
5923 CXX="$CXX -Kpthread"
5924 ac_cv_cxx_thread=yes
5925elif test "$ac_cv_kthread" = "yes"
5926then
5927 CXX="$CXX -Kthread"
5928 ac_cv_cxx_thread=yes
5929elif test "$ac_cv_pthread" = "yes"
5930then
5931 CXX="$CXX -pthread"
5932 ac_cv_cxx_thread=yes
5933fi
5934
5935if test $ac_cv_cxx_thread = yes
5936then
5937 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5938 $CXX -c conftest.$ac_ext 2>&5
5939 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5940 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5941 then
5942 ac_cv_cxx_thread=yes
5943 else
5944 ac_cv_cxx_thread=no
5945 fi
5946 rm -fr conftest*
5947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5949$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950fi
5951CXX="$ac_save_cxx"
5952
5953
5954# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5956$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005957if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961/* end confdefs.h. */
5962#include <stdlib.h>
5963#include <stdarg.h>
5964#include <string.h>
5965#include <float.h>
5966
5967int
5968main ()
5969{
5970
5971 ;
5972 return 0;
5973}
5974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005975if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ac_cv_header_stdc=yes
5977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5981
5982if test $ac_cv_header_stdc = yes; then
5983 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985/* end confdefs.h. */
5986#include <string.h>
5987
5988_ACEOF
5989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $EGREP "memchr" >/dev/null 2>&1; then :
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992else
5993 ac_cv_header_stdc=no
5994fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005995rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996
5997fi
5998
5999if test $ac_cv_header_stdc = yes; then
6000 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002/* end confdefs.h. */
6003#include <stdlib.h>
6004
6005_ACEOF
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $EGREP "free" >/dev/null 2>&1; then :
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 ac_cv_header_stdc=no
6011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006012rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
6014fi
6015
6016if test $ac_cv_header_stdc = yes; then
6017 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019 :
6020else
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022/* end confdefs.h. */
6023#include <ctype.h>
6024#include <stdlib.h>
6025#if ((' ' & 0x0FF) == 0x020)
6026# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6027# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6028#else
6029# define ISLOWER(c) \
6030 (('a' <= (c) && (c) <= 'i') \
6031 || ('j' <= (c) && (c) <= 'r') \
6032 || ('s' <= (c) && (c) <= 'z'))
6033# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6034#endif
6035
6036#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6037int
6038main ()
6039{
6040 int i;
6041 for (i = 0; i < 256; i++)
6042 if (XOR (islower (i), ISLOWER (i))
6043 || toupper (i) != TOUPPER (i))
6044 return 2;
6045 return 0;
6046}
6047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006048if ac_fn_c_try_run "$LINENO"; then :
6049
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050else
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6060$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061if test $ac_cv_header_stdc = yes; then
6062
Matthias Kloseb9621712010-04-24 17:59:49 +00006063$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064
6065fi
6066
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006067for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6068fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006069ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006070shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006071unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006072sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6073sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006074sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006075sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006076sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006077sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006078bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006079do :
6080 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6081ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006082if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006085_ACEOF
6086
6087fi
6088
Guido van Rossum627b2d71993-12-24 10:39:16 +00006089done
6090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006092for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6095$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006096if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006098else
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101#include <sys/types.h>
6102#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006103
Martin v. Löwis11437992002-04-12 09:54:03 +00006104int
6105main ()
6106{
6107if ((DIR *) 0)
6108return 0;
6109 ;
6110 return 0;
6111}
6112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006114 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006120eval ac_res=\$$as_ac_Header
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6122$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006123if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006124 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006125#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006126_ACEOF
6127
6128ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006129fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006131done
6132# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6133if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6135$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006136if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138else
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143/* Override any GCC internal prototype to avoid an error.
6144 Use char because int might match the return type of a GCC
6145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006146#ifdef __cplusplus
6147extern "C"
6148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006149char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006150int
6151main ()
6152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006154 ;
6155 return 0;
6156}
6157_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158for ac_lib in '' dir; do
6159 if test -z "$ac_lib"; then
6160 ac_res="none required"
6161 else
6162 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006168rm -f core conftest.err conftest.$ac_objext \
6169 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006170 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006174if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176else
6177 ac_cv_search_opendir=no
6178fi
6179rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006180LIBS=$ac_func_search_save_LIBS
6181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6183$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006185if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006189
Michael W. Hudson54241132001-12-07 15:38:26 +00006190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6192$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006193if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006195else
6196 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006200/* Override any GCC internal prototype to avoid an error.
6201 Use char because int might match the return type of a GCC
6202 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006203#ifdef __cplusplus
6204extern "C"
6205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006206char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006207int
6208main ()
6209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006211 ;
6212 return 0;
6213}
6214_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006215for ac_lib in '' x; do
6216 if test -z "$ac_lib"; then
6217 ac_res="none required"
6218 else
6219 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006220 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006225rm -f core conftest.err conftest.$ac_objext \
6226 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006227 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006231if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233else
6234 ac_cv_search_opendir=no
6235fi
6236rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006237LIBS=$ac_func_search_save_LIBS
6238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6240$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006242if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006245fi
6246
6247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6250$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006251if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253else
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006255/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257int
6258main ()
6259{
6260return makedev(0, 0);
6261 ;
6262 return 0;
6263}
6264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 ac_cv_header_sys_types_h_makedev=yes
6267else
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006270rm -f core conftest.err conftest.$ac_objext \
6271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272
6273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6275$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276
6277if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006278ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006279if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283fi
6284
6285
6286
6287 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006289if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293fi
6294
6295
6296 fi
6297fi
6298
Michael W. Hudson54241132001-12-07 15:38:26 +00006299
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006300# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006302do :
6303 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006304#ifdef HAVE_CURSES_H
6305#include <curses.h>
6306#endif
6307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006309if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006311#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006312_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006314fi
6315
6316done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006317
6318
Martin v. Löwis11017b12006-01-14 18:12:57 +00006319# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006320for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006321do :
6322 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 +00006323#ifdef HAVE_ASM_TYPES_H
6324#include <asm/types.h>
6325#endif
6326#ifdef HAVE_SYS_SOCKET_H
6327#include <sys/socket.h>
6328#endif
6329
Matthias Kloseb9621712010-04-24 17:59:49 +00006330"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006331if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006333#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006334_ACEOF
6335
6336fi
6337
6338done
6339
6340
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006342was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6344$as_echo_n "checking for clock_t in time.h... " >&6; }
6345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006347#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006348
6349_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006351 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006352 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353else
Martin v. Löwis11437992002-04-12 09:54:03 +00006354
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006357
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006358
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006360rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6363$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006364
Neal Norwitz11690112002-07-30 01:08:28 +00006365# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6367$as_echo_n "checking for makedev... " >&6; }
6368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006369/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006370
Jesus Cea740f53a2010-04-28 11:35:30 +00006371#if defined(MAJOR_IN_MKDEV)
6372#include <sys/mkdev.h>
6373#elif defined(MAJOR_IN_SYSMACROS)
6374#include <sys/sysmacros.h>
6375#else
6376#include <sys/types.h>
6377#endif
6378
Neal Norwitz11690112002-07-30 01:08:28 +00006379int
6380main ()
6381{
Jesus Cea740f53a2010-04-28 11:35:30 +00006382
6383 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006384 ;
6385 return 0;
6386}
Matthias Kloseb159a552010-04-25 21:00:44 +00006387
Neal Norwitz11690112002-07-30 01:08:28 +00006388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006389if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006390 ac_cv_has_makedev=yes
6391else
Matthias Kloseb9621712010-04-24 17:59:49 +00006392 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006394rm -f core conftest.err conftest.$ac_objext \
6395 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006396if test "$ac_cv_has_makedev" = "no"; then
6397 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006400
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006401#define _OSF_SOURCE 1
6402#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006403
Neal Norwitz11690112002-07-30 01:08:28 +00006404int
6405main ()
6406{
6407 makedev(0, 0)
6408 ;
6409 return 0;
6410}
6411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006412if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006413 ac_cv_has_makedev=yes
6414else
Matthias Kloseb9621712010-04-24 17:59:49 +00006415 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006417rm -f core conftest.err conftest.$ac_objext \
6418 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006419 if test "$ac_cv_has_makedev" = "yes"; then
6420
Matthias Kloseb9621712010-04-24 17:59:49 +00006421$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006422
6423 fi
6424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6426$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006427if test "$ac_cv_has_makedev" = "yes"; then
6428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006430
6431fi
6432
Martin v. Löwis399a6892002-10-04 10:22:02 +00006433# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6434# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6435# defined, but the compiler does not support pragma redefine_extname,
6436# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6437# structures (such as rlimit64) without declaring them. As a
6438# work-around, disable LFS on such configurations
6439
6440use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6442$as_echo_n "checking Solaris LFS bug... " >&6; }
6443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006444/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006445
6446#define _LARGEFILE_SOURCE 1
6447#define _FILE_OFFSET_BITS 64
6448#include <sys/resource.h>
6449
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450int
6451main ()
6452{
6453struct rlimit foo;
6454 ;
6455 return 0;
6456}
6457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006459 sol_lfs_bug=no
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6465$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006466if test "$sol_lfs_bug" = "yes"; then
6467 use_lfs=no
6468fi
6469
6470if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006471# Two defines needed to enable largefile support on various platforms
6472# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006473case $ac_sys_system/$ac_sys_release in
6474AIX*)
6475
6476$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6477
6478 ;;
6479esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006480
Matthias Kloseb9621712010-04-24 17:59:49 +00006481$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006485
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006487
Guido van Rossum84e7b241996-08-19 21:59:00 +00006488# Add some code to confdefs.h so that the test for off_t works on SCO
6489cat >> confdefs.h <<\EOF
6490#if defined(SCO_DS)
6491#undef _OFF_T
6492#endif
6493EOF
6494
Guido van Rossumef2255b2000-03-10 22:30:29 +00006495# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006496ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006497if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006498
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006499else
Martin v. Löwis11437992002-04-12 09:54:03 +00006500
6501cat >>confdefs.h <<_ACEOF
6502#define mode_t int
6503_ACEOF
6504
6505fi
6506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006508if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510else
Martin v. Löwis11437992002-04-12 09:54:03 +00006511
6512cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006513#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006514_ACEOF
6515
6516fi
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006519if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523cat >>confdefs.h <<_ACEOF
6524#define pid_t int
6525_ACEOF
6526
6527fi
6528
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006529
Martin v. Löwis11437992002-04-12 09:54:03 +00006530cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006531#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Matthias Kloseb9621712010-04-24 17:59:49 +00006534ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006535if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006537else
Martin v. Löwis11437992002-04-12 09:54:03 +00006538
6539cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006541_ACEOF
6542
6543fi
6544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6546$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006547if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006549else
Matthias Kloseb9621712010-04-24 17:59:49 +00006550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006551/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006557 ac_cv_type_uid_t=yes
6558else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559 ac_cv_type_uid_t=no
6560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006561rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6565$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006566if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570
Matthias Kloseb9621712010-04-24 17:59:49 +00006571$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572
6573fi
6574
Matthias Kloseb9621712010-04-24 17:59:49 +00006575ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6576case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006577 no|yes) ;; #(
6578 *)
6579
Matthias Kloseb9621712010-04-24 17:59:49 +00006580$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006581
6582
6583cat >>confdefs.h <<_ACEOF
6584#define uint32_t $ac_cv_c_uint32_t
6585_ACEOF
6586;;
6587 esac
6588
Matthias Kloseb9621712010-04-24 17:59:49 +00006589ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6590case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006591 no|yes) ;; #(
6592 *)
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006595
6596
6597cat >>confdefs.h <<_ACEOF
6598#define uint64_t $ac_cv_c_uint64_t
6599_ACEOF
6600;;
6601 esac
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6604case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006605 no|yes) ;; #(
6606 *)
6607
6608cat >>confdefs.h <<_ACEOF
6609#define int32_t $ac_cv_c_int32_t
6610_ACEOF
6611;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006612esac
6613
Matthias Kloseb9621712010-04-24 17:59:49 +00006614ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6615case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006616 no|yes) ;; #(
6617 *)
6618
6619cat >>confdefs.h <<_ACEOF
6620#define int64_t $ac_cv_c_int64_t
6621_ACEOF
6622;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006623esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006624
Matthias Kloseb9621712010-04-24 17:59:49 +00006625ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006626if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627
Matthias Kloseb9621712010-04-24 17:59:49 +00006628$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006629
6630fi
6631
Jack Jansendd19cf82001-12-06 22:36:17 +00006632
Michael W. Hudson54241132001-12-07 15:38:26 +00006633# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006634# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635# The cast to long int works around a bug in the HP C Compiler
6636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6640$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006641if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 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 +00006645
Martin v. Löwis11437992002-04-12 09:54:03 +00006646else
Matthias Kloseb9621712010-04-24 17:59:49 +00006647 if test "$ac_cv_type_int" = yes; then
6648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006650as_fn_error 77 "cannot compute sizeof (int)
6651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652 else
6653 ac_cv_sizeof_int=0
6654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6659$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006660
6661
6662
Martin v. Löwis11437992002-04-12 09:54:03 +00006663cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006664#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006665_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006666
6667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006668# The cast to long int works around a bug in the HP C Compiler
6669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6673$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006674if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 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 +00006678
Martin v. Löwis11437992002-04-12 09:54:03 +00006679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 if test "$ac_cv_type_long" = yes; then
6681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006683as_fn_error 77 "cannot compute sizeof (long)
6684See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685 else
6686 ac_cv_sizeof_long=0
6687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6692$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006693
6694
6695
Martin v. Löwis11437992002-04-12 09:54:03 +00006696cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006697#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006698_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006699
6700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701# The cast to long int works around a bug in the HP C Compiler
6702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6706$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006707if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 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 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 if test "$ac_cv_type_void_p" = yes; then
6714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006716as_fn_error 77 "cannot compute sizeof (void *)
6717See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718 else
6719 ac_cv_sizeof_void_p=0
6720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6725$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006732
6733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734# The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6739$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006740if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 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 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 if test "$ac_cv_type_short" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006749as_fn_error 77 "cannot compute sizeof (short)
6750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751 else
6752 ac_cv_sizeof_short=0
6753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6758$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006759
6760
6761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006764_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006765
6766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006767# The cast to long int works around a bug in the HP C Compiler
6768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6772$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006773if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 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 +00006777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 if test "$ac_cv_type_float" = yes; then
6780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006782as_fn_error 77 "cannot compute sizeof (float)
6783See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784 else
6785 ac_cv_sizeof_float=0
6786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6791$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792
6793
6794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006796#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006797_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006798
6799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800# The cast to long int works around a bug in the HP C Compiler
6801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6803# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6805$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006806if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 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 +00006810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811else
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 if test "$ac_cv_type_double" = yes; then
6813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006815as_fn_error 77 "cannot compute sizeof (double)
6816See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817 else
6818 ac_cv_sizeof_double=0
6819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6824$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006825
6826
6827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006831
6832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006833# The cast to long int works around a bug in the HP C Compiler
6834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6836# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6838$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006839if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006841else
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 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 +00006843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 if test "$ac_cv_type_fpos_t" = yes; then
6846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006848as_fn_error 77 "cannot compute sizeof (fpos_t)
6849See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850 else
6851 ac_cv_sizeof_fpos_t=0
6852 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6857$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006858
6859
6860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006862#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006863_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006864
Michael W. Hudson54241132001-12-07 15:38:26 +00006865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866# The cast to long int works around a bug in the HP C Compiler
6867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6869# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6871$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006872if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006873 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 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 +00006876
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877else
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 if test "$ac_cv_type_size_t" = yes; then
6879 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006881as_fn_error 77 "cannot compute sizeof (size_t)
6882See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883 else
6884 ac_cv_sizeof_size_t=0
6885 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006887
Martin v. Löwis18e16552006-02-15 17:27:45 +00006888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6890$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891
6892
6893
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894cat >>confdefs.h <<_ACEOF
6895#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6896_ACEOF
6897
6898
Christian Heimes400adb02008-02-01 08:12:03 +00006899# The cast to long int works around a bug in the HP C Compiler
6900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6902# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6904$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006905if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 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 +00006909
Christian Heimes400adb02008-02-01 08:12:03 +00006910else
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 if test "$ac_cv_type_pid_t" = yes; then
6912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006914as_fn_error 77 "cannot compute sizeof (pid_t)
6915See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006916 else
6917 ac_cv_sizeof_pid_t=0
6918 fi
6919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006920
Christian Heimes400adb02008-02-01 08:12:03 +00006921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6923$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006924
6925
6926
6927cat >>confdefs.h <<_ACEOF
6928#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6929_ACEOF
6930
6931
Michael W. Hudson54241132001-12-07 15:38:26 +00006932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6934$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006937/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006942long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
6949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006951
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006952 have_long_long=yes
6953
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6957$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006958if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6964$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006965if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 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 +00006969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_long_long" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006974as_fn_error 77 "cannot compute sizeof (long long)
6975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976 else
6977 ac_cv_sizeof_long_long=0
6978 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6983$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984
6985
6986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006988#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006989_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006990
Michael W. Hudson54241132001-12-07 15:38:26 +00006991
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006992fi
6993
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6995$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006996have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006998/* end confdefs.h. */
6999
7000int
7001main ()
7002{
7003long double x; x = (long double)0;
7004 ;
7005 return 0;
7006}
7007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007008if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007009
7010
Matthias Kloseb9621712010-04-24 17:59:49 +00007011$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007012
7013 have_long_double=yes
7014
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007015fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7018$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007020# The cast to long int works around a bug in the HP C Compiler
7021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7025$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007026if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 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 +00007030
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 if test "$ac_cv_type_long_double" = yes; then
7033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007035as_fn_error 77 "cannot compute sizeof (long double)
7036See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037 else
7038 ac_cv_sizeof_long_double=0
7039 fi
7040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007041
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7044$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007045
7046
7047
7048cat >>confdefs.h <<_ACEOF
7049#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7050_ACEOF
7051
7052
7053fi
7054
7055
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7057$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007058have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007060/* end confdefs.h. */
7061
7062int
7063main ()
7064{
7065_Bool x; x = (_Bool)0;
7066 ;
7067 return 0;
7068}
7069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007070if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007071
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007074
7075 have_c99_bool=yes
7076
Thomas Woutersb2137042007-02-01 18:02:27 +00007077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7080$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007081if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082# The cast to long int works around a bug in the HP C Compiler
7083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7087$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007088if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 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 +00007092
Thomas Woutersb2137042007-02-01 18:02:27 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type__Bool" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007097as_fn_error 77 "cannot compute sizeof (_Bool)
7098See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 else
7100 ac_cv_sizeof__Bool=0
7101 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Thomas Woutersb2137042007-02-01 18:02:27 +00007104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7106$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107
7108
7109
Thomas Woutersb2137042007-02-01 18:02:27 +00007110cat >>confdefs.h <<_ACEOF
7111#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7112_ACEOF
7113
7114
7115fi
7116
Matthias Kloseb9621712010-04-24 17:59:49 +00007117ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118 #include <stdint.h>
7119 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007120 #ifdef HAVE_INTTYPES_H
7121 #include <inttypes.h>
7122 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007123"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007124if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007125
7126cat >>confdefs.h <<_ACEOF
7127#define HAVE_UINTPTR_T 1
7128_ACEOF
7129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130# The cast to long int works around a bug in the HP C Compiler
7131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7135$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007136if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 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 +00007140
Martin v. Löwis11437992002-04-12 09:54:03 +00007141else
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 if test "$ac_cv_type_uintptr_t" = yes; then
7143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007145as_fn_error 77 "cannot compute sizeof (uintptr_t)
7146See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147 else
7148 ac_cv_sizeof_uintptr_t=0
7149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7154$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155
7156
7157
Martin v. Löwis11437992002-04-12 09:54:03 +00007158cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007159#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007160_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007161
Michael W. Hudson54241132001-12-07 15:38:26 +00007162
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007163fi
7164
Thomas Wouters89f507f2006-12-13 04:49:30 +00007165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166# The cast to long int works around a bug in the HP C Compiler
7167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7171$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007172if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176#ifdef HAVE_SYS_TYPES_H
7177#include <sys/types.h>
7178#endif
7179
Matthias Kloseb9621712010-04-24 17:59:49 +00007180"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 if test "$ac_cv_type_off_t" = yes; then
7184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007186as_fn_error 77 "cannot compute sizeof (off_t)
7187See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188 else
7189 ac_cv_sizeof_off_t=0
7190 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7195$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
7198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007200#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007202
Michael W. Hudson54241132001-12-07 15:38:26 +00007203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7206$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007207if test "$have_long_long" = yes
7208then
7209if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007210 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7215$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216else
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7218$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007219fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007220else
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007223fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225# The cast to long int works around a bug in the HP C Compiler
7226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7230$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007231if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235#ifdef HAVE_SYS_TYPES_H
7236#include <sys/types.h>
7237#endif
7238#ifdef HAVE_TIME_H
7239#include <time.h>
7240#endif
7241
Matthias Kloseb9621712010-04-24 17:59:49 +00007242"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 if test "$ac_cv_type_time_t" = yes; then
7246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007248as_fn_error 77 "cannot compute sizeof (time_t)
7249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250 else
7251 ac_cv_sizeof_time_t=0
7252 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7257$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
7260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007262#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007264
Michael W. Hudson54241132001-12-07 15:38:26 +00007265
7266
Trent Mick635f6fb2000-08-23 21:33:05 +00007267# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007268ac_save_cc="$CC"
7269if test "$ac_cv_kpthread" = "yes"
7270then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007271elif test "$ac_cv_kthread" = "yes"
7272then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007273elif test "$ac_cv_pthread" = "yes"
7274then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007275fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7278$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007279have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007281/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007282
7283 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007284int
7285main ()
7286{
Guido van Rossum12580492000-09-24 16:47:19 +00007287pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 ;
7289 return 0;
7290}
Matthias Kloseb159a552010-04-25 21:00:44 +00007291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007294 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7298$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007299if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7303# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7305$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007306if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007308else
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310#ifdef HAVE_PTHREAD_H
7311#include <pthread.h>
7312#endif
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$ac_cv_type_pthread_t" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007320as_fn_error 77 "cannot compute sizeof (pthread_t)
7321See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322 else
7323 ac_cv_sizeof_pthread_t=0
7324 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Trent Mick635f6fb2000-08-23 21:33:05 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7329$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331
7332
Martin v. Löwis11437992002-04-12 09:54:03 +00007333cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007334#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007335_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337
Trent Mick635f6fb2000-08-23 21:33:05 +00007338fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007339CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007340
Michael W. Hudson54241132001-12-07 15:38:26 +00007341
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007342case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007343 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007344 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7345 ;;
7346 Darwin/*)
7347 OTHER_LIBTOOL_OPT=""
7348 ;;
7349esac
7350
7351
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352ARCH_RUN_32BIT=""
7353
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007354case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007355 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007356 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7357 if test "${enable_universalsdk}"; then
7358 :
7359 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007360 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007361 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007364 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007365 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007366 if test ${gcc_version} '<' 4.0
7367 then
7368 LIBTOOL_CRUFT="-lcc_dynamic"
7369 else
7370 LIBTOOL_CRUFT=""
7371 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007373 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007374else
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007377
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378 #include <unistd.h>
7379 int main(int argc, char*argv[])
7380 {
7381 if (sizeof(long) == 4) {
7382 return 0;
7383 } else {
7384 return 1;
7385 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007386 }
7387
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390 ac_osx_32bit=yes
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396fi
7397
7398
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007399 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007400 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 i386)
7402 MACOSX_DEFAULT_ARCH="i386"
7403 ;;
7404 ppc)
7405 MACOSX_DEFAULT_ARCH="ppc"
7406 ;;
7407 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007408 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409 ;;
7410 esac
7411 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007412 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413 i386)
7414 MACOSX_DEFAULT_ARCH="x86_64"
7415 ;;
7416 ppc)
7417 MACOSX_DEFAULT_ARCH="ppc64"
7418 ;;
7419 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007420 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007421 ;;
7422 esac
7423
7424 #ARCH_RUN_32BIT="true"
7425 fi
7426
7427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007430esac
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7433$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007434if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007435then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007436 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007438 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007444 if test $enable_shared = "yes"
7445 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007446 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 +00007447 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7454$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007455case $ac_sys_system/$ac_sys_release in
7456 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7461$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007462 ;;
7463 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007466 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007467esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007468
Guido van Rossum0a516c91994-09-12 10:58:40 +00007469# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007470
Michael W. Hudson54241132001-12-07 15:38:26 +00007471
7472
7473
7474
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476
Georg Brandlb1441c72009-01-03 22:33:39 +00007477
Thomas Wouters477c8d52006-05-27 19:21:47 +00007478cat >>confdefs.h <<_ACEOF
7479#define SHLIB_EXT "$SO"
7480_ACEOF
7481
Guido van Rossum0a516c91994-09-12 10:58:40 +00007482# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007483# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484# (Shared libraries in this instance are shared modules to be loaded into
7485# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7487$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007488if test -z "$LDSHARED"
7489then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007490 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007491 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007492 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007493 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007494 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007495 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007496 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007497 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 if test "$GCC" = "yes" ; then
7499 LDSHARED='$(CC) -shared'
7500 LDCXXSHARED='$(CXX) -shared'
7501 else
7502 LDSHARED='$(CC) -G'
7503 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007504 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007505 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 if test "$GCC" = "yes" ; then
7507 LDSHARED='$(CC) -shared'
7508 LDCXXSHARED='$(CXX) -shared'
7509 else
7510 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007511 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007512 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007513 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007514 LDSHARED='$(CC) -bundle'
7515 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 if test "$enable_framework" ; then
7517 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007518 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7519 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007521 else
7522 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007523 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007525 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007526 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED='$(CC) -bundle'
7528 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007529 if test "$enable_framework" ; then
7530 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007531 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7532 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007533 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007534 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007535 # No framework, use the Python app as bundle-loader
7536 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007537 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007539 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 Darwin/*)
7541 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7542 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007543
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007544 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007545 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007546 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007547 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007548 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007549 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7550 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007552 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007553 LDSHARED='$(CC) -bundle'
7554 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 if test "$enable_framework" ; then
7556 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007557 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7558 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007560 else
7561 # No framework, use the Python app as bundle-loader
7562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 fi
7566 fi
7567 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568 Linux*|GNU*|QNX*)
7569 LDSHARED='$(CC) -shared'
7570 LDCXXSHARED='$(CXX) -shared';;
7571 BSD/OS*/4*)
7572 LDSHARED="gcc -shared"
7573 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007574 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007575 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007576 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007577 LDSHARED='$(CC) -shared'
7578 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007579 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007580 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007581 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007582 OpenBSD*)
7583 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7584 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007585 LDSHARED='$(CC) -shared $(CCSHARED)'
7586 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007587 else
7588 case `uname -r` in
7589 [01].* | 2.[0-7] | 2.[0-7].*)
7590 LDSHARED="ld -Bshareable ${LDFLAGS}"
7591 ;;
7592 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007593 LDSHARED='$(CC) -shared $(CCSHARED)'
7594 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007595 ;;
7596 esac
7597 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007598 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007599 LDSHARED='$(CC) -shared'
7600 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007601 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007602 if test "$GCC" = "yes" ; then
7603 LDSHARED='$(CC) -shared'
7604 LDCXXSHARED='$(CXX) -shared'
7605 else
7606 LDSHARED='$(CC) -G'
7607 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007608 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 SCO_SV*)
7610 LDSHARED='$(CC) -Wl,-G,-Bexport'
7611 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7612 CYGWIN*)
7613 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7614 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007615 *) LDSHARED="ld";;
7616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7619$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007621BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007623# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7625$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007626if test -z "$CCSHARED"
7627then
Guido van Rossum07397971997-04-29 21:49:50 +00007628 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007629 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007630 then CCSHARED="-fPIC";
7631 elif test `uname -p` = sparc;
7632 then CCSHARED="-xcode=pic32";
7633 else CCSHARED="-Kpic";
7634 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007635 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007636 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007637 else CCSHARED="+z";
7638 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007639 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007640 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007641 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007642 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007643 if test "$GCC" = "yes"
7644 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007645 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007646 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007647 SCO_SV*)
7648 if test "$GCC" = "yes"
7649 then CCSHARED="-fPIC"
7650 else CCSHARED="-Kpic -belf"
7651 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007652 IRIX*/6*) case $CC in
7653 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007654 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007655 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7659$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007660# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007661# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7663$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007664if test -z "$LINKFORSHARED"
7665then
Guido van Rossum07397971997-04-29 21:49:50 +00007666 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007667 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007668 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007669 LINKFORSHARED="-Wl,-E -Wl,+s";;
7670# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007671 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007672 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007673 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007675 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007676 if test "$enable_framework"
7677 then
Jack Jansenda49e192005-01-07 13:08:22 +00007678 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007679 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007680 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007681 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007682 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007683 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007684 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007685 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7686 then
7687 LINKFORSHARED="-Wl,--export-dynamic"
7688 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007689 SunOS/5*) case $CC in
7690 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007691 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007692 then
7693 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007694 fi;;
7695 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007696 CYGWIN*)
7697 if test $enable_shared = "no"
7698 then
7699 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7700 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007701 QNX*)
7702 # -Wl,-E causes the symbols to be added to the dynamic
7703 # symbol table so that they can be found when a module
7704 # is loaded. -N 2048K causes the stack size to be set
7705 # to 2048 kilobytes so that the stack doesn't overflow
7706 # when running test_compile.py.
7707 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7711$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712
Michael W. Hudson54241132001-12-07 15:38:26 +00007713
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007714
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7716$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007717if test ! "$LIBRARY" = "$LDLIBRARY"
7718then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007719 case $ac_sys_system in
7720 CYGWIN*)
7721 # Cygwin needs CCSHARED when building extension DLLs
7722 # but not when building the interpreter DLL.
7723 CFLAGSFORSHARED='';;
7724 *)
7725 CFLAGSFORSHARED='$(CCSHARED)'
7726 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7729$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007730
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007731# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7732# library (with --enable-shared).
7733# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007734# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7735# if it is not required, since it creates a dependency of the shared library
7736# to LIBS. This, in turn, means that applications linking the shared libpython
7737# don't need to link LIBS explicitly. The default should be only changed
7738# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7741$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007743 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007744 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7747$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007748
7749
Guido van Rossum627b2d71993-12-24 10:39:16 +00007750# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7752$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007753if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755else
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761/* Override any GCC internal prototype to avoid an error.
7762 Use char because int might match the return type of a GCC
7763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007764#ifdef __cplusplus
7765extern "C"
7766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007767char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007768int
7769main ()
7770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 ;
7773 return 0;
7774}
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core conftest.err conftest.$ac_objext \
7782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7786$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007787if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 cat >>confdefs.h <<_ACEOF
7789#define HAVE_LIBDL 1
7790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007792 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794fi
7795 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7797$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007798if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007802LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806/* Override any GCC internal prototype to avoid an error.
7807 Use char because int might match the return type of a GCC
7808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007809#ifdef __cplusplus
7810extern "C"
7811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007812char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
7815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ;
7818 return 0;
7819}
7820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826rm -f core conftest.err conftest.$ac_objext \
7827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7831$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007832if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 cat >>confdefs.h <<_ACEOF
7834#define HAVE_LIBDLD 1
7835_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007837 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839fi
7840 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007841
Georg Brandlb1441c72009-01-03 22:33:39 +00007842# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007843if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7845$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007846if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007848else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007849 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853/* Override any GCC internal prototype to avoid an error.
7854 Use char because int might match the return type of a GCC
7855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007856#ifdef __cplusplus
7857extern "C"
7858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007859char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
7862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ;
7865 return 0;
7866}
7867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868for ac_lib in '' pthread rt posix4; do
7869 if test -z "$ac_lib"; then
7870 ac_res="none required"
7871 else
7872 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878rm -f core conftest.err conftest.$ac_objext \
7879 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007880 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007884if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886else
7887 ac_cv_search_sem_init=no
7888fi
7889rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007890LIBS=$ac_func_search_save_LIBS
7891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7893$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007895if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007897
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007898fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007899 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007900 # posix4 on Solaris 2.6
7901 # pthread (first!) on Linux
7902fi
7903
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7906$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007907if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909else
7910 ac_check_lib_save_LIBS=$LIBS
7911LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915/* Override any GCC internal prototype to avoid an error.
7916 Use char because int might match the return type of a GCC
7917 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007918#ifdef __cplusplus
7919extern "C"
7920#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922int
7923main ()
7924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007926 ;
7927 return 0;
7928}
7929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931 ac_cv_lib_intl_textdomain=yes
7932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935rm -f core conftest.err conftest.$ac_objext \
7936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007937LIBS=$ac_check_lib_save_LIBS
7938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7940$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007941if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007944
Brett Cannonc6d936e2009-06-07 20:09:53 +00007945 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007946fi
7947
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007948
7949# checks for system dependent C++ extensions support
7950case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7952$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007955
Georg Brandl59e87bd2011-02-15 19:48:59 +00007956 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007960loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ;
7962 return 0;
7963}
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007967
Matthias Kloseb159a552010-04-25 21:00:44 +00007968
Matthias Kloseb9621712010-04-24 17:59:49 +00007969$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007970
Matthias Kloseb159a552010-04-25 21:00:44 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007972$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007974else
Matthias Kloseb159a552010-04-25 21:00:44 +00007975
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007977$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980rm -f core conftest.err conftest.$ac_objext \
7981 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007982 *) ;;
7983esac
7984
Guido van Rossum70c7f481998-03-26 18:44:10 +00007985# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7987$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007988if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007990else
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007992LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996/* Override any GCC internal prototype to avoid an error.
7997 Use char because int might match the return type of a GCC
7998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999#ifdef __cplusplus
8000extern "C"
8001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008002char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008003int
8004main ()
8005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ;
8008 return 0;
8009}
8010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008016rm -f core conftest.err conftest.$ac_objext \
8017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008018LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8021$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008022if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008023 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008024fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008025 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8027$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008028if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008032LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036/* Override any GCC internal prototype to avoid an error.
8037 Use char because int might match the return type of a GCC
8038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039#ifdef __cplusplus
8040extern "C"
8041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008042char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ;
8048 return 0;
8049}
8050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8061$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008062if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008063 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008064fi
8065 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8068$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8074$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008075LIBS="$withval $LIBS"
8076
8077else
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8079$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080fi
8081
Guido van Rossum7f43da71994-08-01 12:15:30 +00008082
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008083if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008084 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8085set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8087$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008088if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090else
8091 case $PKG_CONFIG in
8092 [\\/]* | ?:[\\/]*)
8093 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8094 ;;
8095 *)
8096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8097for as_dir in $PATH
8098do
8099 IFS=$as_save_IFS
8100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8103 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008105 break 2
8106 fi
8107done
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008109IFS=$as_save_IFS
8110
8111 ;;
8112esac
8113fi
8114PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8115if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8117$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118else
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008121fi
8122
8123
8124fi
8125if test -z "$ac_cv_path_PKG_CONFIG"; then
8126 ac_pt_PKG_CONFIG=$PKG_CONFIG
8127 # Extract the first word of "pkg-config", so it can be a program name with args.
8128set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008131if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133else
8134 case $ac_pt_PKG_CONFIG in
8135 [\\/]* | ?:[\\/]*)
8136 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8137 ;;
8138 *)
8139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140for as_dir in $PATH
8141do
8142 IFS=$as_save_IFS
8143 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8146 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008148 break 2
8149 fi
8150done
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152IFS=$as_save_IFS
8153
8154 ;;
8155esac
8156fi
8157ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8158if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8160$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161else
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164fi
8165
8166 if test "x$ac_pt_PKG_CONFIG" = x; then
8167 PKG_CONFIG=""
8168 else
8169 case $cross_compiling:$ac_tool_warned in
8170yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173ac_tool_warned=yes ;;
8174esac
8175 PKG_CONFIG=$ac_pt_PKG_CONFIG
8176 fi
8177else
8178 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8179fi
8180
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008181
8182# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8184$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185
8186# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008188 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008189else
8190 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008191fi
8192
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8195$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008196
8197# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8199$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008200
8201# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008202if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008203 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008204else
8205 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008206fi
8207
8208
8209if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008210 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8211else
8212 LIBFFI_INCLUDEDIR=""
8213fi
8214
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8217$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008218
Benjamin Peterson076ed002010-10-31 17:11:02 +00008219# Check for support for loadable sqlite extensions
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8221$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8222# Check whether --enable-loadable-sqlite-extensions was given.
8223if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8224 enableval=$enable_loadable_sqlite_extensions;
8225else
8226 enable_loadable_sqlite_extensions="no"
8227fi
8228
8229
8230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8231$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8232
Matthias Klose55708cc2009-04-30 08:06:49 +00008233# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8235$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008236
8237# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008238if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008239 withval=$with_dbmliborder;
8240if test x$with_dbmliborder = xyes
8241then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008242as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008243else
8244 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8245 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8246 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008247 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008248 fi
8249 done
8250fi
8251fi
8252
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8254$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008255
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008256# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008257
8258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8260$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008263if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264 withval=$with_signal_module;
8265fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008266
8267
8268if test -z "$with_signal_module"
8269then with_signal_module="yes"
8270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8272$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008273
8274if test "${with_signal_module}" = "yes"; then
8275 USE_SIGNAL_MODULE=""
8276 SIGNAL_OBJS=""
8277else
8278 USE_SIGNAL_MODULE="#"
8279 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8280fi
8281
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008282# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008283
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008284USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8287$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
Guido van Rossumec2f0731997-01-22 20:54:01 +00008289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8294$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008295LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008296if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008298fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302fi
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304
8305# Templates for things AC_DEFINEd more than once.
8306# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008307
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
8310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8312$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008315if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316 withval=$with_threads;
8317fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008318
8319
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008320# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324 withval=$with_thread; with_threads=$with_thread
8325fi
8326
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008327
8328if test -z "$with_threads"
8329then with_threads="yes"
8330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8332$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008333
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008334
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008335if test "$with_threads" = "no"
8336then
8337 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008338elif test "$ac_cv_pthread_is_default" = yes
8339then
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008341
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008342 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008344
8345 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008347elif test "$ac_cv_kpthread" = "yes"
8348then
8349 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008350 if test "$ac_cv_cxx_thread" = "yes"; then
8351 CXX="$CXX -Kpthread"
8352 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008355 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008356 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008357elif test "$ac_cv_kthread" = "yes"
8358then
8359 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008360 if test "$ac_cv_cxx_thread" = "yes"; then
8361 CXX="$CXX -Kthread"
8362 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008364
8365 posix_threads=yes
8366 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008367elif test "$ac_cv_pthread" = "yes"
8368then
8369 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008370 if test "$ac_cv_cxx_thread" = "yes"; then
8371 CXX="$CXX -pthread"
8372 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008374
8375 posix_threads=yes
8376 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008377else
8378 if test ! -z "$with_threads" -a -d "$with_threads"
8379 then LDFLAGS="$LDFLAGS -L$with_threads"
8380 fi
8381 if test ! -z "$withval" -a -d "$withval"
8382 then LDFLAGS="$LDFLAGS -L$withval"
8383 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008384
8385 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008386 # define _POSIX_THREADS in unistd.h. Some apparently don't
8387 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8389$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008391/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008392
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008393#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008394#ifdef _POSIX_THREADS
8395yes
8396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 unistd_defines_pthreads=yes
8402else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008403 unistd_defines_pthreads=no
8404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008405rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8408$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008411
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008413if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008415
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008420
8421 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008422 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008423else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008426if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008433
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008434 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008435else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008436
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008437 # Just looking for pthread_create in libpthread is not enough:
8438 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8439 # So we really have to include pthread.h, and then link.
8440 _libs=$LIBS
8441 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8443$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008446#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008447
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008448void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008449int
8450main ()
8451{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008452
8453pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ;
8455 return 0;
8456}
8457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8461$as_echo "yes" >&6; }
8462 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008463
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008464 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008465 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008468 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008470if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008472
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008473 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008474 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008475else
Guido van Rossumad678af1998-10-02 14:42:15 +00008476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8478$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008479if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008481else
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008483LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487/* Override any GCC internal prototype to avoid an error.
8488 Use char because int might match the return type of a GCC
8489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490#ifdef __cplusplus
8491extern "C"
8492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008493char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008494int
8495main ()
8496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ;
8499 return 0;
8500}
8501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507rm -f core conftest.err conftest.$ac_objext \
8508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008509LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8512$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008513if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008516 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008517 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008519else
Greg Steinadf63d62000-07-05 10:38:09 +00008520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8522$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008523if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008525else
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008527LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531/* Override any GCC internal prototype to avoid an error.
8532 Use char because int might match the return type of a GCC
8533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534#ifdef __cplusplus
8535extern "C"
8536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008537char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ;
8543 return 0;
8544}
8545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551rm -f core conftest.err conftest.$ac_objext \
8552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008553LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8556$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008557if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008560 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008561 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008562 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008563else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8566$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008567if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008569else
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575/* Override any GCC internal prototype to avoid an error.
8576 Use char because int might match the return type of a GCC
8577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578#ifdef __cplusplus
8579extern "C"
8580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008581char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008582int
8583main ()
8584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ;
8587 return 0;
8588}
8589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595rm -f core conftest.err conftest.$ac_objext \
8596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8600$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008601if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008604 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008605 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008606 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008607else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008608
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8610$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008611if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613else
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619/* Override any GCC internal prototype to avoid an error.
8620 Use char because int might match the return type of a GCC
8621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622#ifdef __cplusplus
8623extern "C"
8624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008625char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
8633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008641LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8644$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008645if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008648 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008649 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008650 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008651else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008652
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008654fi
8655
Guido van Rossum627b2d71993-12-24 10:39:16 +00008656
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008657fi
8658
Guido van Rossum0be3e491997-05-22 20:33:33 +00008659fi
8660
Guido van Rossum49545951997-12-02 19:28:29 +00008661fi
8662
Guido van Rossumb93a8621998-05-07 13:27:32 +00008663fi
8664
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666rm -f core conftest.err conftest.$ac_objext \
8667 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668fi
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670
8671fi
8672
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008673
Michael W. Hudson54241132001-12-07 15:38:26 +00008674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8676$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008677if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008679else
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008681LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685/* Override any GCC internal prototype to avoid an error.
8686 Use char because int might match the return type of a GCC
8687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688#ifdef __cplusplus
8689extern "C"
8690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008691char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
8694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ;
8697 return 0;
8698}
8699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702else
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705rm -f core conftest.err conftest.$ac_objext \
8706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8710$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008711if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008713
Martin v. Löwis130fb172001-07-19 11:00:41 +00008714 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008715 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008716 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008717fi
8718
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008719
Neal Norwitza978ab02002-11-02 16:58:05 +00008720 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8722$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008723if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008727LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731/* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008734#ifdef __cplusplus
8735extern "C"
8736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008737char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ;
8743 return 0;
8744}
8745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008753LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8756$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008757if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008759
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008760 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008761 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008762 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008763fi
8764
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008765 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008766
Martin v. Löwis130fb172001-07-19 11:00:41 +00008767 if test "$USE_THREAD_MODULE" != "#"
8768 then
8769 # If the above checks didn't disable threads, (at least) OSF1
8770 # needs this '-threads' argument during linking.
8771 case $ac_sys_system in
8772 OSF1) LDLAST=-threads;;
8773 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008774 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008777if test "$posix_threads" = "yes"; then
8778 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781
8782 fi
8783
8784 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8785 case $ac_sys_system/$ac_sys_release in
8786 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008787$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008788
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 ;;
8790 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008791$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792
8793 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008794 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008795$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008796
8797 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008798 AIX/6)
8799$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8800
8801 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802 esac
8803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8805$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008806 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810 ac_cv_pthread_system_supported=no
8811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814#include <pthread.h>
8815 void *foo(void *parm) {
8816 return NULL;
8817 }
8818 main() {
8819 pthread_attr_t attr;
8820 pthread_t id;
8821 if (pthread_attr_init(&attr)) exit(-1);
8822 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8823 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8824 exit(0);
8825 }
8826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008827if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008828 ac_cv_pthread_system_supported=yes
8829else
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836
Guido van Rossum627b2d71993-12-24 10:39:16 +00008837fi
8838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8840$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841 if test "$ac_cv_pthread_system_supported" = "yes"; then
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844
8845 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 for ac_func in pthread_sigmask
8847do :
8848 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008849if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008851#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008853 case $ac_sys_system in
8854 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008857
8858 ;;
8859 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860fi
8861done
8862
8863fi
8864
8865
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008866# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8869$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008871if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8875$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008876 ipv6=no
8877 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8879$as_echo "yes" >&6; }
8880 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008881
8882 ipv6=yes
8883 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=no
8892
8893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896 /* AF_INET6 available check */
8897#include <sys/types.h>
8898#include <sys/socket.h>
8899main()
8900{
8901 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8902 exit(1);
8903 else
8904 exit(0);
8905}
8906
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8911$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914else
Matthias Kloseb159a552010-04-25 21:00:44 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923fi
8924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008926if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8928$as_echo_n "checking if RFC2553 API is available... " >&6; }
8929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008930/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008931
8932 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008933#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008938 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ;
8940 return 0;
8941}
Matthias Kloseb159a552010-04-25 21:00:44 +00008942
Martin v. Löwis11437992002-04-12 09:54:03 +00008943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008944if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008947$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008948 ipv6=yes
8949
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008950else
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008954 ipv6=no
8955
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008958fi
8959
8960if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008962
8963fi
8964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965fi
8966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967
8968ipv6type=unknown
8969ipv6lib=none
8970ipv6trylibc=no
8971
8972if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8974$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008975 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8976 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 case $i in
8978 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982#include <netinet/in.h>
8983#ifdef IPV6_INRIA_VERSION
8984yes
8985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008989 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998#include <netinet/in.h>
8999#ifdef __KAME__
9000yes
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 ipv6type=$i;
9006 ipv6lib=inet6
9007 ipv6libdir=/usr/local/v6/lib
9008 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009010rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009011
9012 ;;
9013 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017#include <features.h>
9018#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9019yes
9020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 ipv6type=$i;
9025 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009027rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028
9029 ;;
9030 linux-inet6)
9031 if test -d /usr/inet6; then
9032 ipv6type=$i
9033 ipv6lib=inet6
9034 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009035 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 fi
9037 ;;
9038 solaris)
9039 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009040 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041 ipv6type=$i
9042 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043 fi
9044 fi
9045 ;;
9046 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050#include <sys/param.h>
9051#ifdef _TOSHIBA_INET6
9052yes
9053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057 ipv6type=$i;
9058 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009059 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009061rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062
9063 ;;
9064 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068#include </usr/local/v6/include/sys/v6config.h>
9069#ifdef __V6D__
9070yes
9071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 ipv6type=$i;
9076 ipv6lib=v6;
9077 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009078 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ;;
9083 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087#include <sys/param.h>
9088#ifdef _ZETA_MINAMI_INET6
9089yes
9090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094 ipv6type=$i;
9095 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009096 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099
9100 ;;
9101 esac
9102 if test "$ipv6type" != "unknown"; then
9103 break
9104 fi
9105 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9107$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108fi
9109
9110if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9111 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9112 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9113 echo "using lib$ipv6lib"
9114 else
9115 if test $ipv6trylibc = "yes"; then
9116 echo "using libc"
9117 else
9118 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9119 echo "You need to fetch lib$ipv6lib.a from appropriate"
9120 echo 'ipv6 kit and compile beforehand.'
9121 exit 1
9122 fi
9123 fi
9124fi
9125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9127$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009129/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
9131 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132int
9133main ()
9134{
9135FSIORefNum fRef = 0
9136 ;
9137 return 0;
9138}
Matthias Kloseb159a552010-04-25 21:00:44 +00009139
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009142
Matthias Kloseb159a552010-04-25 21:00:44 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9147$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009149else
Matthias Kloseb159a552010-04-25 21:00:44 +00009150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009153
9154fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9159$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009162if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009163 withval=$with_doc_strings;
9164fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009165
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009166
9167if test -z "$with_doc_strings"
9168then with_doc_strings="yes"
9169fi
9170if test "$with_doc_strings" != "no"
9171then
9172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009174
9175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9177$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009178
Antoine Pitrou042b1282010-08-13 21:15:58 +00009179# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9181$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009186if test "$withval" != no
9187then
9188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9192$as_echo "yes" >&6; }
9193else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009195fi
9196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199fi
9200
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009201
9202# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9204$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 withval=$with_pymalloc;
9209fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009210
Neil Schemenauera35c6882001-02-27 04:45:05 +00009211
Neil Schemenauer16c22972002-03-22 15:34:49 +00009212if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009213then
9214 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009215 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009216fi
9217if test "$with_pymalloc" != "no"
9218then
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009221
9222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9224$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009225
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9228$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009229
9230# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009231if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009232 withval=$with_valgrind;
9233else
9234 with_valgrind=no
9235fi
9236
Matthias Kloseb9621712010-04-24 17:59:49 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9238$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009239if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009241if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009244
9245else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009246 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009247
9248fi
9249
9250
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009251 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009252fi
9253
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009254# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009255
Guido van Rossum98935bf2001-09-05 19:13:16 +00009256DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009257
Guido van Rossume97ee181999-12-20 21:27:22 +00009258# the dlopen() function means we might want to use dynload_shlib.o. some
9259# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009260for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009261do :
9262 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009263if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009265#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009267
Guido van Rossume97ee181999-12-20 21:27:22 +00009268fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009269done
Guido van Rossume97ee181999-12-20 21:27:22 +00009270
Michael W. Hudson54241132001-12-07 15:38:26 +00009271
Guido van Rossume97ee181999-12-20 21:27:22 +00009272# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9273# loading of modules.
9274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9276$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009277if test -z "$DYNLOADFILE"
9278then
9279 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009280 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9281 if test "$ac_cv_func_dlopen" = yes
9282 then DYNLOADFILE="dynload_shlib.o"
9283 else DYNLOADFILE="dynload_aix.o"
9284 fi
9285 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009286 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009287 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9288 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009289 *)
9290 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9291 # out any dynamic loading
9292 if test "$ac_cv_func_dlopen" = yes
9293 then DYNLOADFILE="dynload_shlib.o"
9294 else DYNLOADFILE="dynload_stub.o"
9295 fi
9296 ;;
9297 esac
9298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9300$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009301if test "$DYNLOADFILE" != "dynload_stub.o"
9302then
Martin v. Löwis11437992002-04-12 09:54:03 +00009303
Matthias Kloseb9621712010-04-24 17:59:49 +00009304$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009305
9306fi
9307
Neil Schemenauer4e425612001-06-19 15:44:15 +00009308# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9309
Michael W. Hudson54241132001-12-07 15:38:26 +00009310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9312$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009313if test -z "$MACHDEP_OBJS"
9314then
Jack Jansene578a632001-08-15 01:27:14 +00009315 MACHDEP_OBJS=$extra_machdep_objs
9316else
9317 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9320$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009321
Guido van Rossum627b2d71993-12-24 10:39:16 +00009322# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009323for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009324 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009325 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009326 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009327 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009328 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009329 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009330 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9331 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009332 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009333 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009334 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009335 truncate uname unsetenv utimes waitpid wait3 wait4 \
9336 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009337do :
9338 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9339ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009340if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009342#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009343_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009345fi
9346done
9347
Michael W. Hudson54241132001-12-07 15:38:26 +00009348
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349# For some functions, having a definition is not sufficient, since
9350# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9352$as_echo_n "checking for chroot... " >&6; }
9353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009354/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356int
9357main ()
9358{
9359void *x=chroot
9360 ;
9361 return 0;
9362}
9363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367
Matthias Kloseb159a552010-04-25 21:00:44 +00009368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009369$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370else
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9372$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373
9374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9377$as_echo_n "checking for link... " >&6; }
9378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009379/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381int
9382main ()
9383{
9384void *x=link
9385 ;
9386 return 0;
9387}
9388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009392
Matthias Kloseb159a552010-04-25 21:00:44 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009394$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395else
Matthias Kloseb9621712010-04-24 17:59:49 +00009396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398
9399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9402$as_echo_n "checking for symlink... " >&6; }
9403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009404/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406int
9407main ()
9408{
9409void *x=symlink
9410 ;
9411 return 0;
9412}
9413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009417
Matthias Kloseb159a552010-04-25 21:00:44 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009419$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009420else
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009423
9424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9427$as_echo_n "checking for fchdir... " >&6; }
9428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009429/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009430#include <unistd.h>
9431int
9432main ()
9433{
9434void *x=fchdir
9435 ;
9436 return 0;
9437}
9438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009440
Matthias Kloseb9621712010-04-24 17:59:49 +00009441$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009442
Matthias Kloseb159a552010-04-25 21:00:44 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009444$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445else
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448
9449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9452$as_echo_n "checking for fsync... " >&6; }
9453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009454/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455#include <unistd.h>
9456int
9457main ()
9458{
9459void *x=fsync
9460 ;
9461 return 0;
9462}
9463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009465
Matthias Kloseb9621712010-04-24 17:59:49 +00009466$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009467
Matthias Kloseb159a552010-04-25 21:00:44 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009469$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9472$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009473
9474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9477$as_echo_n "checking for fdatasync... " >&6; }
9478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009480#include <unistd.h>
9481int
9482main ()
9483{
9484void *x=fdatasync
9485 ;
9486 return 0;
9487}
9488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009492
Matthias Kloseb159a552010-04-25 21:00:44 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009494$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009495else
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9497$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009498
9499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9502$as_echo_n "checking for epoll... " >&6; }
9503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009504/* end confdefs.h. */
9505#include <sys/epoll.h>
9506int
9507main ()
9508{
9509void *x=epoll_create
9510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009517
Matthias Kloseb159a552010-04-25 21:00:44 +00009518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009519$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009523
9524fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9527$as_echo_n "checking for kqueue... " >&6; }
9528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529/* end confdefs.h. */
9530
9531#include <sys/types.h>
9532#include <sys/event.h>
9533
9534int
9535main ()
9536{
9537int x=kqueue()
9538 ;
9539 return 0;
9540}
9541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009545
Matthias Kloseb159a552010-04-25 21:00:44 +00009546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009548else
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009551
9552fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009554# On some systems (eg. FreeBSD 5), we would find a definition of the
9555# functions ctermid_r, setgroups in the library, but no prototype
9556# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9557# address to avoid compiler warnings and potential miscompilations
9558# because of the missing prototypes.
9559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9561$as_echo_n "checking for ctermid_r... " >&6; }
9562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009564
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565#include <stdio.h>
9566
Martin v. Löwisd5843682002-11-21 20:41:28 +00009567int
9568main ()
9569{
9570void* p = ctermid_r
9571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009578
Matthias Kloseb159a552010-04-25 21:00:44 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009581else
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009584
9585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9587
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9589$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009590if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009591 $as_echo_n "(cached) " >&6
9592else
9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009595#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009596int
9597main ()
9598{
9599void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009600
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601 ;
9602 return 0;
9603}
9604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009605if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009606 ac_cv_flock_decl=yes
9607else
9608 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009609
9610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009612
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009613fi
9614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9615$as_echo "$ac_cv_flock_decl" >&6; }
9616if test "x${ac_cv_flock_decl}" = xyes; then
9617 for ac_func in flock
9618do :
9619 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009620if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009621 cat >>confdefs.h <<_ACEOF
9622#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009623_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009624
Antoine Pitroua3000072010-09-07 14:52:42 +00009625else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009627$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009628if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009629 $as_echo_n "(cached) " >&6
9630else
9631 ac_check_lib_save_LIBS=$LIBS
9632LIBS="-lbsd $LIBS"
9633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635
9636/* Override any GCC internal prototype to avoid an error.
9637 Use char because int might match the return type of a GCC
9638 builtin and then its argument prototype would still apply. */
9639#ifdef __cplusplus
9640extern "C"
9641#endif
9642char flock ();
9643int
9644main ()
9645{
9646return flock ();
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651if ac_fn_c_try_link "$LINENO"; then :
9652 ac_cv_lib_bsd_flock=yes
9653else
9654 ac_cv_lib_bsd_flock=no
9655fi
9656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
9658LIBS=$ac_check_lib_save_LIBS
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9661$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009662if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009663 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009664
9665
9666$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9667
9668
9669fi
9670
9671
9672fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009673done
9674
Antoine Pitroua3000072010-09-07 14:52:42 +00009675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9678$as_echo_n "checking for getpagesize... " >&6; }
9679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009680/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682#include <unistd.h>
9683
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009684int
9685main ()
9686{
9687void* p = getpagesize
9688 ;
9689 return 0;
9690}
9691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009695
Matthias Kloseb159a552010-04-25 21:00:44 +00009696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009697$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009701
9702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705for ac_prog in true
9706do
9707 # Extract the first word of "$ac_prog", so it can be a program name with args.
9708set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9710$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009711if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713else
9714 if test -n "$TRUE"; then
9715 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9716else
9717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9718for as_dir in $PATH
9719do
9720 IFS=$as_save_IFS
9721 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723 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 +00009724 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 $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 +00009726 break 2
9727 fi
9728done
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009731
9732fi
9733fi
9734TRUE=$ac_cv_prog_TRUE
9735if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9737$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009738else
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009741fi
9742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744 test -n "$TRUE" && break
9745done
9746test -n "$TRUE" || TRUE="/bin/true"
9747
9748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9750$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009751if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753else
9754 ac_check_lib_save_LIBS=$LIBS
9755LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009757/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759/* Override any GCC internal prototype to avoid an error.
9760 Use char because int might match the return type of a GCC
9761 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762#ifdef __cplusplus
9763extern "C"
9764#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766int
9767main ()
9768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009775 ac_cv_lib_c_inet_aton=yes
9776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779rm -f core conftest.err conftest.$ac_objext \
9780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781LIBS=$ac_check_lib_save_LIBS
9782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9784$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009785if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009787else
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9789$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009790if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792else
9793 ac_check_lib_save_LIBS=$LIBS
9794LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009814 ac_cv_lib_resolv_inet_aton=yes
9815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009820LIBS=$ac_check_lib_save_LIBS
9821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9823$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009824if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009825 cat >>confdefs.h <<_ACEOF
9826#define HAVE_LIBRESOLV 1
9827_ACEOF
9828
9829 LIBS="-lresolv $LIBS"
9830
9831fi
9832
9833
9834fi
9835
9836
Christian Heimesd0764e22007-12-04 15:00:33 +00009837# On Tru64, chflags seems to be present, but calling it will
9838# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9840$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009841if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009845 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009846else
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009848/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009849[
Christian Heimesd0764e22007-12-04 15:00:33 +00009850#include <sys/stat.h>
9851#include <unistd.h>
9852int main(int argc, char*argv[])
9853{
9854 if(chflags(argv[0], 0) != 0)
9855 return 1;
9856 return 0;
9857}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009858]
Christian Heimesd0764e22007-12-04 15:00:33 +00009859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009861 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009862else
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009867fi
9868
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9872$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009873if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009875if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009876 ac_cv_have_chflags="yes"
9877else
9878 ac_cv_have_chflags="no"
9879fi
9880
9881fi
9882if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009883
Matthias Kloseb9621712010-04-24 17:59:49 +00009884$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009885
9886fi
9887
Matthias Kloseb9621712010-04-24 17:59:49 +00009888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9889$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009890if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009892else
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009894 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009897/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009898[
Christian Heimesd0764e22007-12-04 15:00:33 +00009899#include <sys/stat.h>
9900#include <unistd.h>
9901int main(int argc, char*argv[])
9902{
9903 if(lchflags(argv[0], 0) != 0)
9904 return 1;
9905 return 0;
9906}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009907]
Christian Heimesd0764e22007-12-04 15:00:33 +00009908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009909if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009910 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009911else
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9915 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009916fi
9917
9918
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9921$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009922if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009924if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009925 ac_cv_have_lchflags="yes"
9926else
9927 ac_cv_have_lchflags="no"
9928fi
9929
9930fi
9931if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009932
Matthias Kloseb9621712010-04-24 17:59:49 +00009933$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009934
9935fi
9936
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009937case $ac_sys_system/$ac_sys_release in
9938Darwin/*)
9939 _CUR_CFLAGS="${CFLAGS}"
9940 _CUR_LDFLAGS="${LDFLAGS}"
9941 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9942 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9943 ;;
9944esac
9945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9947$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009948if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009950else
9951 ac_check_lib_save_LIBS=$LIBS
9952LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009954/* end confdefs.h. */
9955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009956/* Override any GCC internal prototype to avoid an error.
9957 Use char because int might match the return type of a GCC
9958 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009959#ifdef __cplusplus
9960extern "C"
9961#endif
9962char inflateCopy ();
9963int
9964main ()
9965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009972 ac_cv_lib_z_inflateCopy=yes
9973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009976rm -f core conftest.err conftest.$ac_objext \
9977 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009978LIBS=$ac_check_lib_save_LIBS
9979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9981$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009982if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009985
9986fi
9987
9988
9989case $ac_sys_system/$ac_sys_release in
9990Darwin/*)
9991 CFLAGS="${_CUR_CFLAGS}"
9992 LDFLAGS="${_CUR_LDFLAGS}"
9993 ;;
9994esac
9995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9997$as_echo_n "checking for hstrerror... " >&6; }
9998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009999/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010000
Martin v. Löwise9416172003-05-03 10:12:45 +000010001#include <netdb.h>
10002
Martin v. Löwise9416172003-05-03 10:12:45 +000010003int
10004main ()
10005{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010006void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010007 ;
10008 return 0;
10009}
10010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
Matthias Kloseb9621712010-04-24 17:59:49 +000010013$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010014
Matthias Kloseb159a552010-04-25 21:00:44 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010016$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010017else
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010020
10021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022rm -f core conftest.err conftest.$ac_objext \
10023 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10026$as_echo_n "checking for inet_aton... " >&6; }
10027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010029
Martin v. Löwis86d66262006-02-17 08:40:11 +000010030#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010031#include <sys/socket.h>
10032#include <netinet/in.h>
10033#include <arpa/inet.h>
10034
Martin v. Löwise9416172003-05-03 10:12:45 +000010035int
10036main ()
10037{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010038void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010039 ;
10040 return 0;
10041}
10042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010046
Matthias Kloseb159a552010-04-25 21:00:44 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010048$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010052
10053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054rm -f core conftest.err conftest.$ac_objext \
10055 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10058$as_echo_n "checking for inet_pton... " >&6; }
10059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010061
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010062#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010063#include <sys/socket.h>
10064#include <netinet/in.h>
10065#include <arpa/inet.h>
10066
Martin v. Löwise9416172003-05-03 10:12:45 +000010067int
10068main ()
10069{
10070void* p = inet_pton
10071 ;
10072 return 0;
10073}
10074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010078
Matthias Kloseb159a552010-04-25 21:00:44 +000010079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010080$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10083$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010084
10085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010087
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010088# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10090$as_echo_n "checking for setgroups... " >&6; }
10091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010092/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010093
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010094#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010095#ifdef HAVE_GRP_H
10096#include <grp.h>
10097#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010098
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099int
10100main ()
10101{
10102void* p = setgroups
10103 ;
10104 return 0;
10105}
10106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010108
Matthias Kloseb9621712010-04-24 17:59:49 +000010109$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010110
Matthias Kloseb159a552010-04-25 21:00:44 +000010111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010112$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010113else
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010116
10117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010120# check for openpty and forkpty
10121
10122for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010123do :
10124 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010125if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010127#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010128_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010129
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10132$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010133if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010135else
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010137LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141/* Override any GCC internal prototype to avoid an error.
10142 Use char because int might match the return type of a GCC
10143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144#ifdef __cplusplus
10145extern "C"
10146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010147char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ;
10153 return 0;
10154}
10155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010161rm -f core conftest.err conftest.$ac_objext \
10162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010163LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10166$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010167if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010169 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170else
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10172$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010173if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010175else
10176 ac_check_lib_save_LIBS=$LIBS
10177LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179/* end confdefs.h. */
10180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181/* Override any GCC internal prototype to avoid an error.
10182 Use char because int might match the return type of a GCC
10183 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010184#ifdef __cplusplus
10185extern "C"
10186#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187char openpty ();
10188int
10189main ()
10190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010192 ;
10193 return 0;
10194}
10195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010197 ac_cv_lib_bsd_openpty=yes
10198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010201rm -f core conftest.err conftest.$ac_objext \
10202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010203LIBS=$ac_check_lib_save_LIBS
10204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10206$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010207if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209 LIBS="$LIBS -lbsd"
10210fi
10211
10212
10213fi
10214
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215
10216fi
10217done
10218
10219for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010220do :
10221 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010222if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010224#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10229$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010230if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010232else
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238/* Override any GCC internal prototype to avoid an error.
10239 Use char because int might match the return type of a GCC
10240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010241#ifdef __cplusplus
10242extern "C"
10243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010244char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010245int
10246main ()
10247{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ;
10250 return 0;
10251}
10252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010255else
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010258rm -f core conftest.err conftest.$ac_objext \
10259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010260LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10263$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010264if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10269$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010270if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010272else
10273 ac_check_lib_save_LIBS=$LIBS
10274LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010276/* end confdefs.h. */
10277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278/* Override any GCC internal prototype to avoid an error.
10279 Use char because int might match the return type of a GCC
10280 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010281#ifdef __cplusplus
10282extern "C"
10283#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284char forkpty ();
10285int
10286main ()
10287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010294 ac_cv_lib_bsd_forkpty=yes
10295else
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010298rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010300LIBS=$ac_check_lib_save_LIBS
10301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10303$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010304if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306 LIBS="$LIBS -lbsd"
10307fi
10308
10309
10310fi
10311
Fred Drake8cef4cf2000-06-28 16:40:38 +000010312
10313fi
10314done
10315
Jack Jansendd19cf82001-12-06 22:36:17 +000010316
Christian Heimesb186d002008-03-18 15:15:01 +000010317# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010318for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010319do :
10320 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010321if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010322 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010324_ACEOF
10325
10326fi
10327done
10328
10329
Michael W. Hudson54241132001-12-07 15:38:26 +000010330# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010331for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010332do :
10333 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10334ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010335if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010338_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010339
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010340fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010341done
10342
Michael W. Hudson54241132001-12-07 15:38:26 +000010343
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010344ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10345if test "x$ac_cv_func_dup2" = xyes; then :
10346 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010347
Martin v. Löwis1142de32002-03-29 16:28:31 +000010348else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010350 *" dup2.$ac_objext "* ) ;;
10351 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010353esac
10354
Martin v. Löwis1142de32002-03-29 16:28:31 +000010355fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010356
10357ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10358if test "x$ac_cv_func_getcwd" = xyes; then :
10359 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10360
10361else
10362 case " $LIBOBJS " in
10363 *" getcwd.$ac_objext "* ) ;;
10364 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10365 ;;
10366esac
10367
10368fi
10369
10370ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10371if test "x$ac_cv_func_strdup" = xyes; then :
10372 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10373
10374else
10375 case " $LIBOBJS " in
10376 *" strdup.$ac_objext "* ) ;;
10377 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10378 ;;
10379esac
10380
10381fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010382
10383
10384for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010385do :
10386 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010387if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010392/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010393#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010397getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403
Matthias Kloseb9621712010-04-24 17:59:49 +000010404$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010405
Guido van Rossum627b2d71993-12-24 10:39:16 +000010406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010408
Guido van Rossum627b2d71993-12-24 10:39:16 +000010409fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010410done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010411
Jack Jansen150753c2003-03-29 22:07:47 +000010412for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010413do :
10414 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010415if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010416 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010421#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010422int
10423main ()
10424{
10425setpgrp(0,0);
10426 ;
10427 return 0;
10428}
10429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010433
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010436
10437fi
10438done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010439
Thomas Wouters3a584202000-08-05 23:28:51 +000010440for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010441do :
10442 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010443if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
10451main ()
10452{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010453gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ;
10455 return 0;
10456}
10457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458if ac_fn_c_try_compile "$LINENO"; then :
10459
Guido van Rossum627b2d71993-12-24 10:39:16 +000010460else
Skip Montanaro6dead952003-09-25 14:50:04 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010463
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
Guido van Rossum627b2d71993-12-24 10:39:16 +000010465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010468fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010469done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010470
Michael W. Hudson54241132001-12-07 15:38:26 +000010471
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10473$as_echo_n "checking for major... " >&6; }
10474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010475/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010476
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010477#if defined(MAJOR_IN_MKDEV)
10478#include <sys/mkdev.h>
10479#elif defined(MAJOR_IN_SYSMACROS)
10480#include <sys/sysmacros.h>
10481#else
10482#include <sys/types.h>
10483#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010484
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010485int
10486main ()
10487{
10488
10489 makedev(major(0),minor(0));
10490
10491 ;
10492 return 0;
10493}
10494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010496
10497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10501$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010502
10503else
Skip Montanaro6dead952003-09-25 14:50:04 +000010504
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010507
10508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010509rm -f core conftest.err conftest.$ac_objext \
10510 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010511
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010512# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010513# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10515$as_echo_n "checking for getaddrinfo... " >&6; }
10516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010518
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010519#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010520#include <sys/socket.h>
10521#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010522#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010523
Martin v. Löwis11437992002-04-12 09:54:03 +000010524int
10525main ()
10526{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010527getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 ;
10529 return 0;
10530}
10531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010533 have_getaddrinfo=yes
10534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010537rm -f core conftest.err conftest.$ac_objext \
10538 conftest$ac_exeext conftest.$ac_ext
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10540$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010541if test $have_getaddrinfo = yes
10542then
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10544$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010545 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010547else
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010549 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010552/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010553
10554#include <sys/types.h>
10555#include <netdb.h>
10556#include <string.h>
10557#include <sys/socket.h>
10558#include <netinet/in.h>
10559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010560int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010561{
10562 int passive, gaierr, inet4 = 0, inet6 = 0;
10563 struct addrinfo hints, *ai, *aitop;
10564 char straddr[INET6_ADDRSTRLEN], strport[16];
10565
10566 for (passive = 0; passive <= 1; passive++) {
10567 memset(&hints, 0, sizeof(hints));
10568 hints.ai_family = AF_UNSPEC;
10569 hints.ai_flags = passive ? AI_PASSIVE : 0;
10570 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010571 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010572 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10573 (void)gai_strerror(gaierr);
10574 goto bad;
10575 }
10576 for (ai = aitop; ai; ai = ai->ai_next) {
10577 if (ai->ai_addr == NULL ||
10578 ai->ai_addrlen == 0 ||
10579 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10580 straddr, sizeof(straddr), strport, sizeof(strport),
10581 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10582 goto bad;
10583 }
10584 switch (ai->ai_family) {
10585 case AF_INET:
10586 if (strcmp(strport, "54321") != 0) {
10587 goto bad;
10588 }
10589 if (passive) {
10590 if (strcmp(straddr, "0.0.0.0") != 0) {
10591 goto bad;
10592 }
10593 } else {
10594 if (strcmp(straddr, "127.0.0.1") != 0) {
10595 goto bad;
10596 }
10597 }
10598 inet4++;
10599 break;
10600 case AF_INET6:
10601 if (strcmp(strport, "54321") != 0) {
10602 goto bad;
10603 }
10604 if (passive) {
10605 if (strcmp(straddr, "::") != 0) {
10606 goto bad;
10607 }
10608 } else {
10609 if (strcmp(straddr, "::1") != 0) {
10610 goto bad;
10611 }
10612 }
10613 inet6++;
10614 break;
10615 case AF_UNSPEC:
10616 goto bad;
10617 break;
10618 default:
10619 /* another family support? */
10620 break;
10621 }
10622 }
10623 }
10624
10625 if (!(inet4 == 0 || inet4 == 2))
10626 goto bad;
10627 if (!(inet6 == 0 || inet6 == 2))
10628 goto bad;
10629
10630 if (aitop)
10631 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010632 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010633
10634 bad:
10635 if (aitop)
10636 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010637 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010638}
10639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010642 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010643else
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010650fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010651
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10655$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10656
Mark Dickinson2df5d282009-12-31 21:22:50 +000010657if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010658then
10659 if test $ipv6 = yes
10660 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010661 echo 'Fatal: You must get working getaddrinfo() function.'
10662 echo ' or you can specify "--disable-ipv6"'.
10663 exit 1
10664 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010668
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010669fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010670
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010671for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010672do :
10673 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010674if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010677_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010678
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010679fi
10680done
10681
Michael W. Hudson54241132001-12-07 15:38:26 +000010682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10685$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010686if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010688else
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691#include <sys/types.h>
10692#include <sys/time.h>
10693#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695int
10696main ()
10697{
10698if ((struct tm *) 0)
10699return 0;
10700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010705 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010706else
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10712$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010713if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010716
10717fi
10718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10720$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010721if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010723else
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010726#include <sys/types.h>
10727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
Martin v. Löwis11437992002-04-12 09:54:03 +000010729int
10730main ()
10731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732struct tm tm;
10733 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 ;
10736 return 0;
10737}
10738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010739if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740 ac_cv_struct_tm=time.h
10741else
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10747$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010748if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010751
10752fi
10753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754ac_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 +000010755#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010758if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
10760cat >>confdefs.h <<_ACEOF
10761#define HAVE_STRUCT_TM_TM_ZONE 1
10762_ACEOF
10763
10764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010766
Martin v. Löwis11437992002-04-12 09:54:03 +000010767if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770
10771else
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10773"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010774if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776else
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778fi
10779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010781#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010782_ACEOF
10783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10785$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010786if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010790/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010791#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792#if !HAVE_DECL_TZNAME
10793extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Martin v. Löwis11437992002-04-12 09:54:03 +000010796int
10797main ()
10798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 ;
10801 return 0;
10802}
10803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010804if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805 ac_cv_var_tzname=yes
10806else
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010809rm -f core conftest.err conftest.$ac_objext \
10810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10813$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010814 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010818 fi
10819fi
10820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010822if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010823
10824cat >>confdefs.h <<_ACEOF
10825#define HAVE_STRUCT_STAT_ST_RDEV 1
10826_ACEOF
10827
10828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010829fi
10830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010832if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010833
Martin v. Löwis11437992002-04-12 09:54:03 +000010834cat >>confdefs.h <<_ACEOF
10835#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10836_ACEOF
10837
10838
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010839fi
10840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010842if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010843
10844cat >>confdefs.h <<_ACEOF
10845#define HAVE_STRUCT_STAT_ST_FLAGS 1
10846_ACEOF
10847
10848
10849fi
10850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010852if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010853
10854cat >>confdefs.h <<_ACEOF
10855#define HAVE_STRUCT_STAT_ST_GEN 1
10856_ACEOF
10857
10858
10859fi
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010862if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010863
10864cat >>confdefs.h <<_ACEOF
10865#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10866_ACEOF
10867
10868
10869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010872if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010873
Martin v. Löwis11437992002-04-12 09:54:03 +000010874cat >>confdefs.h <<_ACEOF
10875#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10876_ACEOF
10877
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010880
10881else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010883 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10885 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010886esac
10887
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010888fi
10889
Michael W. Hudson54241132001-12-07 15:38:26 +000010890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10893$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010894if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010896else
Matthias Kloseb159a552010-04-25 21:00:44 +000010897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010900#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010901int
10902main ()
10903{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010904return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910 ac_cv_header_time_altzone=yes
10911else
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916fi
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10919$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010920if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010923
10924fi
10925
Guido van Rossumda88dad1995-01-26 00:46:29 +000010926was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10928$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010931
10932#include <sys/types.h>
10933#include <sys/select.h>
10934#include <sys/time.h>
10935
Martin v. Löwis11437992002-04-12 09:54:03 +000010936int
10937main ()
10938{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010939;
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 ;
10941 return 0;
10942}
10943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010945
10946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010949 was_it_defined=yes
10950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10954$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10957$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010958if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010960else
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010962/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010963#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010964int
10965main ()
10966{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010967struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ;
10969 return 0;
10970}
10971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010973 ac_cv_struct_addrinfo=yes
10974else
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978fi
10979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10981$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010982if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010985
10986fi
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10989$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010990if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010994/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010995
10996# include <sys/types.h>
10997# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010998int
10999main ()
11000{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011001struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007 ac_cv_struct_sockaddr_storage=yes
11008else
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11012fi
11013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11015$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011016if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011019
11020fi
11021
Guido van Rossum627b2d71993-12-24 10:39:16 +000011022# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11025$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011026if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011031$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011032int
11033main ()
11034{
11035static int test_array [1 - 2 * !(((char) -1) < 0)];
11036test_array [0] = 0
11037
11038 ;
11039 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011040}
Martin v. Löwis11437992002-04-12 09:54:03 +000011041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011042if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011043 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011044else
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11050$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011051if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053
11054fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11057$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011058if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063
Martin v. Löwis11437992002-04-12 09:54:03 +000011064int
11065main ()
11066{
11067/* FIXME: Include the comments suggested by Paul. */
11068#ifndef __cplusplus
11069 /* Ultrix mips cc rejects this. */
11070 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 char const *const *pcpcc;
11074 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 /* NEC SVR4.0.2 mips cc rejects this. */
11076 struct point {int x, y;};
11077 static struct point const zero = {0,0};
11078 /* AIX XL C 1.02.0.0 rejects this.
11079 It does not let you subtract one const X* pointer from another in
11080 an arm of an if-expression whose if-part is not a constant
11081 expression */
11082 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085 ++pcpcc;
11086 ppc = (char**) pcpcc;
11087 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 { /* SCO 3.2v4 cc rejects this. */
11089 char *t;
11090 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 }
11095 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11096 int x[] = {25, 17};
11097 const int *foo = &x[0];
11098 ++foo;
11099 }
11100 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11101 typedef const int *iptr;
11102 iptr p = 0;
11103 ++p;
11104 }
11105 { /* AIX XL C 1.02.0.0 rejects this saying
11106 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11107 struct s { int j; const int *ap[3]; };
11108 struct s *b; b->j = 5;
11109 }
11110 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11111 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011115#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ;
11118 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119}
Martin v. Löwis11437992002-04-12 09:54:03 +000011120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011122 ac_cv_c_const=yes
11123else
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11129$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011130if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133
11134fi
11135
Michael W. Hudson54241132001-12-07 15:38:26 +000011136
Guido van Rossumda88dad1995-01-26 00:46:29 +000011137works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11139$as_echo_n "checking for working volatile... " >&6; }
11140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011141/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011142
Martin v. Löwis11437992002-04-12 09:54:03 +000011143int
11144main ()
11145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ;
11148 return 0;
11149}
11150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011152 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011153else
Skip Montanaro6dead952003-09-25 14:50:04 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011156
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011157
Guido van Rossum627b2d71993-12-24 10:39:16 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11161$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011162
Guido van Rossumda88dad1995-01-26 00:46:29 +000011163works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11165$as_echo_n "checking for working signed char... " >&6; }
11166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011168
Martin v. Löwis11437992002-04-12 09:54:03 +000011169int
11170main ()
11171{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011178 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011179else
Skip Montanaro6dead952003-09-25 14:50:04 +000011180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011183
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11187$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011188
Guido van Rossumda88dad1995-01-26 00:46:29 +000011189have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11191$as_echo_n "checking for prototypes... " >&6; }
11192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011194int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011195int
11196main ()
11197{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11211$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212
Guido van Rossumda88dad1995-01-26 00:46:29 +000011213works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11215$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011218
11219#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011220int foo(int x, ...) {
11221 va_list va;
11222 va_start(va, x);
11223 va_arg(va, int);
11224 va_arg(va, char *);
11225 va_arg(va, double);
11226 return 0;
11227}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011228
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Guido van Rossum90eea071996-08-30 20:58:57 +000011232return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
11239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011242 works=yes
11243
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11247$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011248
Martin v. Löwisd6320502004-08-12 13:45:08 +000011249# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11251$as_echo_n "checking for socketpair... " >&6; }
11252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011253/* end confdefs.h. */
11254
11255#include <sys/types.h>
11256#include <sys/socket.h>
11257
11258int
11259main ()
11260{
11261void *x=socketpair
11262 ;
11263 return 0;
11264}
11265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011269
Matthias Kloseb159a552010-04-25 21:00:44 +000011270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011272else
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011275
11276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011279# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11281$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284#include <sys/types.h>
11285#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011289struct sockaddr x;
11290x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11297$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011300
11301else
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011304
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011307
Guido van Rossumda88dad1995-01-26 00:46:29 +000011308va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11310$as_echo_n "checking whether va_list is an array... " >&6; }
11311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313
11314#ifdef HAVE_STDARG_PROTOTYPES
11315#include <stdarg.h>
11316#else
11317#include <varargs.h>
11318#endif
11319
Martin v. Löwis11437992002-04-12 09:54:03 +000011320int
11321main ()
11322{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
11329
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330else
Skip Montanaro6dead952003-09-25 14:50:04 +000011331
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
Guido van Rossumda88dad1995-01-26 00:46:29 +000011335 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011336
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11340$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011342# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
11344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011346if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11351$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352 OLD_CFLAGS=$CFLAGS
11353 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011356
11357# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Martin v. Löwis11437992002-04-12 09:54:03 +000011359int
11360main ()
11361{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362
11363 char *name;
11364 struct hostent *he, *res;
11365 char buffer[2048];
11366 int buflen = 2048;
11367 int h_errnop;
11368
11369 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
11371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011378
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11383$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011385else
Skip Montanaro6dead952003-09-25 14:50:04 +000011386
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11390$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011394# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Martin v. Löwis11437992002-04-12 09:54:03 +000011396int
11397main ()
11398{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011399
11400 char *name;
11401 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011402 char buffer[2048];
11403 int buflen = 2048;
11404 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
11408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011415
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Matthias Kloseb159a552010-04-25 21:00:44 +000011417$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11420$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011421
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011422else
Skip Montanaro6dead952003-09-25 14:50:04 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11425$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11427$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11429/* end confdefs.h. */
11430
11431# include <netdb.h>
11432
11433int
11434main ()
11435{
11436
11437 char *name;
11438 struct hostent *he;
11439 struct hostent_data data;
11440
11441 (void) gethostbyname_r(name, he, &data);
11442
11443 ;
11444 return 0;
11445}
11446_ACEOF
11447if ac_fn_c_try_compile "$LINENO"; then :
11448
11449 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11450
11451
11452$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11453
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11455$as_echo "yes" >&6; }
11456
11457else
11458
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470 CFLAGS=$OLD_CFLAGS
11471
11472else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 for ac_func in gethostbyname
11475do :
11476 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011477if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011479#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011480_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011482fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011483done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011484
Michael W. Hudson54241132001-12-07 15:38:26 +000011485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011486fi
11487
Michael W. Hudson54241132001-12-07 15:38:26 +000011488
11489
11490
11491
11492
11493
Guido van Rossum627b2d71993-12-24 10:39:16 +000011494# checks for system services
11495# (none yet)
11496
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011497# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011498ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011499if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011500
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011501else
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11503$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011504if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506else
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011508LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512/* Override any GCC internal prototype to avoid an error.
11513 Use char because int might match the return type of a GCC
11514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011515#ifdef __cplusplus
11516extern "C"
11517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011518char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011519int
11520main ()
11521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ;
11524 return 0;
11525}
11526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011529else
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011532rm -f core conftest.err conftest.$ac_objext \
11533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11537$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011538if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 cat >>confdefs.h <<_ACEOF
11540#define HAVE_LIBIEEE 1
11541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011542
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011543 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011544
Guido van Rossum627b2d71993-12-24 10:39:16 +000011545fi
11546
Michael W. Hudson54241132001-12-07 15:38:26 +000011547
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011548fi
11549
Michael W. Hudson54241132001-12-07 15:38:26 +000011550
Guido van Rossum7f253911997-05-09 02:42:48 +000011551# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11553$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011556if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011558if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011559then
11560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11564$as_echo "yes" >&6; }
11565else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11566$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011567fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011571fi
11572
Guido van Rossum7f253911997-05-09 02:42:48 +000011573
Guido van Rossum7f43da71994-08-01 12:15:30 +000011574# check for --with-libm=...
11575
Guido van Rossum563e7081996-09-10 18:20:48 +000011576case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011577Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011578*) LIBM=-lm
11579esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11581$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011586if test "$withval" = no
11587then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11589$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011590elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011591then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11593$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011594else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011595fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011596else
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11598$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599fi
11600
Guido van Rossum7f43da71994-08-01 12:15:30 +000011601
11602# check for --with-libc=...
11603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11605$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011610if test "$withval" = no
11611then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11613$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011614elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011615then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11617$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011618else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011619fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11622$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623fi
11624
Guido van Rossum7f43da71994-08-01 12:15:30 +000011625
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626# **************************************************
11627# * Check for various properties of floating point *
11628# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11631$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011632if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634else
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637 ac_cv_little_endian_double=no
11638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640/* end confdefs.h. */
11641
11642#include <string.h>
11643int main() {
11644 double x = 9006104071832581.0;
11645 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11646 return 0;
11647 else
11648 return 1;
11649}
11650
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 ac_cv_little_endian_double=yes
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659fi
11660
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011661fi
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11664$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665if test "$ac_cv_little_endian_double" = yes
11666then
11667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669
11670fi
11671
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11673$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011674if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011676else
11677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679 ac_cv_big_endian_double=no
11680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682/* end confdefs.h. */
11683
11684#include <string.h>
11685int main() {
11686 double x = 9006104071832581.0;
11687 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11688 return 0;
11689 else
11690 return 1;
11691}
11692
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695 ac_cv_big_endian_double=yes
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701fi
11702
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703fi
11704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11706$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707if test "$ac_cv_big_endian_double" = yes
11708then
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711
11712fi
11713
11714# Some ARM platforms use a mixed-endian representation for doubles.
11715# While Python doesn't currently have full support for these platforms
11716# (see e.g., issue 1762561), we can at least make sure that float <-> string
11717# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11719$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011720if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722else
11723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725 ac_cv_mixed_endian_double=no
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728/* end confdefs.h. */
11729
11730#include <string.h>
11731int main() {
11732 double x = 9006104071832581.0;
11733 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11734 return 0;
11735 else
11736 return 1;
11737}
11738
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741 ac_cv_mixed_endian_double=yes
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747fi
11748
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749fi
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11752$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753if test "$ac_cv_mixed_endian_double" = yes
11754then
11755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757
11758fi
11759
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011760# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011761# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011762# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011763# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011764# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011765# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011766
11767# This inline assembler syntax may also work for suncc and icc,
11768# so we try it on all platforms.
11769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11771$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011773/* end confdefs.h. */
11774
11775int
11776main ()
11777{
11778
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011779 unsigned short cw;
11780 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11781 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782
11783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788 have_gcc_asm_for_x87=yes
11789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11794$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011795if test "$have_gcc_asm_for_x87" = yes
11796then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011802# Detect whether system arithmetic is subject to x87-style double
11803# rounding issues. The result of this test has little meaning on non
11804# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11805# mode is round-to-nearest and double rounding issues are present, and
11806# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11808$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809# $BASECFLAGS may affect the result
11810ac_save_cc="$CC"
11811CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011813 ac_cv_x87_double_rounding=no
11814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011816/* end confdefs.h. */
11817
11818#include <stdlib.h>
11819#include <math.h>
11820int main() {
11821 volatile double x, y, z;
11822 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11823 x = 0.99999999999999989; /* 1-2**-53 */
11824 y = 1./x;
11825 if (y != 1.)
11826 exit(0);
11827 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11828 x = 1e16;
11829 y = 2.99999;
11830 z = x + y;
11831 if (z != 1e16+4.)
11832 exit(0);
11833 /* both tests show evidence of double rounding */
11834 exit(1);
11835}
11836
11837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011838if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011839 ac_cv_x87_double_rounding=no
11840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011845fi
11846
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011847CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11849$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011850if test "$ac_cv_x87_double_rounding" = yes
11851then
11852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854
11855fi
11856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857# ************************************
11858# * Check for mathematical functions *
11859# ************************************
11860
11861LIBS_SAVE=$LIBS
11862LIBS="$LIBS $LIBM"
11863
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011864for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11865do :
11866 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11867ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011868if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011869 cat >>confdefs.h <<_ACEOF
11870#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11871_ACEOF
11872
11873fi
11874done
11875
11876for ac_func in hypot lgamma log1p round tgamma
11877do :
11878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011880if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011881 cat >>confdefs.h <<_ACEOF
11882#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11883_ACEOF
11884
11885fi
11886done
11887
11888ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11889"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011890if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011891 ac_have_decl=1
11892else
11893 ac_have_decl=0
11894fi
11895
11896cat >>confdefs.h <<_ACEOF
11897#define HAVE_DECL_ISINF $ac_have_decl
11898_ACEOF
11899ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11900"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011901if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011902 ac_have_decl=1
11903else
11904 ac_have_decl=0
11905fi
11906
11907cat >>confdefs.h <<_ACEOF
11908#define HAVE_DECL_ISNAN $ac_have_decl
11909_ACEOF
11910ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11911"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011912if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011913 ac_have_decl=1
11914else
11915 ac_have_decl=0
11916fi
11917
11918cat >>confdefs.h <<_ACEOF
11919#define HAVE_DECL_ISFINITE $ac_have_decl
11920_ACEOF
11921
11922
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011923# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11924# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11926$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011927if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011929else
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011932 ac_cv_tanh_preserves_zero_sign=no
11933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011935/* end confdefs.h. */
11936
11937#include <math.h>
11938#include <stdlib.h>
11939int main() {
11940 /* return 0 if either negative zeros don't exist
11941 on this platform or if negative zeros exist
11942 and tanh(-0.) == -0. */
11943 if (atan2(0., -1.) == atan2(-0., -1.) ||
11944 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11945 else exit(1);
11946}
11947
11948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011950 ac_cv_tanh_preserves_zero_sign=yes
11951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011956fi
11957
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011958fi
11959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11961$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011962if test "$ac_cv_tanh_preserves_zero_sign" = yes
11963then
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011966
11967fi
11968
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011969if test "$ac_cv_func_log1p" = yes
11970then
11971 # On some versions of AIX, log1p(-0.) returns 0. instead of
11972 # -0. See issue #9920.
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11974$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011975 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011976 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011977else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011978
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011979 if test "$cross_compiling" = yes; then :
11980 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011981else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011984
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011985 #include <math.h>
11986 #include <stdlib.h>
11987 int main() {
11988 /* Fail if the signs of log1p(-0.) and -0. can be
11989 distinguished. */
11990 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11991 return 0;
11992 else
11993 return 1;
11994 }
11995
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011996_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011997if ac_fn_c_try_run "$LINENO"; then :
11998 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011999else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012000 ac_cv_log1p_drops_zero_sign=yes
12001fi
12002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012004fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012005
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012006fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012007
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12009$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12010fi
12011if test "$ac_cv_log1p_drops_zero_sign" = yes
12012then
12013
12014$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12015
12016fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012017
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012018LIBS=$LIBS_SAVE
12019
Mark Dickinsona614f042009-11-28 12:48:43 +000012020# For multiprocessing module, check that sem_open
12021# actually works. For FreeBSD versions <= 7.2,
12022# the kernel module that provides POSIX semaphores
12023# isn't loaded by default, so an attempt to call
12024# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12026$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012027if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012031 ac_cv_posix_semaphores_enabled=yes
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012034/* end confdefs.h. */
12035
12036#include <unistd.h>
12037#include <fcntl.h>
12038#include <stdio.h>
12039#include <semaphore.h>
12040#include <sys/stat.h>
12041
12042int main(void) {
12043 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12044 if (a == SEM_FAILED) {
12045 perror("sem_open");
12046 return 1;
12047 }
12048 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012049 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012050 return 0;
12051}
12052
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012055 ac_cv_posix_semaphores_enabled=yes
12056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012061fi
12062
12063
Mark Dickinsona614f042009-11-28 12:48:43 +000012064fi
12065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12067$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012068if test $ac_cv_posix_semaphores_enabled = no
12069then
12070
Matthias Kloseb9621712010-04-24 17:59:49 +000012071$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012072
12073fi
12074
Mark Dickinson10683072009-04-18 21:18:19 +000012075# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12077$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012078if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012082 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012085/* end confdefs.h. */
12086
12087#include <unistd.h>
12088#include <fcntl.h>
12089#include <stdio.h>
12090#include <semaphore.h>
12091#include <sys/stat.h>
12092
12093int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012094 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012095 int count;
12096 int res;
12097 if(a==SEM_FAILED){
12098 perror("sem_open");
12099 return 1;
12100
12101 }
12102 res = sem_getvalue(a, &count);
12103 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012104 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012105 return res==-1 ? 1 : 0;
12106}
12107
Mark Dickinson10683072009-04-18 21:18:19 +000012108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012110 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012116fi
12117
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012119fi
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12122$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012123if test $ac_cv_broken_sem_getvalue = yes
12124then
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012127
12128fi
12129
Mark Dickinsonbd792642009-03-18 20:06:12 +000012130# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12132$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012133# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012135 enableval=$enable_big_digits; case $enable_big_digits in
12136yes)
12137 enable_big_digits=30 ;;
12138no)
12139 enable_big_digits=15 ;;
1214015|30)
12141 ;;
12142*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012143 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 +000012144esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12146$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012147
12148cat >>confdefs.h <<_ACEOF
12149#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12150_ACEOF
12151
12152
12153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12155$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012156fi
12157
12158
Guido van Rossumef2255b2000-03-10 22:30:29 +000012159# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012160ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012161if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
12163
Matthias Kloseb9621712010-04-24 17:59:49 +000012164$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012166 wchar_h="yes"
12167
Guido van Rossumef2255b2000-03-10 22:30:29 +000012168else
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012170
12171fi
12172
Michael W. Hudson54241132001-12-07 15:38:26 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012175# determine wchar_t size
12176if test "$wchar_h" = yes
12177then
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12181# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12183$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012184if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12188"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
Martin v. Löwis11437992002-04-12 09:54:03 +000012190else
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 if test "$ac_cv_type_wchar_t" = yes; then
12192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012194as_fn_error 77 "cannot compute sizeof (wchar_t)
12195See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196 else
12197 ac_cv_sizeof_wchar_t=0
12198 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200
Martin v. Löwis11437992002-04-12 09:54:03 +000012201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12203$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204
12205
12206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012208#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012209_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012210
Michael W. Hudson54241132001-12-07 15:38:26 +000012211
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012212fi
12213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12215$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012216have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012218/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012219
12220#include <tcl.h>
12221#if TCL_UTF_MAX != 6
12222# error "NOT UCS4_TCL"
12223#endif
12224int
12225main ()
12226{
12227
12228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012233
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012236
12237 have_ucs4_tcl=yes
12238
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12242$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012243
Skip Montanaro6dead952003-09-25 14:50:04 +000012244# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012245if test "$wchar_h" = yes
12246then
12247 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12249$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012250 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012252else
12253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012255 ac_cv_wchar_t_signed=yes
12256else
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012258/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012259
12260 #include <wchar.h>
12261 int main()
12262 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012263 /* Success: exit code 0 */
12264 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012265 }
12266
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012269 ac_cv_wchar_t_signed=yes
12270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12274 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012275fi
12276
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012277fi
12278
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12280$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281fi
12282
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12284$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012285
12286# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012288 withval=$with_wide_unicode;
12289if test "$withval" != no
12290then unicode_size="4"
12291else unicode_size="2"
12292fi
12293
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012294else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295
Georg Brandl52d168a2008-01-07 18:10:24 +000012296case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012297 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012298 *) unicode_size="2" ;;
12299esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012300
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012301fi
12302
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012303
12304
Georg Brandl52d168a2008-01-07 18:10:24 +000012305case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012306 4)
12307 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12308
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012309 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012310 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012312 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012313esac
12314
Michael W. Hudson54241132001-12-07 15:38:26 +000012315
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Georg Brandl52d168a2008-01-07 18:10:24 +000012317# wchar_t is only usable if it maps to an unsigned type
12318if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012319 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012320then
12321 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012326
Georg Brandl52d168a2008-01-07 18:10:24 +000012327elif test "$ac_cv_sizeof_short" = "$unicode_size"
12328then
12329 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012331
Georg Brandl52d168a2008-01-07 18:10:24 +000012332elif test "$ac_cv_sizeof_long" = "$unicode_size"
12333then
12334 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012336
Georg Brandl52d168a2008-01-07 18:10:24 +000012337else
12338 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12341$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342
12343# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12345$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012346if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012348else
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 ac_cv_c_bigendian=unknown
12350 # See if we're dealing with a universal compiler.
12351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352/* end confdefs.h. */
12353#ifndef __APPLE_CC__
12354 not a universal capable compiler
12355 #endif
12356 typedef int dummy;
12357
Skip Montanaro6dead952003-09-25 14:50:04 +000012358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
12360
12361 # Check for potential -arch flags. It is not universal unless
12362 # there are at least two -arch flags with different values.
12363 ac_arch=
12364 ac_prev=
12365 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12366 if test -n "$ac_prev"; then
12367 case $ac_word in
12368 i?86 | x86_64 | ppc | ppc64)
12369 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12370 ac_arch=$ac_word
12371 else
12372 ac_cv_c_bigendian=universal
12373 break
12374 fi
12375 ;;
12376 esac
12377 ac_prev=
12378 elif test "x$ac_word" = "x-arch"; then
12379 ac_prev=arch
12380 fi
12381 done
12382fi
12383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12384 if test $ac_cv_c_bigendian = unknown; then
12385 # See if sys/param.h defines the BYTE_ORDER macro.
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012387/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012388#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012390
Martin v. Löwis11437992002-04-12 09:54:03 +000012391int
12392main ()
12393{
Matthias Kloseb9621712010-04-24 17:59:49 +000012394#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12395 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12396 && LITTLE_ENDIAN)
12397 bogus endian macros
12398 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
12400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012405 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012407/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012408#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012410
Martin v. Löwis11437992002-04-12 09:54:03 +000012411int
12412main ()
12413{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012414#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 not big endian
12416 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012417
12418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012423 ac_cv_c_bigendian=yes
12424else
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012428fi
12429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12430 fi
12431 if test $ac_cv_c_bigendian = unknown; then
12432 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012435#include <limits.h>
12436
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
Matthias Kloseb9621712010-04-24 17:59:49 +000012440#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12441 bogus endian macros
12442 #endif
12443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_compile "$LINENO"; then :
12449 # It does; now see whether it defined to _BIG_ENDIAN or not.
12450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12451/* end confdefs.h. */
12452#include <limits.h>
12453
12454int
12455main ()
12456{
12457#ifndef _BIG_ENDIAN
12458 not big endian
12459 #endif
12460
12461 ;
12462 return 0;
12463}
12464_ACEOF
12465if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12471fi
12472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12473 fi
12474 if test $ac_cv_c_bigendian = unknown; then
12475 # Compile a test program.
12476 if test "$cross_compiling" = yes; then :
12477 # Try to guess by grepping values from an object file.
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479/* end confdefs.h. */
12480short int ascii_mm[] =
12481 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12482 short int ascii_ii[] =
12483 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12484 int use_ascii (int i) {
12485 return ascii_mm[i] + ascii_ii[i];
12486 }
12487 short int ebcdic_ii[] =
12488 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12489 short int ebcdic_mm[] =
12490 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12491 int use_ebcdic (int i) {
12492 return ebcdic_mm[i] + ebcdic_ii[i];
12493 }
12494 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496int
12497main ()
12498{
12499return use_ascii (foo) == use_ebcdic (foo);
12500 ;
12501 return 0;
12502}
12503_ACEOF
12504if ac_fn_c_try_compile "$LINENO"; then :
12505 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12506 ac_cv_c_bigendian=yes
12507 fi
12508 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12509 if test "$ac_cv_c_bigendian" = unknown; then
12510 ac_cv_c_bigendian=no
12511 else
12512 # finding both strings is unlikely to happen, but who knows?
12513 ac_cv_c_bigendian=unknown
12514 fi
12515 fi
12516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012520/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 /* Are we little or big endian? From Harbison&Steele. */
12527 union
12528 {
12529 long int l;
12530 char c[sizeof (long int)];
12531 } u;
12532 u.l = 1;
12533 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534
12535 ;
12536 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012537}
Martin v. Löwis11437992002-04-12 09:54:03 +000012538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012539if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012540 ac_cv_c_bigendian=no
12541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12551$as_echo "$ac_cv_c_bigendian" >&6; }
12552 case $ac_cv_c_bigendian in #(
12553 yes)
12554 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12555;; #(
12556 no)
12557 ;; #(
12558 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 ;; #(
12563 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012564 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012565 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012567
Michael W. Hudson54241132001-12-07 15:38:26 +000012568
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012569# ABI version string for Python extension modules. This appears between the
12570# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12571# from the following attributes which affect the ABI of this Python build (in
12572# this order):
12573#
12574# * The Python implementation (always 'cpython-' for us)
12575# * The major and minor version numbers
12576# * --with-pydebug (adds a 'd')
12577# * --with-pymalloc (adds a 'm')
12578# * --with-wide-unicode (adds a 'u')
12579#
12580# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012581# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12582# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012583
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12585$as_echo_n "checking ABIFLAGS... " >&6; }
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12587$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12589$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012590SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12592$as_echo "$SOABI" >&6; }
12593
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12595$as_echo_n "checking LDVERSION... " >&6; }
12596LDVERSION='$(VERSION)$(ABIFLAGS)'
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12598$as_echo "$LDVERSION" >&6; }
12599
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012600# SO is the extension of shared libraries `(including the dot!)
12601# -- usually .so, .sl on HP-UX, .dll on Cygwin
12602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12603$as_echo_n "checking SO... " >&6; }
12604if test -z "$SO"
12605then
12606 case $ac_sys_system in
12607 hp*|HP*)
12608 case `uname -m` in
12609 ia64) SO=.so;;
12610 *) SO=.sl;;
12611 esac
12612 ;;
12613 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012614 Linux*|GNU*)
12615 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012616 *) SO=.so;;
12617 esac
12618else
12619 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012620 echo
12621 echo '====================================================================='
12622 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012623 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012624 echo '+ Do you really mean to change the extension for shared libraries? +'
12625 echo '+ Continuing in 10 seconds to let you to ponder. +'
12626 echo '+ +'
12627 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012628 sleep 10
12629fi
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12631$as_echo "$SO" >&6; }
12632
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012633# Check whether right shifting a negative integer extends the sign bit
12634# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12636$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012637if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012639else
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012642 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012646
12647int main()
12648{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012649 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012650}
12651
Martin v. Löwis11437992002-04-12 09:54:03 +000012652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012654 ac_cv_rshift_extends_sign=yes
12655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012660fi
12661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662fi
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12665$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012666if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012667then
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012670
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012671fi
12672
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012673# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12675$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012676if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012681/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012682#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012686
12687 FILE *f = fopen("/dev/null", "r");
12688 flockfile(f);
12689 getc_unlocked(f);
12690 funlockfile(f);
12691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012697 ac_cv_have_getc_unlocked=yes
12698else
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 ac_cv_have_getc_unlocked=no
12700fi
12701rm -f core conftest.err conftest.$ac_objext \
12702 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12706$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012707if test "$ac_cv_have_getc_unlocked" = yes
12708then
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012711
12712fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012714# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012715# save the value of LIBS so we don't actually link Python with readline
12716LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012717
Gregory P. Smith18820942008-09-07 06:24:49 +000012718# On some systems we need to link readline to a termcap compatible
12719# library. NOTE: Keep the precedence of listed libraries synchronised
12720# with setup.py.
12721py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12723$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012724for py_libtermcap in "" ncursesw ncurses curses termcap; do
12725 if test -z "$py_libtermcap"; then
12726 READLINE_LIBS="-lreadline"
12727 else
12728 READLINE_LIBS="-lreadline -l$py_libtermcap"
12729 fi
12730 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012732/* end confdefs.h. */
12733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734/* Override any GCC internal prototype to avoid an error.
12735 Use char because int might match the return type of a GCC
12736 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012737#ifdef __cplusplus
12738extern "C"
12739#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012740char readline ();
12741int
12742main ()
12743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012745 ;
12746 return 0;
12747}
12748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012750 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012752rm -f core conftest.err conftest.$ac_objext \
12753 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012754 if test $py_cv_lib_readline = yes; then
12755 break
12756 fi
12757done
12758# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12759#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012760if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12762$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012763else
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12765$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012768
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012769fi
12770
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012771# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12773$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012774if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012776else
12777 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012778LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012780/* end confdefs.h. */
12781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782/* Override any GCC internal prototype to avoid an error.
12783 Use char because int might match the return type of a GCC
12784 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012785#ifdef __cplusplus
12786extern "C"
12787#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788char rl_callback_handler_install ();
12789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012798 ac_cv_lib_readline_rl_callback_handler_install=yes
12799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012804LIBS=$ac_check_lib_save_LIBS
12805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12807$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012808if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012811
12812fi
12813
12814
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012815# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012817/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012818#include <readline/readline.h>
12819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012821 have_readline=yes
12822else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012823 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012824
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012825fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012826rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012827if test $have_readline = yes
12828then
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012830/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012831#include <readline/readline.h>
12832
12833_ACEOF
12834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012838
12839fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012840rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012843/* end confdefs.h. */
12844#include <readline/readline.h>
12845
12846_ACEOF
12847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012851
12852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012853rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012854
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012855fi
12856
Martin v. Löwis0daad592001-09-30 21:09:59 +000012857# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12859$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012860if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012862else
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012864LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868/* Override any GCC internal prototype to avoid an error.
12869 Use char because int might match the return type of a GCC
12870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012871#ifdef __cplusplus
12872extern "C"
12873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012874char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ;
12880 return 0;
12881}
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888rm -f core conftest.err conftest.$ac_objext \
12889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012890LIBS=$ac_check_lib_save_LIBS
12891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12893$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012894if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012897
Martin v. Löwis0daad592001-09-30 21:09:59 +000012898fi
12899
Michael W. Hudson54241132001-12-07 15:38:26 +000012900
Thomas Wouters89d996e2007-09-08 17:39:28 +000012901# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12903$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012904if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012906else
12907 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012908LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012910/* end confdefs.h. */
12911
12912/* Override any GCC internal prototype to avoid an error.
12913 Use char because int might match the return type of a GCC
12914 builtin and then its argument prototype would still apply. */
12915#ifdef __cplusplus
12916extern "C"
12917#endif
12918char rl_completion_display_matches_hook ();
12919int
12920main ()
12921{
12922return rl_completion_display_matches_hook ();
12923 ;
12924 return 0;
12925}
12926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012927if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012928 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12929else
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012932rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012934LIBS=$ac_check_lib_save_LIBS
12935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12937$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012938if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012941
12942fi
12943
12944
Martin v. Löwis0daad592001-09-30 21:09:59 +000012945# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12947$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012948if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012950else
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012952LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956/* Override any GCC internal prototype to avoid an error.
12957 Use char because int might match the return type of a GCC
12958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012959#ifdef __cplusplus
12960extern "C"
12961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012962char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012973else
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012978LIBS=$ac_check_lib_save_LIBS
12979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12981$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012982if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012985
Guido van Rossum353ae582001-07-10 16:45:32 +000012986fi
12987
Jack Jansendd19cf82001-12-06 22:36:17 +000012988
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012989# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012991/* end confdefs.h. */
12992#include <readline/readline.h>
12993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012995 have_readline=yes
12996else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012997 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012998
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013000rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001if test $have_readline = yes
13002then
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004/* end confdefs.h. */
13005#include <readline/readline.h>
13006
13007_ACEOF
13008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013012
13013fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013014rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013015
13016fi
13017
Martin v. Löwis82bca632006-02-10 20:49:30 +000013018# End of readline checks: restore LIBS
13019LIBS=$LIBS_no_readline
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13022$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013023if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013025else
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013028 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013029else
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013032
13033int main()
13034{
13035 int val1 = nice(1);
13036 if (val1 != -1 && val1 == nice(2))
13037 exit(0);
13038 exit(1);
13039}
13040
Martin v. Löwis11437992002-04-12 09:54:03 +000013041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013042if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013043 ac_cv_broken_nice=yes
13044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013049fi
13050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051fi
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13054$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013055if test "$ac_cv_broken_nice" = yes
13056then
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013059
13060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13063$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013064if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013068 ac_cv_broken_poll=no
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013071/* end confdefs.h. */
13072
13073#include <poll.h>
13074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075int main()
13076{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013077 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013079
13080 close (42);
13081
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013082 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013083 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013084 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013085 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013086 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013087 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013088 return 1;
13089}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013090
13091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013092if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013093 ac_cv_broken_poll=yes
13094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13104$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013105if test "$ac_cv_broken_poll" = yes
13106then
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013109
13110fi
13111
Brett Cannon43802422005-02-10 20:48:03 +000013112# 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 +000013113# (which is not required by ISO C or UNIX spec) and/or if we support
13114# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013115ac_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 +000013116#include <$ac_cv_struct_tm>
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013119if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013120
13121cat >>confdefs.h <<_ACEOF
13122#define HAVE_STRUCT_TM_TM_ZONE 1
13123_ACEOF
13124
13125
13126fi
13127
13128if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013131
13132else
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13134"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013135if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139fi
13140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013142#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143_ACEOF
13144
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13146$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013147if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013151/* end confdefs.h. */
13152#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153#if !HAVE_DECL_TZNAME
13154extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013155#endif
13156
13157int
13158main ()
13159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013166 ac_cv_var_tzname=yes
13167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013170rm -f core conftest.err conftest.$ac_objext \
13171 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13174$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013175 if test $ac_cv_var_tzname = yes; then
13176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013178
13179 fi
13180fi
13181
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013182
Martin v. Löwis1d459062005-03-14 21:23:33 +000013183# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13185$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013186if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013188else
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013191 ac_cv_working_tzset=no
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013194/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195
13196#include <stdlib.h>
13197#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013198#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013199
13200#if HAVE_TZNAME
13201extern char *tzname[];
13202#endif
13203
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013204int main()
13205{
Brett Cannon18367812003-09-19 00:59:16 +000013206 /* Note that we need to ensure that not only does tzset(3)
13207 do 'something' with localtime, but it works as documented
13208 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013209 This includes making sure that tzname is set properly if
13210 tm->tm_zone does not exist since it is the alternative way
13211 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013212
13213 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013214 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013215 */
13216
Martin v. Löwis1d459062005-03-14 21:23:33 +000013217 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013218 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13219
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013220 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013221 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013222 if (localtime(&groundhogday)->tm_hour != 0)
13223 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013224#if HAVE_TZNAME
13225 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13226 if (strcmp(tzname[0], "UTC") ||
13227 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13228 exit(1);
13229#endif
Brett Cannon18367812003-09-19 00:59:16 +000013230
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013231 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013232 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013233 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013235#if HAVE_TZNAME
13236 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13237 exit(1);
13238#endif
Brett Cannon18367812003-09-19 00:59:16 +000013239
13240 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13241 tzset();
13242 if (localtime(&groundhogday)->tm_hour != 11)
13243 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013244#if HAVE_TZNAME
13245 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13246 exit(1);
13247#endif
13248
13249#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013250 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13251 exit(1);
13252 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13253 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013254#endif
Brett Cannon18367812003-09-19 00:59:16 +000013255
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013256 exit(0);
13257}
13258
13259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013261 ac_cv_working_tzset=yes
13262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13266 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013267fi
13268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269fi
13270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13272$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273if test "$ac_cv_working_tzset" = yes
13274then
13275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013277
13278fi
13279
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013280# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13282$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013283if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013288#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013289int
13290main ()
13291{
13292
13293struct stat st;
13294st.st_mtim.tv_nsec = 1;
13295
13296 ;
13297 return 0;
13298}
13299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013301 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306fi
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13309$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013310if test "$ac_cv_stat_tv_nsec" = yes
13311then
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013314
13315fi
13316
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013317# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13319$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013320if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013324/* end confdefs.h. */
13325#include <sys/stat.h>
13326int
13327main ()
13328{
13329
13330struct stat st;
13331st.st_mtimespec.tv_nsec = 1;
13332
13333 ;
13334 return 0;
13335}
13336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013338 ac_cv_stat_tv_nsec2=yes
13339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13343fi
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13346$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013347if test "$ac_cv_stat_tv_nsec2" = yes
13348then
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013351
13352fi
13353
Jack Jansen666b1e72001-10-31 12:11:48 +000013354# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13356$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013357if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013361/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013362#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013363int
13364main ()
13365{
Jack Jansen666b1e72001-10-31 12:11:48 +000013366
13367 int rtn;
13368 rtn = mvwdelch(0,0,0);
13369
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013375 ac_cv_mvwdelch_is_expression=yes
13376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13380fi
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13383$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013384
13385if test "$ac_cv_mvwdelch_is_expression" = yes
13386then
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013389
13390fi
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13393$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013394if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013399#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013400int
13401main ()
13402{
Jack Jansen666b1e72001-10-31 12:11:48 +000013403
13404 WINDOW *w;
13405 w->_flags = 0;
13406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 ;
13408 return 0;
13409}
13410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013411if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013412 ac_cv_window_has_flags=yes
13413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13417fi
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13420$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013421
Jack Jansen666b1e72001-10-31 12:11:48 +000013422
13423if test "$ac_cv_window_has_flags" = yes
13424then
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013427
13428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13431$as_echo_n "checking for is_term_resized... " >&6; }
13432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013433/* end confdefs.h. */
13434#include <curses.h>
13435int
13436main ()
13437{
13438void *x=is_term_resized
13439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013446
Matthias Kloseb159a552010-04-25 21:00:44 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13451$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013452
13453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13457$as_echo_n "checking for resize_term... " >&6; }
13458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013459/* end confdefs.h. */
13460#include <curses.h>
13461int
13462main ()
13463{
13464void *x=resize_term
13465 ;
13466 return 0;
13467}
13468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013469if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013472
Matthias Kloseb159a552010-04-25 21:00:44 +000013473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13477$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013478
13479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13483$as_echo_n "checking for resizeterm... " >&6; }
13484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013485/* end confdefs.h. */
13486#include <curses.h>
13487int
13488main ()
13489{
13490void *x=resizeterm
13491 ;
13492 return 0;
13493}
13494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013495if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013498
Matthias Kloseb159a552010-04-25 21:00:44 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013501else
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013504
13505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13509$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013510
13511if test -r /dev/ptmx
13512then
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13514$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013517
Thomas Wouters89f507f2006-12-13 04:49:30 +000013518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13520$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013521fi
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13524$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013525
13526if test -r /dev/ptc
13527then
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13529$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013532
Thomas Wouters89f507f2006-12-13 04:49:30 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13535$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013536fi
13537
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013538if test "$have_long_long" = yes
13539then
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13541$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013542 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013546 ac_cv_have_long_long_format=no
13547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013549/* end confdefs.h. */
13550
13551 #include <stdio.h>
13552 #include <stddef.h>
13553 #include <string.h>
13554
13555 #ifdef HAVE_SYS_TYPES_H
13556 #include <sys/types.h>
13557 #endif
13558
13559 int main()
13560 {
13561 char buffer[256];
13562
13563 if (sprintf(buffer, "%lld", (long long)123) < 0)
13564 return 1;
13565 if (strcmp(buffer, "123"))
13566 return 1;
13567
13568 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13569 return 1;
13570 if (strcmp(buffer, "-123"))
13571 return 1;
13572
13573 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13574 return 1;
13575 if (strcmp(buffer, "123"))
13576 return 1;
13577
13578 return 0;
13579 }
13580
13581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013582if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013583 ac_cv_have_long_long_format=yes
13584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013589fi
13590
13591
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013592fi
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13595$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013596fi
13597
Mark Dickinson89d7d412009-12-31 20:50:59 +000013598if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013599then
13600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013602
13603fi
13604
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013605if test $ac_sys_system = Darwin
13606then
13607 LIBS="$LIBS -framework CoreFoundation"
13608fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13611$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013612if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013616 ac_cv_have_size_t_format="cross -- assuming yes"
13617
Thomas Wouters477c8d52006-05-27 19:21:47 +000013618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013620/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013621
Thomas Wouters477c8d52006-05-27 19:21:47 +000013622#include <stdio.h>
13623#include <stddef.h>
13624#include <string.h>
13625
Christian Heimes2c181612007-12-17 20:04:13 +000013626#ifdef HAVE_SYS_TYPES_H
13627#include <sys/types.h>
13628#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013629
13630#ifdef HAVE_SSIZE_T
13631typedef ssize_t Py_ssize_t;
13632#elif SIZEOF_VOID_P == SIZEOF_LONG
13633typedef long Py_ssize_t;
13634#else
13635typedef int Py_ssize_t;
13636#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013637
Christian Heimes2c181612007-12-17 20:04:13 +000013638int main()
13639{
13640 char buffer[256];
13641
Thomas Wouters477c8d52006-05-27 19:21:47 +000013642 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13643 return 1;
13644
Thomas Wouters89f507f2006-12-13 04:49:30 +000013645 if (strcmp(buffer, "123"))
13646 return 1;
13647
13648 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13649 return 1;
13650
13651 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013652 return 1;
13653
13654 return 0;
13655}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013656
Thomas Wouters477c8d52006-05-27 19:21:47 +000013657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013658if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013665fi
13666
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13669$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013670if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013673
13674fi
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013677#ifdef HAVE_SYS_TYPES_H
13678#include <sys/types.h>
13679#endif
13680#ifdef HAVE_SYS_SOCKET_H
13681#include <sys/socket.h>
13682#endif
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013685if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013686
Martin v. Löwis11437992002-04-12 09:54:03 +000013687else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013690
13691fi
13692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13695$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013696if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013700 ac_cv_broken_mbstowcs=no
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013703/* end confdefs.h. */
13704
13705#include<stdlib.h>
13706int main() {
13707 size_t len = -1;
13708 const char *str = "text";
13709 len = mbstowcs(NULL, str, 0);
13710 return (len != 4);
13711}
13712
13713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013715 ac_cv_broken_mbstowcs=no
13716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013721fi
13722
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013723fi
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13726$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013727if test "$ac_cv_broken_mbstowcs" = yes
13728then
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013731
13732fi
13733
Antoine Pitrou042b1282010-08-13 21:15:58 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13735$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013736if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013737 $as_echo_n "(cached) " >&6
13738else
13739 if test "$cross_compiling" = yes; then :
13740 ac_cv_computed_gotos=no
13741else
13742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13743/* end confdefs.h. */
13744
13745int main(int argc, char **argv)
13746{
13747 static void *targets[1] = { &&LABEL1 };
13748 goto LABEL2;
13749LABEL1:
13750 return 0;
13751LABEL2:
13752 goto *targets[0];
13753 return 1;
13754}
13755
13756_ACEOF
13757if ac_fn_c_try_run "$LINENO"; then :
13758 ac_cv_computed_gotos=yes
13759else
13760 ac_cv_computed_gotos=no
13761fi
13762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13763 conftest.$ac_objext conftest.beam conftest.$ac_ext
13764fi
13765
13766fi
13767
13768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13769$as_echo "$ac_cv_computed_gotos" >&6; }
13770if test "$ac_cv_computed_gotos" = yes
13771then
13772
13773$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13774
13775fi
13776
Antoine Pitroub52ec782009-01-25 16:34:23 +000013777# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13779$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013780
13781# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013782if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013783 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013784if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013785then
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13790$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013791fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013792if test "$withval" = no
13793then
13794
13795$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13798$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013799fi
13800
Antoine Pitrou042b1282010-08-13 21:15:58 +000013801else
13802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13803$as_echo "no value specified" >&6; }
13804fi
13805
Antoine Pitroub52ec782009-01-25 16:34:23 +000013806
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013807case $ac_sys_system in
13808AIX*)
13809
13810$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13811 ;;
13812esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013813
Michael W. Hudson54241132001-12-07 15:38:26 +000013814
Jesus Cea6a792292010-05-03 21:18:48 +000013815case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013816 OSF*) as_fn_error $? "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013817esac
13818
Gregory P. Smith138fa432010-12-13 08:00:52 +000013819ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013820if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013821
13822$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13823
13824fi
Jesus Cea6a792292010-05-03 21:18:48 +000013825
13826
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013827
13828
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013829for h in `(cd $srcdir;echo Python/thread_*.h)`
13830do
13831 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13832done
13833
Michael W. Hudson54241132001-12-07 15:38:26 +000013834
Neal Norwitzd24499d2005-12-18 21:36:39 +000013835SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13837$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013838for dir in $SRCDIRS; do
13839 if test ! -d $dir; then
13840 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013841 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013842done
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13844$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013845
Guido van Rossum627b2d71993-12-24 10:39:16 +000013846# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013847ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013848
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013849ac_config_files="$ac_config_files Modules/ld_so_aix"
13850
Martin v. Löwis11437992002-04-12 09:54:03 +000013851cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852# This file is a shell script that caches the results of configure
13853# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013854# scripts and configure runs, see configure's option --config-cache.
13855# It is not useful on other systems. If it contains results you don't
13856# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857#
Martin v. Löwis11437992002-04-12 09:54:03 +000013858# config.status only pays attention to the cache file if you give it
13859# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860#
Skip Montanaro6dead952003-09-25 14:50:04 +000013861# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013862# loading this file, other *unset* `ac_cv_foo' will be assigned the
13863# following values.
13864
13865_ACEOF
13866
Guido van Rossumf78abae1997-01-21 22:02:36 +000013867# The following way of writing the cache mishandles newlines in values,
13868# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013870# Ultrix sh set writes to stderr and can't be redirected directly,
13871# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872(
13873 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13874 eval ac_val=\$$ac_var
13875 case $ac_val in #(
13876 *${as_nl}*)
13877 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13879$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880 esac
13881 case $ac_var in #(
13882 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13884 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885 esac ;;
13886 esac
13887 done
13888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13891 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 # `set' does not quote correctly, so add quotes: double-quote
13893 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013895 "s/'/'\\\\''/g;
13896 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 *)
13899 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 esac |
13903 sort
13904) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13910 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13912 :end' >>confcache
13913if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13914 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013915 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13917$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013918 if test ! -f "$cache_file" || test -h "$cache_file"; then
13919 cat confcache >"$cache_file"
13920 else
13921 case $cache_file in #(
13922 */* | ?:*)
13923 mv -f confcache "$cache_file"$$ &&
13924 mv -f "$cache_file"$$ "$cache_file" ;; #(
13925 *)
13926 mv -f confcache "$cache_file" ;;
13927 esac
13928 fi
13929 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013930 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13932$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013933 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013935rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013936
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013937test "x$prefix" = xNONE && prefix=$ac_default_prefix
13938# Let make expand exec_prefix.
13939test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013941DEFS=-DHAVE_CONFIG_H
13942
Skip Montanaro6dead952003-09-25 14:50:04 +000013943ac_libobjs=
13944ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013945U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013946for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13947 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13951 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13953 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013954done
13955LIBOBJS=$ac_libobjs
13956
13957LTLIBOBJS=$ac_ltlibobjs
13958
13959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013962: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013964ac_clean_files_save=$ac_clean_files
13965ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13967$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13968as_write_fail=0
13969cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013970#! $SHELL
13971# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013972# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013973# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013974# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013975
Martin v. Löwis11437992002-04-12 09:54:03 +000013976debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013977ac_cs_recheck=false
13978ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980SHELL=\${CONFIG_SHELL-$SHELL}
13981export SHELL
13982_ASEOF
13983cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13984## -------------------- ##
13985## M4sh Initialization. ##
13986## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988# Be more Bourne compatible
13989DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013990if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 emulate sh
13992 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013994 # is contrary to our usage. Disable this feature.
13995 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 case `(set -o) 2>/dev/null` in #(
13999 *posix*) :
14000 set -o posix ;; #(
14001 *) :
14002 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014004fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014005
14006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007as_nl='
14008'
14009export as_nl
14010# Printing a long string crashes Solaris 7 /usr/bin/printf.
14011as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14012as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14013as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14014# Prefer a ksh shell builtin over an external printf program on Solaris,
14015# but without wasting forks for bash or zsh.
14016if test -z "$BASH_VERSION$ZSH_VERSION" \
14017 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14018 as_echo='print -r --'
14019 as_echo_n='print -rn --'
14020elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14021 as_echo='printf %s\n'
14022 as_echo_n='printf %s'
14023else
14024 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14025 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14026 as_echo_n='/usr/ucb/echo -n'
14027 else
14028 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14029 as_echo_n_body='eval
14030 arg=$1;
14031 case $arg in #(
14032 *"$as_nl"*)
14033 expr "X$arg" : "X\\(.*\\)$as_nl";
14034 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14035 esac;
14036 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14037 '
14038 export as_echo_n_body
14039 as_echo_n='sh -c $as_echo_n_body as_echo'
14040 fi
14041 export as_echo_body
14042 as_echo='sh -c $as_echo_body as_echo'
14043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
14045# The user is always right.
14046if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 PATH_SEPARATOR=:
14048 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14049 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14050 PATH_SEPARATOR=';'
14051 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054
14055# IFS
14056# We need space, tab and new line, in precisely that order. Quoting is
14057# there to prevent editors from complaining about space-tab.
14058# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14059# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060IFS=" "" $as_nl"
14061
14062# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014063as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014064case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065 *[\\/]* ) as_myself=$0 ;;
14066 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014067for as_dir in $PATH
14068do
14069 IFS=$as_save_IFS
14070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14072 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075 ;;
14076esac
14077# We did not find ourselves, most probably we were run as `sh COMMAND'
14078# in which case we are not to be found in the path.
14079if test "x$as_myself" = x; then
14080 as_myself=$0
14081fi
14082if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14084 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085fi
14086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087# Unset variables that we do not need and which cause bugs (e.g. in
14088# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14089# suppresses any "Segmentation fault" message there. '((' could
14090# trigger a bug in pdksh 5.2.14.
14091for as_var in BASH_ENV ENV MAIL MAILPATH
14092do eval test x\${$as_var+set} = xset \
14093 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094done
14095PS1='$ '
14096PS2='> '
14097PS4='+ '
14098
14099# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014100LC_ALL=C
14101export LC_ALL
14102LANGUAGE=C
14103export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105# CDPATH.
14106(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14107
14108
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014109# as_fn_error STATUS ERROR [LINENO LOG_FD]
14110# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014111# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14112# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014113# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014114as_fn_error ()
14115{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014116 as_status=$1; test $as_status -eq 0 && as_status=1
14117 if test "$4"; then
14118 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14119 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014121 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 as_fn_exit $as_status
14123} # as_fn_error
14124
14125
14126# as_fn_set_status STATUS
14127# -----------------------
14128# Set $? to STATUS, without forking.
14129as_fn_set_status ()
14130{
14131 return $1
14132} # as_fn_set_status
14133
14134# as_fn_exit STATUS
14135# -----------------
14136# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14137as_fn_exit ()
14138{
14139 set +e
14140 as_fn_set_status $1
14141 exit $1
14142} # as_fn_exit
14143
14144# as_fn_unset VAR
14145# ---------------
14146# Portably unset VAR.
14147as_fn_unset ()
14148{
14149 { eval $1=; unset $1;}
14150}
14151as_unset=as_fn_unset
14152# as_fn_append VAR VALUE
14153# ----------------------
14154# Append the text in VALUE to the end of the definition contained in VAR. Take
14155# advantage of any shell optimizations that allow amortized linear growth over
14156# repeated appends, instead of the typical quadratic growth present in naive
14157# implementations.
14158if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14159 eval 'as_fn_append ()
14160 {
14161 eval $1+=\$2
14162 }'
14163else
14164 as_fn_append ()
14165 {
14166 eval $1=\$$1\$2
14167 }
14168fi # as_fn_append
14169
14170# as_fn_arith ARG...
14171# ------------------
14172# Perform arithmetic evaluation on the ARGs, and store the result in the
14173# global $as_val. Take advantage of shells that can avoid forks. The arguments
14174# must be portable across $(()) and expr.
14175if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14176 eval 'as_fn_arith ()
14177 {
14178 as_val=$(( $* ))
14179 }'
14180else
14181 as_fn_arith ()
14182 {
14183 as_val=`expr "$@" || test $? -eq 1`
14184 }
14185fi # as_fn_arith
14186
14187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188if expr a : '\(a\)' >/dev/null 2>&1 &&
14189 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14190 as_expr=expr
14191else
14192 as_expr=false
14193fi
14194
14195if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14196 as_basename=basename
14197else
14198 as_basename=false
14199fi
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14202 as_dirname=dirname
14203else
14204 as_dirname=false
14205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207as_me=`$as_basename -- "$0" ||
14208$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14209 X"$0" : 'X\(//\)$' \| \
14210 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014211$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212 sed '/^.*\/\([^/][^/]*\)\/*$/{
14213 s//\1/
14214 q
14215 }
14216 /^X\/\(\/\/\)$/{
14217 s//\1/
14218 q
14219 }
14220 /^X\/\(\/\).*/{
14221 s//\1/
14222 q
14223 }
14224 s/.*/./; q'`
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226# Avoid depending upon Character Ranges.
14227as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14228as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14229as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14230as_cr_digits='0123456789'
14231as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232
14233ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014234case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 xy) ECHO_C='\c';;
14239 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14240 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241 esac;;
14242*)
14243 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014244esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247if test -d conf$$.dir; then
14248 rm -f conf$$.dir/conf$$.file
14249else
14250 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014253if (echo >conf$$.file) 2>/dev/null; then
14254 if ln -s conf$$.file conf$$ 2>/dev/null; then
14255 as_ln_s='ln -s'
14256 # ... but there are two gotchas:
14257 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14258 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14259 # In both cases, we have to default to `cp -p'.
14260 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14261 as_ln_s='cp -p'
14262 elif ln conf$$.file conf$$ 2>/dev/null; then
14263 as_ln_s=ln
14264 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014267else
14268 as_ln_s='cp -p'
14269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14271rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273
14274# as_fn_mkdir_p
14275# -------------
14276# Create "$as_dir" as a directory, including parents if necessary.
14277as_fn_mkdir_p ()
14278{
14279
14280 case $as_dir in #(
14281 -*) as_dir=./$as_dir;;
14282 esac
14283 test -d "$as_dir" || eval $as_mkdir_p || {
14284 as_dirs=
14285 while :; do
14286 case $as_dir in #(
14287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14288 *) as_qdir=$as_dir;;
14289 esac
14290 as_dirs="'$as_qdir' $as_dirs"
14291 as_dir=`$as_dirname -- "$as_dir" ||
14292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14293 X"$as_dir" : 'X\(//\)[^/]' \| \
14294 X"$as_dir" : 'X\(//\)$' \| \
14295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14296$as_echo X"$as_dir" |
14297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14298 s//\1/
14299 q
14300 }
14301 /^X\(\/\/\)[^/].*/{
14302 s//\1/
14303 q
14304 }
14305 /^X\(\/\/\)$/{
14306 s//\1/
14307 q
14308 }
14309 /^X\(\/\).*/{
14310 s//\1/
14311 q
14312 }
14313 s/.*/./; q'`
14314 test -d "$as_dir" && break
14315 done
14316 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014317 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014318
14319
14320} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014321if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014323else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014324 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014325 as_mkdir_p=false
14326fi
14327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328if test -x / >/dev/null 2>&1; then
14329 as_test_x='test -x'
14330else
14331 if ls -dL / >/dev/null 2>&1; then
14332 as_ls_L_option=L
14333 else
14334 as_ls_L_option=
14335 fi
14336 as_test_x='
14337 eval sh -c '\''
14338 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 case $1 in #(
14342 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345 ???[sx]*):;;*)false;;esac;fi
14346 '\'' sh
14347 '
14348fi
14349as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
14351# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014352as_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 +000014353
14354# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357
Martin v. Löwis11437992002-04-12 09:54:03 +000014358exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014359## ----------------------------------- ##
14360## Main body of $CONFIG_STATUS script. ##
14361## ----------------------------------- ##
14362_ASEOF
14363test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14366# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014367# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368# values after options handling.
14369ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014370This file was extended by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014371generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
14373 CONFIG_FILES = $CONFIG_FILES
14374 CONFIG_HEADERS = $CONFIG_HEADERS
14375 CONFIG_LINKS = $CONFIG_LINKS
14376 CONFIG_COMMANDS = $CONFIG_COMMANDS
14377 $ $0 $@
14378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379on `(hostname || uname -n) 2>/dev/null | sed 1q`
14380"
14381
Martin v. Löwis11437992002-04-12 09:54:03 +000014382_ACEOF
14383
Matthias Kloseb9621712010-04-24 17:59:49 +000014384case $ac_config_files in *"
14385"*) set x $ac_config_files; shift; ac_config_files=$*;;
14386esac
14387
14388case $ac_config_headers in *"
14389"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14390esac
14391
14392
14393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014394# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014395config_files="$ac_config_files"
14396config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Matthias Kloseb9621712010-04-24 17:59:49 +000014400cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014401ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014402\`$as_me' instantiates files and other configuration actions
14403from templates according to the current configuration. Unless the files
14404and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
14408 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 --config print configuration, then exit
14411 -q, --quiet, --silent
14412 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 -d, --debug don't remove temporary files
14414 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 --file=FILE[:TEMPLATE]
14416 instantiate the configuration file FILE
14417 --header=FILE[:TEMPLATE]
14418 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014419
14420Configuration files:
14421$config_files
14422
14423Configuration headers:
14424$config_headers
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14430ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014431ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014432python config.status 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014433configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014436Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014437This config.status script is free software; the Free Software Foundation
14438gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439
14440ac_pwd='$ac_pwd'
14441srcdir='$srcdir'
14442INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014443test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14447# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014448ac_need_defaults=:
14449while test $# != 0
14450do
14451 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014452 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14454 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014455 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014457 --*=)
14458 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14459 ac_optarg=
14460 ac_shift=:
14461 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014463 ac_option=$1
14464 ac_optarg=$2
14465 ac_shift=shift
14466 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 esac
14468
Skip Montanaro6dead952003-09-25 14:50:04 +000014469 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014471 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14472 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 $as_echo "$ac_cs_version"; exit ;;
14475 --config | --confi | --conf | --con | --co | --c )
14476 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 debug=: ;;
14479 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014480 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 case $ac_optarg in
14482 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014483 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 esac
14485 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ac_need_defaults=false;;
14487 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014488 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 case $ac_optarg in
14490 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14491 esac
14492 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494 --he | --h)
14495 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014496 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014497Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14501 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14502 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
14504 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014505 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014506Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014510
14511 esac
14512 shift
14513done
14514
Skip Montanaro6dead952003-09-25 14:50:04 +000014515ac_configure_extra_args=
14516
14517if $ac_cs_silent; then
14518 exec 6>/dev/null
14519 ac_configure_extra_args="$ac_configure_extra_args --silent"
14520fi
14521
14522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014524if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14526 shift
14527 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14528 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014531fi
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535exec 5>>config.log
14536{
14537 echo
14538 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14539## Running $as_me. ##
14540_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549
14550# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014551for ac_config_target in $ac_config_targets
14552do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553 case $ac_config_target in
14554 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14555 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14556 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014557 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14558 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14560 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014561 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014562 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014564 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 esac
14566done
14567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568
Martin v. Löwis11437992002-04-12 09:54:03 +000014569# If the user did not use the arguments to specify the items to instantiate,
14570# then the envvar interface is used. Set only those that are not.
14571# We use the long form for the default assignment because of an extremely
14572# bizarre bug on SunOS 4.1.3.
14573if $ac_need_defaults; then
14574 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14575 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14576fi
14577
Skip Montanaro6dead952003-09-25 14:50:04 +000014578# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014580# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581# Hook for its removal unless debugging.
14582# Note that there is a small window in which the directory will not be cleaned:
14583# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014584$debug ||
14585{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014586 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014588 : "${ac_tmp:=$tmp}"
14589 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014592}
Martin v. Löwis11437992002-04-12 09:54:03 +000014593# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014597 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014598} ||
14599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600 tmp=./conf$$-$RANDOM
14601 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014602} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14603ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605# Set up the scripts for CONFIG_FILES section.
14606# No need to generate them if there are no CONFIG_FILES.
14607# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610
14611ac_cr=`echo X | tr X '\015'`
14612# On cygwin, bash can eat \r inside `` if the user requested igncr.
14613# But we know of no other shell where ac_cr would be empty at this
14614# point, so we can use a bashism as a fallback.
14615if test "x$ac_cr" = x; then
14616 eval ac_cr=\$\'\\r\'
14617fi
14618ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14619if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014620 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014621else
14622 ac_cs_awk_cr=$ac_cr
14623fi
14624
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014625echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014626_ACEOF
14627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{
14630 echo "cat >conf$$subs.awk <<_ACEOF" &&
14631 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14632 echo "_ACEOF"
14633} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014634 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14635ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636ac_delim='%!_!# '
14637for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014639 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14642 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 break
14644 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014645 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646 else
14647 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649done
Matthias Kloseb9621712010-04-24 17:59:49 +000014650rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014653cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655sed -n '
14656h
14657s/^/S["/; s/!.*/"]=/
14658p
14659g
14660s/^[^!]*!//
14661:repl
14662t repl
14663s/'"$ac_delim"'$//
14664t delim
14665:nl
14666h
14667s/\(.\{148\}\)..*/\1/
14668t more1
14669s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14670p
14671n
14672b repl
14673:more1
14674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14675p
14676g
14677s/.\{148\}//
14678t nl
14679:delim
14680h
14681s/\(.\{148\}\)..*/\1/
14682t more2
14683s/["\\]/\\&/g; s/^/"/; s/$/"/
14684p
14685b
14686:more2
14687s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14688p
14689g
14690s/.\{148\}//
14691t delim
14692' <conf$$subs.awk | sed '
14693/^[^""]/{
14694 N
14695 s/\n//
14696}
14697' >>$CONFIG_STATUS || ac_write_fail=1
14698rm -f conf$$subs.awk
14699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14700_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014701cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 for (key in S) S_is_set[key] = 1
14703 FS = ""
14704
14705}
14706{
14707 line = $ 0
14708 nfields = split(line, field, "@")
14709 substed = 0
14710 len = length(field[1])
14711 for (i = 2; i < nfields; i++) {
14712 key = field[i]
14713 keylen = length(key)
14714 if (S_is_set[key]) {
14715 value = S[key]
14716 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14717 len += length(value) + length(field[++i])
14718 substed = 1
14719 } else
14720 len += 1 + keylen
14721 }
14722
14723 print line
14724}
14725
14726_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14729if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14730 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14731else
14732 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014733fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14734 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014735_ACEOF
14736
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014737# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14738# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739# trailing colons and then remove the whole line if VPATH becomes empty
14740# (actually we leave an empty line to preserve line numbers).
14741if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014742 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14743h
14744s///
14745s/^/:/
14746s/[ ]*$/:/
14747s/:\$(srcdir):/:/g
14748s/:\${srcdir}:/:/g
14749s/:@srcdir@:/:/g
14750s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014752x
14753s/\(=[ ]*\).*/\1/
14754G
14755s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756s/^[^=]*=[ ]*$//
14757}'
14758fi
14759
Matthias Kloseb9621712010-04-24 17:59:49 +000014760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014761fi # test -n "$CONFIG_FILES"
14762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763# Set up the scripts for CONFIG_HEADERS section.
14764# No need to generate them if there are no CONFIG_HEADERS.
14765# This happens for instance with `./config.status Makefile'.
14766if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014767cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014768BEGIN {
14769_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771# Transform confdefs.h into an awk script `defines.awk', embedded as
14772# here-document in config.status, that substitutes the proper values into
14773# config.h.in to produce config.h.
14774
14775# Create a delimiter string that does not exist in confdefs.h, to ease
14776# handling of long lines.
14777ac_delim='%!_!# '
14778for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014779 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14780 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 break
14782 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014783 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 else
14785 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14786 fi
14787done
14788
14789# For the awk script, D is an array of macro values keyed by name,
14790# likewise P contains macro parameters if any. Preserve backslash
14791# newline sequences.
14792
14793ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14794sed -n '
14795s/.\{148\}/&'"$ac_delim"'/g
14796t rset
14797:rset
14798s/^[ ]*#[ ]*define[ ][ ]*/ /
14799t def
14800d
14801:def
14802s/\\$//
14803t bsnl
14804s/["\\]/\\&/g
14805s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14806D["\1"]=" \3"/p
14807s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14808d
14809:bsnl
14810s/["\\]/\\&/g
14811s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14812D["\1"]=" \3\\\\\\n"\\/p
14813t cont
14814s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14815t cont
14816d
14817:cont
14818n
14819s/.\{148\}/&'"$ac_delim"'/g
14820t clear
14821:clear
14822s/\\$//
14823t bsnlc
14824s/["\\]/\\&/g; s/^/"/; s/$/"/p
14825d
14826:bsnlc
14827s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14828b cont
14829' <confdefs.h | sed '
14830s/'"$ac_delim"'/"\\\
14831"/g' >>$CONFIG_STATUS || ac_write_fail=1
14832
14833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14834 for (key in D) D_is_set[key] = 1
14835 FS = ""
14836}
14837/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14838 line = \$ 0
14839 split(line, arg, " ")
14840 if (arg[1] == "#") {
14841 defundef = arg[2]
14842 mac1 = arg[3]
14843 } else {
14844 defundef = substr(arg[1], 2)
14845 mac1 = arg[2]
14846 }
14847 split(mac1, mac2, "(") #)
14848 macro = mac2[1]
14849 prefix = substr(line, 1, index(line, defundef) - 1)
14850 if (D_is_set[macro]) {
14851 # Preserve the white space surrounding the "#".
14852 print prefix "define", macro P[macro] D[macro]
14853 next
14854 } else {
14855 # Replace #undef with comments. This is necessary, for example,
14856 # in the case of _POSIX_SOURCE, which is predefined and required
14857 # on some systems where configure will not decide to define it.
14858 if (defundef == "undef") {
14859 print "/*", prefix defundef, macro, "*/"
14860 next
14861 }
14862 }
14863}
14864{ print }
14865_ACAWK
14866_ACEOF
14867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014868 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014869fi # test -n "$CONFIG_HEADERS"
14870
14871
14872eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14873shift
14874for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875do
14876 case $ac_tag in
14877 :[FHLC]) ac_mode=$ac_tag; continue;;
14878 esac
14879 case $ac_mode$ac_tag in
14880 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014881 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882 :[FH]-) ac_tag=-:-;;
14883 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14884 esac
14885 ac_save_IFS=$IFS
14886 IFS=:
14887 set x $ac_tag
14888 IFS=$ac_save_IFS
14889 shift
14890 ac_file=$1
14891 shift
14892
14893 case $ac_mode in
14894 :L) ac_source=$1;;
14895 :[FH])
14896 ac_file_inputs=
14897 for ac_f
14898 do
14899 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014900 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901 *) # Look for the file first in the build tree, then in the source tree
14902 # (if the path is not absolute). The absolute path cannot be DOS-style,
14903 # because $ac_f cannot contain `:'.
14904 test -f "$ac_f" ||
14905 case $ac_f in
14906 [\\/$]*) false;;
14907 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14908 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014909 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14912 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 done
14914
14915 # Let's still pretend it is `configure' which instantiates (i.e., don't
14916 # use $as_me), people would be surprised to read:
14917 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 configure_input='Generated from '`
14919 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14920 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 if test x"$ac_file" != x-; then
14922 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14924$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 # Neutralize special characters interpreted by sed in replacement strings.
14927 case $configure_input in #(
14928 *\&* | *\|* | *\\* )
14929 ac_sed_conf_input=`$as_echo "$configure_input" |
14930 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14931 *) ac_sed_conf_input=$configure_input;;
14932 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933
14934 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014935 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14936 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 esac
14938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 esac
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014942$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943 X"$ac_file" : 'X\(//\)[^/]' \| \
14944 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014946$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14948 s//\1/
14949 q
14950 }
14951 /^X\(\/\/\)[^/].*/{
14952 s//\1/
14953 q
14954 }
14955 /^X\(\/\/\)$/{
14956 s//\1/
14957 q
14958 }
14959 /^X\(\/\).*/{
14960 s//\1/
14961 q
14962 }
14963 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_builddir=.
14966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967case "$ac_dir" in
14968.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14969*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 case $ac_top_builddir_sub in
14974 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14975 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14976 esac ;;
14977esac
14978ac_abs_top_builddir=$ac_pwd
14979ac_abs_builddir=$ac_pwd$ac_dir_suffix
14980# for backward compatibility:
14981ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
14983case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986 ac_top_srcdir=$ac_top_builddir_sub
14987 ac_abs_top_srcdir=$ac_pwd ;;
14988 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990 ac_top_srcdir=$srcdir
14991 ac_abs_top_srcdir=$srcdir ;;
14992 *) # Relative name.
14993 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14994 ac_top_srcdir=$ac_top_build_prefix$srcdir
14995 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014996esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014998
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 case $ac_mode in
15001 :F)
15002 #
15003 # CONFIG_FILE
15004 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
15006 case $INSTALL in
15007 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013# If the template does not know about datarootdir, expand it.
15014# FIXME: This hack should be removed a few years after 2.60.
15015ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015016ac_sed_dataroot='
15017/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 p
15019 q
15020}
15021/@datadir@/p
15022/@docdir@/p
15023/@infodir@/p
15024/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015025/@mandir@/p'
15026case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027*datarootdir*) ac_datarootdir_seen=yes;;
15028*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15030$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033 ac_datarootdir_hack='
15034 s&@datadir@&$datadir&g
15035 s&@docdir@&$docdir&g
15036 s&@infodir@&$infodir&g
15037 s&@localedir@&$localedir&g
15038 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040esac
15041_ACEOF
15042
15043# Neutralize VPATH when `$srcdir' = `.'.
15044# Shell code in configure.ac might set extrasub.
15045# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15047ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015048$extrasub
15049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015051:t
15052/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015053s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015055s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056s&@srcdir@&$ac_srcdir&;t t
15057s&@abs_srcdir@&$ac_abs_srcdir&;t t
15058s&@top_srcdir@&$ac_top_srcdir&;t t
15059s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15060s&@builddir@&$ac_builddir&;t t
15061s&@abs_builddir@&$ac_abs_builddir&;t t
15062s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15063s&@INSTALL@&$ac_INSTALL&;t t
15064$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015065"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015066eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15067 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015070 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15071 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15072 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015074which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015075$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015076which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015077
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015078 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015080 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15081 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015083 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084 ;;
15085 :H)
15086 #
15087 # CONFIG_HEADER
15088 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 {
15091 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015092 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15093 } >"$ac_tmp/config.h" \
15094 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15095 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15097$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015100 mv "$ac_tmp/config.h" "$ac_file" \
15101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 fi
15103 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015105 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15106 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110
15111 esac
15112
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015113
15114 case $ac_file$ac_mode in
15115 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15116
15117 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118done # for ac_tag
15119
Guido van Rossum627b2d71993-12-24 10:39:16 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015122_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015123ac_clean_files=$ac_clean_files_save
15124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015126 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015127
Martin v. Löwis11437992002-04-12 09:54:03 +000015128
15129# configure is writing to config.log, and then calls config.status.
15130# config.status does its own redirection, appending to config.log.
15131# Unfortunately, on DOS this fails, as config.log is still kept open
15132# by configure, so config.status won't be able to write to it; its
15133# output is simply discarded. So we exec the FD to /dev/null,
15134# effectively closing config.log, so it can be properly (re)opened and
15135# appended to by config.status. When coming back to configure, we
15136# need to make the FD available again.
15137if test "$no_create" != yes; then
15138 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015139 ac_config_status_args=
15140 test "$silent" = yes &&
15141 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015143 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 exec 5>>config.log
15145 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15146 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015147 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015148fi
15149if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15151$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015152fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015153
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015154
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015155echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015156if test ! -f Modules/Setup
15157then
15158 cp $srcdir/Modules/Setup.dist Modules/Setup
15159fi
15160
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015161echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015162if test ! -f Modules/Setup.local
15163then
15164 echo "# Edit this file for local setup changes" >Modules/Setup.local
15165fi
15166
15167echo "creating Makefile"
15168$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15169 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015170 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015171mv config.c Modules