blob: a0c8ca0894f729040058fa44d7d8f2a3ea833de6 [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
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200671NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000672MAINCC
673CXX
674OBJEXT
675EXEEXT
676ac_ct_CC
677CPPFLAGS
678LDFLAGS
679CFLAGS
680CC
681EXPORT_MACOSX_DEPLOYMENT_TARGET
682CONFIGURE_MACOSX_DEPLOYMENT_TARGET
683SGI_ABI
684MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000685FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000686FRAMEWORKUNIXTOOLSPREFIX
687FRAMEWORKALTINSTALLLAST
688FRAMEWORKALTINSTALLFIRST
689FRAMEWORKINSTALLLAST
690FRAMEWORKINSTALLFIRST
691PYTHONFRAMEWORKINSTALLDIR
692PYTHONFRAMEWORKPREFIX
693PYTHONFRAMEWORKDIR
694PYTHONFRAMEWORKIDENTIFIER
695PYTHONFRAMEWORK
696LIPO_32BIT_FLAGS
697ARCH_RUN_32BIT
698UNIVERSALSDK
699CONFIG_ARGS
700SOVERSION
701VERSION
702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753with_libs
754with_system_expat
755with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000756enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_dbmliborder
758with_signal_module
759with_dec_threads
760with_threads
761with_thread
762enable_ipv6
763with_doc_strings
764with_tsc
765with_pymalloc
766with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000767with_fpectl
768with_libm
769with_libc
770enable_big_digits
771with_wide_unicode
772with_computed_gotos
773'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774 ac_precious_vars='build_alias
775host_alias
776target_alias
777CC
778CFLAGS
779LDFLAGS
780LIBS
781CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000782CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000783
Guido van Rossum627b2d71993-12-24 10:39:16 +0000784
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000786ac_init_help=
787ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000788ac_unrecognized_opts=
789ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790# The variables have the same names as the options, with
791# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000792cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795no_recursion=
796prefix=NONE
797program_prefix=NONE
798program_suffix=NONE
799program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804x_includes=NONE
805x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000806
807# Installation directory options.
808# These are left unexpanded so users can "make install exec_prefix=/foo"
809# and all the variables that are supposed to be based on exec_prefix
810# by default will actually change.
811# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000812# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813bindir='${exec_prefix}/bin'
814sbindir='${exec_prefix}/sbin'
815libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816datarootdir='${prefix}/share'
817datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818sysconfdir='${prefix}/etc'
819sharedstatedir='${prefix}/com'
820localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821includedir='${prefix}/include'
822oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
824infodir='${datarootdir}/info'
825htmldir='${docdir}'
826dvidir='${docdir}'
827pdfdir='${docdir}'
828psdir='${docdir}'
829libdir='${exec_prefix}/lib'
830localedir='${datarootdir}/locale'
831mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837 # If the previous option needs an argument, assign it.
838 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840 ac_prev=
841 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000845 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
846 *=) ac_optarg= ;;
847 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Accept the important Cygnus configure options, so we can diagnose typos.
851
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852 case $ac_dashdash$ac_option in
853 --)
854 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856 -bindir | --bindir | --bindi | --bind | --bin | --bi)
857 ac_prev=bindir ;;
858 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860
861 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 -cache-file | --cache-file | --cache-fil | --cache-fi \
867 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
868 ac_prev=cache_file ;;
869 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
870 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 cache_file=$ac_optarg ;;
872
873 --config-cache | -C)
874 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
882 | --dataroo | --dataro | --datar)
883 ac_prev=datarootdir ;;
884 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
885 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
886 datarootdir=$ac_optarg ;;
887
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000889 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000892 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000893 ac_useropt_orig=$ac_useropt
894 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
895 case $ac_user_opts in
896 *"
897"enable_$ac_useropt"
898"*) ;;
899 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
900 ac_unrecognized_sep=', ';;
901 esac
902 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903
904 -docdir | --docdir | --docdi | --doc | --do)
905 ac_prev=docdir ;;
906 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907 docdir=$ac_optarg ;;
908
909 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910 ac_prev=dvidir ;;
911 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
914 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000918 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 ac_useropt_orig=$ac_useropt
920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921 case $ac_user_opts in
922 *"
923"enable_$ac_useropt"
924"*) ;;
925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
926 ac_unrecognized_sep=', ';;
927 esac
928 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
931 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
932 | --exec | --exe | --ex)
933 ac_prev=exec_prefix ;;
934 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
935 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
936 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
939 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Obsolete; use --with-gas.
941 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 -help | --help | --hel | --he | -h)
944 ac_init_help=long ;;
945 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
946 ac_init_help=recursive ;;
947 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
948 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
950 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
956 ac_prev=htmldir ;;
957 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
958 | --ht=*)
959 htmldir=$ac_optarg ;;
960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -includedir | --includedir | --includedi | --included | --include \
962 | --includ | --inclu | --incl | --inc)
963 ac_prev=includedir ;;
964 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
965 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -infodir | --infodir | --infodi | --infod | --info | --inf)
969 ac_prev=infodir ;;
970 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
973 -libdir | --libdir | --libdi | --libd)
974 ac_prev=libdir ;;
975 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
979 | --libexe | --libex | --libe)
980 ac_prev=libexecdir ;;
981 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
982 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 -localedir | --localedir | --localedi | --localed | --locale)
986 ac_prev=localedir ;;
987 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
988 localedir=$ac_optarg ;;
989
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000991 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992 ac_prev=localstatedir ;;
993 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000994 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
998 ac_prev=mandir ;;
999 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 # Obsolete; use --without-fp.
1004 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 no_create=yes ;;
1009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1011 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1012 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1015 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1016 | --oldin | --oldi | --old | --ol | --o)
1017 ac_prev=oldincludedir ;;
1018 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1019 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1020 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1024 ac_prev=prefix ;;
1025 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1029 | --program-pre | --program-pr | --program-p)
1030 ac_prev=program_prefix ;;
1031 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1032 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
1035 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1036 | --program-suf | --program-su | --program-s)
1037 ac_prev=program_suffix ;;
1038 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1039 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -program-transform-name | --program-transform-name \
1043 | --program-transform-nam | --program-transform-na \
1044 | --program-transform-n | --program-transform- \
1045 | --program-transform | --program-transfor \
1046 | --program-transfo | --program-transf \
1047 | --program-trans | --program-tran \
1048 | --progr-tra | --program-tr | --program-t)
1049 ac_prev=program_transform_name ;;
1050 -program-transform-name=* | --program-transform-name=* \
1051 | --program-transform-nam=* | --program-transform-na=* \
1052 | --program-transform-n=* | --program-transform-=* \
1053 | --program-transform=* | --program-transfor=* \
1054 | --program-transfo=* | --program-transf=* \
1055 | --program-trans=* | --program-tran=* \
1056 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1060 ac_prev=pdfdir ;;
1061 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1062 pdfdir=$ac_optarg ;;
1063
1064 -psdir | --psdir | --psdi | --psd | --ps)
1065 ac_prev=psdir ;;
1066 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1067 psdir=$ac_optarg ;;
1068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1070 | -silent | --silent | --silen | --sile | --sil)
1071 silent=yes ;;
1072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1074 ac_prev=sbindir ;;
1075 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1076 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
1079 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1080 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1081 | --sharedst | --shareds | --shared | --share | --shar \
1082 | --sha | --sh)
1083 ac_prev=sharedstatedir ;;
1084 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1085 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1086 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1087 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -site | --site | --sit)
1091 ac_prev=site ;;
1092 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1096 ac_prev=srcdir ;;
1097 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1101 | --syscon | --sysco | --sysc | --sys | --sy)
1102 ac_prev=sysconfdir ;;
1103 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1104 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1113 verbose=yes ;;
1114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 -version | --version | --versio | --versi | --vers | -V)
1116 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001122 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 ac_useropt_orig=$ac_useropt
1124 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1125 case $ac_user_opts in
1126 *"
1127"with_$ac_useropt"
1128"*) ;;
1129 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1130 ac_unrecognized_sep=', ';;
1131 esac
1132 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001138 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143"with_$ac_useropt"
1144"*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150 --x)
1151 # Obsolete; use --with-x.
1152 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1155 | --x-incl | --x-inc | --x-in | --x-i)
1156 ac_prev=x_includes ;;
1157 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1158 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1162 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1163 ac_prev=x_libraries ;;
1164 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1165 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001168 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1169Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 *=*)
1173 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 case $ac_envvar in #(
1176 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001177 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 export $ac_envvar ;;
1181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001187 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 ;;
1189
1190 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001191done
1192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001195 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196fi
1197
Matthias Kloseb9621712010-04-24 17:59:49 +00001198if test -n "$ac_unrecognized_opts"; then
1199 case $enable_option_checking in
1200 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001201 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1203 esac
1204fi
1205
1206# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1208 datadir sysconfdir sharedstatedir localstatedir includedir \
1209 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1210 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 # Remove trailing slashes.
1214 case $ac_val in
1215 */ )
1216 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1217 eval $ac_var=\$ac_val;;
1218 esac
1219 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221 [\\/$]* | ?:[\\/]* ) continue;;
1222 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001224 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001225done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226
Martin v. Löwis11437992002-04-12 09:54:03 +00001227# There might be people who depend on the old broken behavior: `$host'
1228# used to hold the argument of --host etc.
1229# FIXME: To remove some day.
1230build=$build_alias
1231host=$host_alias
1232target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234# FIXME: To remove some day.
1235if test "x$host_alias" != x; then
1236 if test "x$build_alias" = x; then
1237 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001238 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1239 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 elif test "x$build_alias" != "x$host_alias"; then
1241 cross_compiling=yes
1242 fi
1243fi
1244
1245ac_tool_prefix=
1246test -n "$host_alias" && ac_tool_prefix=$host_alias-
1247
1248test "$silent" = yes && exec 6>/dev/null
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251ac_pwd=`pwd` && test -n "$ac_pwd" &&
1252ac_ls_di=`ls -di .` &&
1253ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001254 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001256 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257
1258
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259# Find the source files, if location was not specified.
1260if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 ac_confdir=`$as_dirname -- "$as_myself" ||
1264$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1265 X"$as_myself" : 'X\(//\)[^/]' \| \
1266 X"$as_myself" : 'X\(//\)$' \| \
1267 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1268$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1270 s//\1/
1271 q
1272 }
1273 /^X\(\/\/\)[^/].*/{
1274 s//\1/
1275 q
1276 }
1277 /^X\(\/\/\)$/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\).*/{
1282 s//\1/
1283 q
1284 }
1285 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288 srcdir=..
1289 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290else
1291 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293if test ! -r "$srcdir/$ac_unique_file"; then
1294 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001295 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1298ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001299 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 pwd)`
1301# When building in place, set srcdir=.
1302if test "$ac_abs_confdir" = "$ac_pwd"; then
1303 srcdir=.
1304fi
1305# Remove unnecessary trailing slashes from srcdir.
1306# Double slashes in file names in object file debugging info
1307# mess up M-x gdb in Emacs.
1308case $srcdir in
1309*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1310esac
1311for ac_var in $ac_precious_vars; do
1312 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_env_${ac_var}_value=\$${ac_var}
1314 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1315 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1316done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318#
1319# Report the --help message.
1320#
1321if test "$ac_init_help" = "long"; then
1322 # Omit some internal or obsolete options to make the list less imposing.
1323 # This message is too long to be a string in the A/UX 3.1 sh.
1324 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001325\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Usage: $0 [OPTION]... [VAR=VALUE]...
1328
1329To assign environment variables (e.g., CC, CFLAGS...), specify them as
1330VAR=VALUE. See below for descriptions of some of the useful variables.
1331
1332Defaults for the options are specified in brackets.
1333
1334Configuration:
1335 -h, --help display this help and exit
1336 --help=short display options specific to this package
1337 --help=recursive display the short help of all the included packages
1338 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001339 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001340 --cache-file=FILE cache test results in FILE [disabled]
1341 -C, --config-cache alias for \`--cache-file=config.cache'
1342 -n, --no-create do not create output files
1343 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1344
Martin v. Löwis11437992002-04-12 09:54:03 +00001345Installation directories:
1346 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001350
1351By default, \`make install' will install all the files in
1352\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1353an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1354for instance \`--prefix=\$HOME'.
1355
1356For better control, use the options below.
1357
1358Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 --bindir=DIR user executables [EPREFIX/bin]
1360 --sbindir=DIR system admin executables [EPREFIX/sbin]
1361 --libexecdir=DIR program executables [EPREFIX/libexec]
1362 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1363 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1364 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1365 --libdir=DIR object code libraries [EPREFIX/lib]
1366 --includedir=DIR C header files [PREFIX/include]
1367 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1368 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1369 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1370 --infodir=DIR info documentation [DATAROOTDIR/info]
1371 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1372 --mandir=DIR man documentation [DATAROOTDIR/man]
1373 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1374 --htmldir=DIR html documentation [DOCDIR]
1375 --dvidir=DIR dvi documentation [DOCDIR]
1376 --pdfdir=DIR pdf documentation [DOCDIR]
1377 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378_ACEOF
1379
1380 cat <<\_ACEOF
1381_ACEOF
1382fi
1383
1384if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001386 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001387 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 cat <<\_ACEOF
1389
1390Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1393 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001394 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001395 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --enable-framework[=INSTALLDIR]
1397 Build (MacOSX|Darwin) framework
1398 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001399 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001400 --enable-loadable-sqlite-extensions
1401 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --enable-ipv6 Enable ipv6 (with ipv4) support
1403 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001404 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Optional Packages:
1408 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1409 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001410 --with-universal-archs=ARCH
1411 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001412 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001413 --with-framework-name=FRAMEWORK
1414 specify an alternate name of the framework built
1415 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001417 --with-cxx-main=<compiler>
1418 compile main() and link python executable with C++
1419 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-suffix=.exe set executable suffix
1421 --with-pydebug build with Py_DEBUG defined
1422 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001423 --with-system-expat build pyexpat module using an installed expat
1424 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001425 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001426 --with-dbmliborder=db1:db2:...
1427 order to check db backends for dbm. Valid value is a
1428 colon separated string with the backend names
1429 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-signal-module disable/enable signal module
1431 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1432 --with(out)-threads[=DIRECTORY]
1433 disable/enable thread support
1434 --with(out)-thread[=DIRECTORY]
1435 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001437 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001439 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-fpectl enable SIGFPE catching
1441 --with-libm=STRING math library
1442 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001443 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001444 --with(out)-computed-gotos
1445 Use computed gotos in evaluation loop (enabled by
1446 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448Some influential environment variables:
1449 CC C compiler command
1450 CFLAGS C compiler flags
1451 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1452 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 CPP C preprocessor
1457
1458Use these variables to override the choices made by `configure' or to help
1459it to find libraries and programs with nonstandard names/locations.
1460
Georg Brandle2e15612009-05-20 18:25:10 +00001461Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001464fi
1465
1466if test "$ac_init_help" = "recursive"; then
1467 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 test -d "$ac_dir" ||
1470 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1471 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_builddir=.
1473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474case "$ac_dir" in
1475.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1476*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 case $ac_top_builddir_sub in
1481 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1482 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1483 esac ;;
1484esac
1485ac_abs_top_builddir=$ac_pwd
1486ac_abs_builddir=$ac_pwd$ac_dir_suffix
1487# for backward compatibility:
1488ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 ac_top_srcdir=$ac_top_builddir_sub
1494 ac_abs_top_srcdir=$ac_pwd ;;
1495 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 ac_top_srcdir=$srcdir
1498 ac_abs_top_srcdir=$srcdir ;;
1499 *) # Relative name.
1500 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1501 ac_top_srcdir=$ac_top_build_prefix$srcdir
1502 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001503esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 cd "$ac_dir" || { ac_status=$?; continue; }
1507 # Check for guested configure.
1508 if test -f "$ac_srcdir/configure.gnu"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1511 elif test -f "$ac_srcdir/configure"; then
1512 echo &&
1513 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001515 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 fi || ac_status=$?
1517 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 done
1519fi
1520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001522if $ac_init_version; then
1523 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001524python configure 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001525generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001527Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001528This configure script is free software; the Free Software Foundation
1529gives unlimited permission to copy, distribute and modify it.
1530_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001533
1534## ------------------------ ##
1535## Autoconf initialization. ##
1536## ------------------------ ##
1537
1538# ac_fn_c_try_compile LINENO
1539# --------------------------
1540# Try to compile conftest.$ac_ext, and return whether this succeeded.
1541ac_fn_c_try_compile ()
1542{
1543 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1544 rm -f conftest.$ac_objext
1545 if { { ac_try="$ac_compile"
1546case "(($ac_try" in
1547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1548 *) ac_try_echo=$ac_try;;
1549esac
1550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1551$as_echo "$ac_try_echo"; } >&5
1552 (eval "$ac_compile") 2>conftest.err
1553 ac_status=$?
1554 if test -s conftest.err; then
1555 grep -v '^ *+' conftest.err >conftest.er1
1556 cat conftest.er1 >&5
1557 mv -f conftest.er1 conftest.err
1558 fi
1559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1560 test $ac_status = 0; } && {
1561 test -z "$ac_c_werror_flag" ||
1562 test ! -s conftest.err
1563 } && test -s conftest.$ac_objext; then :
1564 ac_retval=0
1565else
1566 $as_echo "$as_me: failed program was:" >&5
1567sed 's/^/| /' conftest.$ac_ext >&5
1568
1569 ac_retval=1
1570fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001571 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 as_fn_set_status $ac_retval
1573
1574} # ac_fn_c_try_compile
1575
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001576# ac_fn_c_try_link LINENO
1577# -----------------------
1578# Try to link conftest.$ac_ext, and return whether this succeeded.
1579ac_fn_c_try_link ()
1580{
1581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582 rm -f conftest.$ac_objext conftest$ac_exeext
1583 if { { ac_try="$ac_link"
1584case "(($ac_try" in
1585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1586 *) ac_try_echo=$ac_try;;
1587esac
1588eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1589$as_echo "$ac_try_echo"; } >&5
1590 (eval "$ac_link") 2>conftest.err
1591 ac_status=$?
1592 if test -s conftest.err; then
1593 grep -v '^ *+' conftest.err >conftest.er1
1594 cat conftest.er1 >&5
1595 mv -f conftest.er1 conftest.err
1596 fi
1597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598 test $ac_status = 0; } && {
1599 test -z "$ac_c_werror_flag" ||
1600 test ! -s conftest.err
1601 } && test -s conftest$ac_exeext && {
1602 test "$cross_compiling" = yes ||
1603 $as_test_x conftest$ac_exeext
1604 }; then :
1605 ac_retval=0
1606else
1607 $as_echo "$as_me: failed program was:" >&5
1608sed 's/^/| /' conftest.$ac_ext >&5
1609
1610 ac_retval=1
1611fi
1612 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1613 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1614 # interfere with the next link command; also delete a directory that is
1615 # left behind by Apple's compiler. We do this before executing the actions.
1616 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1617 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1618 as_fn_set_status $ac_retval
1619
1620} # ac_fn_c_try_link
1621
Matthias Kloseb9621712010-04-24 17:59:49 +00001622# ac_fn_c_try_cpp LINENO
1623# ----------------------
1624# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1625ac_fn_c_try_cpp ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 if { { ac_try="$ac_cpp conftest.$ac_ext"
1629case "(($ac_try" in
1630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631 *) ac_try_echo=$ac_try;;
1632esac
1633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634$as_echo "$ac_try_echo"; } >&5
1635 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1636 ac_status=$?
1637 if test -s conftest.err; then
1638 grep -v '^ *+' conftest.err >conftest.er1
1639 cat conftest.er1 >&5
1640 mv -f conftest.er1 conftest.err
1641 fi
1642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001643 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1645 test ! -s conftest.err
1646 }; then :
1647 ac_retval=0
1648else
1649 $as_echo "$as_me: failed program was:" >&5
1650sed 's/^/| /' conftest.$ac_ext >&5
1651
1652 ac_retval=1
1653fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 as_fn_set_status $ac_retval
1656
1657} # ac_fn_c_try_cpp
1658
1659# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1660# -------------------------------------------------------
1661# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1662# the include files in INCLUDES and setting the cache variable VAR
1663# accordingly.
1664ac_fn_c_check_header_mongrel ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001667 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1669$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001670if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 $as_echo_n "(cached) " >&6
1672fi
1673eval ac_res=\$$3
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1675$as_echo "$ac_res" >&6; }
1676else
1677 # Is the header compilable?
1678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1679$as_echo_n "checking $2 usability... " >&6; }
1680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1681/* end confdefs.h. */
1682$4
1683#include <$2>
1684_ACEOF
1685if ac_fn_c_try_compile "$LINENO"; then :
1686 ac_header_compiler=yes
1687else
1688 ac_header_compiler=no
1689fi
1690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1692$as_echo "$ac_header_compiler" >&6; }
1693
1694# Is the header present?
1695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1696$as_echo_n "checking $2 presence... " >&6; }
1697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698/* end confdefs.h. */
1699#include <$2>
1700_ACEOF
1701if ac_fn_c_try_cpp "$LINENO"; then :
1702 ac_header_preproc=yes
1703else
1704 ac_header_preproc=no
1705fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001706rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1708$as_echo "$ac_header_preproc" >&6; }
1709
1710# So? What about this header?
1711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1712 yes:no: )
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1714$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1716$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1717 ;;
1718 no:yes:* )
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1720$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1722$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1724$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1726$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1728$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001729( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001730## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001731## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001732 ) | sed "s/^/$as_me: WARNING: /" >&2
1733 ;;
1734esac
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1736$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001737if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 $as_echo_n "(cached) " >&6
1739else
1740 eval "$3=\$ac_header_compiler"
1741fi
1742eval ac_res=\$$3
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1744$as_echo "$ac_res" >&6; }
1745fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001746 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001747
1748} # ac_fn_c_check_header_mongrel
1749
1750# ac_fn_c_try_run LINENO
1751# ----------------------
1752# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1753# that executables *can* be run.
1754ac_fn_c_try_run ()
1755{
1756 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1757 if { { ac_try="$ac_link"
1758case "(($ac_try" in
1759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1760 *) ac_try_echo=$ac_try;;
1761esac
1762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1763$as_echo "$ac_try_echo"; } >&5
1764 (eval "$ac_link") 2>&5
1765 ac_status=$?
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1768 { { case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_try") 2>&5
1775 ac_status=$?
1776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1777 test $ac_status = 0; }; }; then :
1778 ac_retval=0
1779else
1780 $as_echo "$as_me: program exited with status $ac_status" >&5
1781 $as_echo "$as_me: failed program was:" >&5
1782sed 's/^/| /' conftest.$ac_ext >&5
1783
1784 ac_retval=$ac_status
1785fi
1786 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 as_fn_set_status $ac_retval
1789
1790} # ac_fn_c_try_run
1791
1792# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1793# -------------------------------------------------------
1794# Tests whether HEADER exists and can be compiled using the include files in
1795# INCLUDES, setting the cache variable VAR accordingly.
1796ac_fn_c_check_header_compile ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1800$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001801if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001802 $as_echo_n "(cached) " >&6
1803else
1804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806$4
1807#include <$2>
1808_ACEOF
1809if ac_fn_c_try_compile "$LINENO"; then :
1810 eval "$3=yes"
1811else
1812 eval "$3=no"
1813fi
1814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1815fi
1816eval ac_res=\$$3
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1818$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001819 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001820
1821} # ac_fn_c_check_header_compile
1822
Matthias Kloseb9621712010-04-24 17:59:49 +00001823# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1824# -------------------------------------------
1825# Tests whether TYPE exists after having included INCLUDES, setting cache
1826# variable VAR accordingly.
1827ac_fn_c_check_type ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1831$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001832if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001833 $as_echo_n "(cached) " >&6
1834else
1835 eval "$3=no"
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839int
1840main ()
1841{
1842if (sizeof ($2))
1843 return 0;
1844 ;
1845 return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1850/* end confdefs.h. */
1851$4
1852int
1853main ()
1854{
1855if (sizeof (($2)))
1856 return 0;
1857 ;
1858 return 0;
1859}
1860_ACEOF
1861if ac_fn_c_try_compile "$LINENO"; then :
1862
1863else
1864 eval "$3=yes"
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1869fi
1870eval ac_res=\$$3
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1872$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001873 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001874
1875} # ac_fn_c_check_type
1876
1877# ac_fn_c_find_uintX_t LINENO BITS VAR
1878# ------------------------------------
1879# Finds an unsigned integer type with width BITS, setting cache variable VAR
1880# accordingly.
1881ac_fn_c_find_uintX_t ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1885$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001886if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=no"
1890 # Order is important - never check a type that is potentially smaller
1891 # than half of the expected target width.
1892 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1893 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895/* end confdefs.h. */
1896$ac_includes_default
1897int
1898main ()
1899{
1900static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1901test_array [0] = 0
1902
1903 ;
1904 return 0;
1905}
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 case $ac_type in #(
1909 uint$2_t) :
1910 eval "$3=yes" ;; #(
1911 *) :
1912 eval "$3=\$ac_type" ;;
1913esac
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001916 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001917
1918else
1919 break
1920fi
1921 done
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_find_uintX_t
1929
1930# ac_fn_c_find_intX_t LINENO BITS VAR
1931# -----------------------------------
1932# Finds a signed integer type with width BITS, setting cache variable VAR
1933# accordingly.
1934ac_fn_c_find_intX_t ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1938$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 # Order is important - never check a type that is potentially smaller
1944 # than half of the expected target width.
1945 for ac_type in int$2_t 'int' 'long int' \
1946 'long long int' 'short int' 'signed char'; do
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001950 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001951int
1952main ()
1953{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001954static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001955test_array [0] = 0
1956
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001965 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001966int
1967main ()
1968{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001969static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001970 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1971test_array [0] = 0
1972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978
1979else
1980 case $ac_type in #(
1981 int$2_t) :
1982 eval "$3=yes" ;; #(
1983 *) :
1984 eval "$3=\$ac_type" ;;
1985esac
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001990 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992else
1993 break
1994fi
1995 done
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002} # ac_fn_c_find_intX_t
2003
2004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037test_array [0] = 0
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
2055else
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=-1 ac_mid=-1
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079test_array [0] = 0
2080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113test_array [0] = 0
2114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
2141
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
2175
2176 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002177 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 as_fn_set_status $ac_retval
2179
2180} # ac_fn_c_compute_int
2181
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002190if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002191 $as_echo_n "(cached) " >&6
2192else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002246
2247} # ac_fn_c_check_func
2248
2249# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2250# ----------------------------------------------------
2251# Tries to find if the field MEMBER exists in type AGGR, after including
2252# INCLUDES, setting cache variable VAR accordingly.
2253ac_fn_c_check_member ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2257$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002258if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$5
2280int
2281main ()
2282{
2283static $2 ac_aggr;
2284if (sizeof ac_aggr.$3)
2285return 0;
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291 eval "$4=yes"
2292else
2293 eval "$4=no"
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298fi
2299eval ac_res=\$$4
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002303
2304} # ac_fn_c_check_member
2305
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002306# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2307# ---------------------------------------------
2308# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2309# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002310ac_fn_c_check_decl ()
2311{
2312 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002313 as_decl_name=`echo $2|sed 's/ *(.*//'`
2314 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2316$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2317if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002318 $as_echo_n "(cached) " >&6
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$4
2323int
2324main ()
2325{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002326#ifndef $as_decl_name
2327#ifdef __cplusplus
2328 (void) $as_decl_use;
2329#else
2330 (void) $as_decl_name;
2331#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$3=yes"
2340else
2341 eval "$3=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345eval ac_res=\$$3
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002349
2350} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002352This file contains any messages produced by compilers while
2353running configure, to aid debugging if configure makes a mistake.
2354
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002355It was created by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002356generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358 $ $0 $@
2359
2360_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002362{
2363cat <<_ASUNAME
2364## --------- ##
2365## Platform. ##
2366## --------- ##
2367
2368hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2369uname -m = `(uname -m) 2>/dev/null || echo unknown`
2370uname -r = `(uname -r) 2>/dev/null || echo unknown`
2371uname -s = `(uname -s) 2>/dev/null || echo unknown`
2372uname -v = `(uname -v) 2>/dev/null || echo unknown`
2373
2374/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2375/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2376
2377/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2378/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2379/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002381/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2382/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2383/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2384
2385_ASUNAME
2386
2387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002392 $as_echo "PATH: $as_dir"
2393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396} >&5
2397
2398cat >&5 <<_ACEOF
2399
2400
2401## ----------- ##
2402## Core tests. ##
2403## ----------- ##
2404
2405_ACEOF
2406
2407
2408# Keep a trace of the command line.
2409# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002413ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_configure_args0=
2415ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002416ac_must_keep_next=false
2417for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002418do
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 for ac_arg
2420 do
2421 case $ac_arg in
2422 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2424 | -silent | --silent | --silen | --sile | --sil)
2425 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 esac
2429 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002436 case $ac_arg in
2437 *=* | --config-cache | -C | -disable-* | --disable-* \
2438 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2439 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2440 | -with-* | --with-* | -without-* | --without-* | --x)
2441 case "$ac_configure_args0 " in
2442 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2443 esac
2444 ;;
2445 -* ) ac_must_keep_next=true ;;
2446 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 ;;
2450 esac
2451 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002452done
Matthias Kloseb9621712010-04-24 17:59:49 +00002453{ ac_configure_args0=; unset ac_configure_args0;}
2454{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456# When interrupted or exit'd, cleanup temporary files, and complete
2457# config.log. We remove comments because anyway the quotes in there
2458# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459# WARNING: Use '\'' to represent an apostrophe within the trap.
2460# 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 +00002461trap 'exit_status=$?
2462 # Save into config.log some information that might help in debugging.
2463 {
2464 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002465
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002466 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002467## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002468## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 echo
2470 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471(
2472 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2473 eval ac_val=\$$ac_var
2474 case $ac_val in #(
2475 *${as_nl}*)
2476 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2478$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 esac
2480 case $ac_var in #(
2481 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2483 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac ;;
2485 esac
2486 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2489 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 "s/'\''/'\''\\\\'\'''\''/g;
2492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2493 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002496 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac |
2498 sort
2499)
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002501
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002502 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002503## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002504## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_vars
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515
2516 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002517 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002519## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 echo
2521 for ac_var in $ac_subst_files
2522 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 eval ac_val=\$$ac_var
2524 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 done | sort
2529 echo
2530 fi
2531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002533 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002534## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002535## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
2539 fi
2540 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$as_me: caught signal $ac_signal"
2542 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 rm -f core *.core core.conftest.* &&
2545 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002548for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002550done
2551ac_signal=0
2552
2553# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
Matthias Kloseb9621712010-04-24 17:59:49 +00002556$as_echo "/* confdefs.h */" > confdefs.h
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558# Predefined preprocessor variables.
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_NAME "$PACKAGE_NAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_VERSION "$PACKAGE_VERSION"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_STRING "$PACKAGE_STRING"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2578_ACEOF
2579
Matthias Kloseb9621712010-04-24 17:59:49 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_URL "$PACKAGE_URL"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
2585# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002586# Prefer an explicitly selected file to automatically selected ones.
2587ac_site_file1=NONE
2588ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002590 # We do not want a PATH search for config.site.
2591 case $CONFIG_SITE in #((
2592 -*) ac_site_file1=./$CONFIG_SITE;;
2593 */*) ac_site_file1=$CONFIG_SITE;;
2594 *) ac_site_file1=./$CONFIG_SITE;;
2595 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$prefix/share/config.site
2598 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599else
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 ac_site_file1=$ac_default_prefix/share/config.site
2601 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002603for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604do
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 test "x$ac_site_file" = xNONE && continue
2606 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2608$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002610 . "$ac_site_file" \
2611 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2613as_fn_error $? "failed to load site script $ac_site_file
2614See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615 fi
2616done
2617
2618if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 # Some versions of bash will fail to source /dev/null (special files
2620 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2621 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2623$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2626 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 esac
2628 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629else
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2631$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 >$cache_file
2633fi
2634
2635# Check that the precious variables saved in the cache have kept the same
2636# value.
2637ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2640 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2642 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 case $ac_old_set,$ac_new_set in
2644 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2646$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 +00002647 ac_cache_corrupted=: ;;
2648 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2650$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_cache_corrupted=: ;;
2652 ,);;
2653 *)
2654 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 # differences in whitespace do not lead to failure.
2656 ac_old_val_w=`echo x $ac_old_val`
2657 ac_new_val_w=`echo x $ac_new_val`
2658 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2660$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2661 ac_cache_corrupted=:
2662 else
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2664$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2665 eval $ac_var=\$ac_old_val
2666 fi
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2668$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2670$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 fi;;
2672 esac
2673 # Pass precious variables to config.status.
2674 if test "$ac_new_set" = set; then
2675 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 *) ac_arg=$ac_var=$ac_new_val ;;
2678 esac
2679 case " $ac_configure_args " in
2680 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 esac
2683 fi
2684done
2685if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2689$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002690 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002692## -------------------- ##
2693## Main body of script. ##
2694## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695
Guido van Rossum7f43da71994-08-01 12:15:30 +00002696ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2700ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701
Guido van Rossum627b2d71993-12-24 10:39:16 +00002702
Michael W. Hudson54241132001-12-07 15:38:26 +00002703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002705
2706
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
Benjamin Petersond23f8222009-04-05 19:13:16 +00002708if test "$prefix" != "/"; then
2709 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2710fi
2711
2712
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
2714
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002715# We don't use PACKAGE_ variables, and they cause conflicts
2716# with other autoconf-based packages that include Python.h
2717grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2718rm confdefs.h
2719mv confdefs.h.new confdefs.h
2720
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002721
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002722VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002723
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002724# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002725
2726SOVERSION=1.0
2727
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002728# The later defininition of _XOPEN_SOURCE disables certain features
2729# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002732
2733
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002734# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2735# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2736# them.
2737
Matthias Kloseb9621712010-04-24 17:59:49 +00002738$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002739
2740
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002741# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2742# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2743# them.
2744
Matthias Kloseb9621712010-04-24 17:59:49 +00002745$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002746
2747
Martin v. Löwisd6320502004-08-12 13:45:08 +00002748# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2749# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2750
Matthias Kloseb9621712010-04-24 17:59:49 +00002751$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002752
2753
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002754# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2755# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2756# them.
2757
Matthias Kloseb9621712010-04-24 17:59:49 +00002758$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002759
2760
2761
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002762define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002763
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002764# Arguments passed to configure.
2765
2766CONFIG_ARGS="$ac_configure_args"
2767
Matthias Kloseb9621712010-04-24 17:59:49 +00002768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2769$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002771if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002772 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002773 case $enableval in
2774 yes)
2775 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002776 if test ! -d "${enableval}"
2777 then
2778 enableval=/
2779 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780 ;;
2781 esac
2782 case $enableval in
2783 no)
2784 UNIVERSALSDK=
2785 enable_universalsdk=
2786 ;;
2787 *)
2788 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789 if test ! -d "${UNIVERSALSDK}"
2790 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002791 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793 ;;
2794 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002795
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002796
Thomas Wouters477c8d52006-05-27 19:21:47 +00002797else
2798
2799 UNIVERSALSDK=
2800 enable_universalsdk=
2801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002803
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002804if test -n "${UNIVERSALSDK}"
2805then
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2807$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002808else
Matthias Kloseb9621712010-04-24 17:59:49 +00002809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2810$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002811fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002813
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002814
2815
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002817
Matthias Kloseb9621712010-04-24 17:59:49 +00002818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2819$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002820
2821# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002822if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002823 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2825$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002826 UNIVERSAL_ARCHS="$withval"
2827
2828else
2829
Matthias Kloseb9621712010-04-24 17:59:49 +00002830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2831$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002832
2833fi
2834
2835
2836
2837
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002838
2839# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002840if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002841 withval=$with_framework_name;
2842 PYTHONFRAMEWORK=${withval}
2843 PYTHONFRAMEWORKDIR=${withval}.framework
2844 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2845
2846else
2847
2848 PYTHONFRAMEWORK=Python
2849 PYTHONFRAMEWORKDIR=Python.framework
2850 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2851
2852fi
2853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002854# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002855if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002856 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002857 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002859 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002860 esac
2861 case $enableval in
2862 no)
2863 PYTHONFRAMEWORK=
2864 PYTHONFRAMEWORKDIR=no-framework
2865 PYTHONFRAMEWORKPREFIX=
2866 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 FRAMEWORKINSTALLFIRST=
2868 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002869 FRAMEWORKALTINSTALLFIRST=
2870 FRAMEWORKALTINSTALLLAST=
2871 if test "x${prefix}" = "xNONE"; then
2872 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2873 else
2874 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2875 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002876 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002877 ;;
2878 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002879 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002880 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002881 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002882 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002883 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2884 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002886
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002887 if test "x${prefix}" = "xNONE" ; then
2888 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002889
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002890 else
2891 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2892 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002893
2894 case "${enableval}" in
2895 /System*)
2896 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2897 if test "${prefix}" = "NONE" ; then
2898 # See below
2899 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2900 fi
2901 ;;
2902
2903 /Library*)
2904 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2905 ;;
2906
2907 */Library/Frameworks)
2908 MDIR="`dirname "${enableval}"`"
2909 MDIR="`dirname "${MDIR}"`"
2910 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2911
2912 if test "${prefix}" = "NONE"; then
2913 # User hasn't specified the
2914 # --prefix option, but wants to install
2915 # the framework in a non-default location,
2916 # ensure that the compatibility links get
2917 # installed relative to that prefix as well
2918 # instead of in /usr/local.
2919 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2920 fi
2921 ;;
2922
2923 *)
2924 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2925 ;;
2926 esac
2927
Jack Jansen127e56e2001-09-11 14:41:54 +00002928 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002930 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002932 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002935
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002936 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2937
2938 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2939
Jack Jansene578a632001-08-15 01:27:14 +00002940 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Guido van Rossum563e7081996-09-10 18:20:48 +00002942else
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Jack Jansene578a632001-08-15 01:27:14 +00002944 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002945 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002946 PYTHONFRAMEWORKPREFIX=
2947 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002948 FRAMEWORKINSTALLFIRST=
2949 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002950 FRAMEWORKALTINSTALLFIRST=
2951 FRAMEWORKALTINSTALLLAST=
2952 if test "x${prefix}" = "xNONE" ; then
2953 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2954 else
2955 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2956 fi
Jack Jansene578a632001-08-15 01:27:14 +00002957 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002960fi
2961
Thomas Wouters477c8d52006-05-27 19:21:47 +00002962
2963
Michael W. Hudson54241132001-12-07 15:38:26 +00002964
2965
2966
2967
Jack Jansene578a632001-08-15 01:27:14 +00002968
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002969
2970
2971
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002972
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002973
Jack Jansene578a632001-08-15 01:27:14 +00002974##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002975## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002976## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002977##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978# Set name for machine-dependent library files
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2981$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982if test -z "$MACHDEP"
2983then
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002985 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002986 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_md_system=`echo $ac_sys_system |
2992 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2993 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002994 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002995 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002996
Guido van Rossum07397971997-04-29 21:49:50 +00002997 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002998 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002999 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003000 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003001 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003002 esac
3003fi
Guido van Rossum91922671997-10-09 20:24:13 +00003004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3006# disable features if it is defined, without any means to access these
3007# features as extensions. For these systems, we skip the definition of
3008# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3009# some feature, make sure there is no alternative way to access this
3010# feature. Also, when using wildcards, make sure you have verified the
3011# need for not defining _XOPEN_SOURCE on all systems matching the
3012# wildcard, and that the wildcard does not include future systems
3013# (which may remove their limitations).
3014case $ac_sys_system/$ac_sys_release in
3015 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3016 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003017 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003018 # In addition, Stefan Krah confirms that issue #1244610 exists through
3019 # OpenBSD 4.6, but is fixed in 4.7.
3020 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003021 define_xopen_source=no
3022 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3023 # also defined. This can be overridden by defining _BSD_SOURCE
3024 # As this has a different meaning on Linux, only define it on OpenBSD
3025
Matthias Kloseb9621712010-04-24 17:59:49 +00003026$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003027
3028 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003029 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003030 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3031 # also defined. This can be overridden by defining _BSD_SOURCE
3032 # As this has a different meaning on Linux, only define it on OpenBSD
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003035
3036 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003037 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3038 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3039 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003040 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 +00003041 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003042 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3043 # request to enable features supported by the standard as a request
3044 # to disable features not supported by the standard. The best way
3045 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3046 # entirely and define __EXTENSIONS__ instead.
3047 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003048 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003049 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3050 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003051 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003052 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003053 define_xopen_source=no;;
3054 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003055 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003056 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003057 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003058 # On FreeBSD 4, the math functions C89 does not cover are never defined
3059 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3060 FreeBSD/4.*)
3061 define_xopen_source=no;;
3062 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3063 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3064 # identifies itself as Darwin/7.*
3065 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3066 # disables platform specific features beyond repair.
3067 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3068 # has no effect, don't bother defining them
3069 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003070 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003071 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003072 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003073 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3074 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3075 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003076 AIX/4)
3077 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003078 AIX/5)
3079 if test `uname -r` -eq 1; then
3080 define_xopen_source=no
3081 fi
3082 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003083 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3084 # defining NI_NUMERICHOST.
3085 QNX/6.3.2)
3086 define_xopen_source=no
3087 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003088
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003089esac
3090
3091if test $define_xopen_source = yes
3092then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
Matthias Kloseb9621712010-04-24 17:59:49 +00003094$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003095
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
3097 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3098 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3099 # several APIs are not declared. Since this is also needed in some
3100 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
Matthias Kloseb9621712010-04-24 17:59:49 +00003102$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
3104
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003107
3108
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003109fi
3110
Guido van Rossum91922671997-10-09 20:24:13 +00003111#
3112# SGI compilers allow the specification of the both the ABI and the
3113# ISA on the command line. Depending on the values of these switches,
3114# different and often incompatable code will be generated.
3115#
3116# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3117# thus supply support for various ABI/ISA combinations. The MACHDEP
3118# variable is also adjusted.
3119#
3120
3121if test ! -z "$SGI_ABI"
3122then
3123 CC="cc $SGI_ABI"
3124 LDFLAGS="$SGI_ABI $LDFLAGS"
3125 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3128$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003129
Jack Jansen6b08a402004-06-03 12:41:45 +00003130# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3131# it may influence the way we can build extensions, so distutils
3132# needs to check it
3133
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134
Jack Jansen6b08a402004-06-03 12:41:45 +00003135CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003137
Matthias Kloseb9621712010-04-24 17:59:49 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3139$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003140ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3142$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003143
Guido van Rossum627b2d71993-12-24 10:39:16 +00003144# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003145
3146# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3147# for debug/optimization stuff. BASECFLAGS is for flags that are required
3148# just to get things to compile and link. Users are free to override OPT
3149# when running configure or make. The build should not break if they do.
3150# BASECFLAGS should generally not be messed with, however.
3151
3152# XXX shouldn't some/most/all of this code be merged with the stuff later
3153# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3155$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003158if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003160 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003161 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003162 without_gcc=yes;;
3163 yes) CC=gcc
3164 without_gcc=no;;
3165 *) CC=$withval
3166 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003167 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003168else
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003170 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003171 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003172 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003173 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003174 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175fi
3176
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3178$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003179
Guido van Rossum8b131c51995-03-09 14:10:13 +00003180# If the user switches compilers, we can't believe the cache
3181if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3182then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003183 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003184(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003185fi
3186
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003187# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3188# when the compiler supports them, but we don't always want -O2, and
3189# we set -g later.
3190if test -z "$CFLAGS"; then
3191 CFLAGS=
3192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003193ac_ext=c
3194ac_cpp='$CPP $CPPFLAGS'
3195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3197ac_compiler_gnu=$ac_cv_c_compiler_gnu
3198if test -n "$ac_tool_prefix"; then
3199 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3200set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3202$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003203if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003205else
3206 if test -n "$CC"; then
3207 ac_cv_prog_CC="$CC" # Let the user override the test.
3208else
Martin v. Löwis11437992002-04-12 09:54:03 +00003209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3210for as_dir in $PATH
3211do
3212 IFS=$as_save_IFS
3213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215 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 +00003216 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 $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 +00003218 break 2
3219 fi
3220done
Matthias Kloseb9621712010-04-24 17:59:49 +00003221 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003223
Jack Jansendd19cf82001-12-06 22:36:17 +00003224fi
3225fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003226CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003227if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3229$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003230else
Matthias Kloseb9621712010-04-24 17:59:49 +00003231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3232$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003233fi
3234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235
Martin v. Löwis11437992002-04-12 09:54:03 +00003236fi
3237if test -z "$ac_cv_prog_CC"; then
3238 ac_ct_CC=$CC
3239 # Extract the first word of "gcc", so it can be a program name with args.
3240set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3242$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003243if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003245else
3246 if test -n "$ac_ct_CC"; then
3247 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3248else
3249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3250for as_dir in $PATH
3251do
3252 IFS=$as_save_IFS
3253 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255 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 +00003256 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 $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 +00003258 break 2
3259 fi
3260done
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003263
3264fi
3265fi
3266ac_ct_CC=$ac_cv_prog_ac_ct_CC
3267if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3269$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003270else
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3272$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003273fi
3274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003275 if test "x$ac_ct_CC" = x; then
3276 CC=""
3277 else
3278 case $cross_compiling:$ac_tool_warned in
3279yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003280{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3281$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282ac_tool_warned=yes ;;
3283esac
3284 CC=$ac_ct_CC
3285 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003288fi
3289
Jack Jansendd19cf82001-12-06 22:36:17 +00003290if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 if test -n "$ac_tool_prefix"; then
3292 # 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 +00003293set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3295$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003296if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003298else
3299 if test -n "$CC"; then
3300 ac_cv_prog_CC="$CC" # Let the user override the test.
3301else
Martin v. Löwis11437992002-04-12 09:54:03 +00003302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3303for as_dir in $PATH
3304do
3305 IFS=$as_save_IFS
3306 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308 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 +00003309 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 $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 +00003311 break 2
3312 fi
3313done
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003316
3317fi
3318fi
3319CC=$ac_cv_prog_CC
3320if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3322$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003323else
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3325$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003326fi
3327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003328
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331if test -z "$CC"; then
3332 # Extract the first word of "cc", so it can be a program name with args.
3333set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3335$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003336if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003338else
3339 if test -n "$CC"; then
3340 ac_cv_prog_CC="$CC" # Let the user override the test.
3341else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003342 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003348 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349 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 +00003350 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3351 ac_prog_rejected=yes
3352 continue
3353 fi
3354 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 $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 +00003356 break 2
3357 fi
3358done
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362if test $ac_prog_rejected = yes; then
3363 # We found a bogon in the path, so make sure we never use it.
3364 set dummy $ac_cv_prog_CC
3365 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367 # We chose a different compiler from the bogus one.
3368 # However, it has the same basename, so the bogon will be chosen
3369 # first if we set CC to just the basename; use the full file name.
3370 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003371 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372 fi
3373fi
3374fi
3375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003376CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003377if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003380else
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383fi
3384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386fi
3387if test -z "$CC"; then
3388 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003390 do
3391 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3392set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3394$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003395if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003397else
3398 if test -n "$CC"; then
3399 ac_cv_prog_CC="$CC" # Let the user override the test.
3400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 $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 +00003410 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003411 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003412done
Matthias Kloseb9621712010-04-24 17:59:49 +00003413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003414IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003415
3416fi
3417fi
3418CC=$ac_cv_prog_CC
3419if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3421$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003422else
Matthias Kloseb9621712010-04-24 17:59:49 +00003423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003425fi
3426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 test -n "$CC" && break
3429 done
3430fi
3431if test -z "$CC"; then
3432 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003434do
3435 # Extract the first word of "$ac_prog", so it can be a program name with args.
3436set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003439if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003441else
3442 if test -n "$ac_ct_CC"; then
3443 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3444else
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 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 +00003452 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $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 +00003454 break 2
3455 fi
3456done
Matthias Kloseb9621712010-04-24 17:59:49 +00003457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003459
Martin v. Löwis11437992002-04-12 09:54:03 +00003460fi
3461fi
3462ac_ct_CC=$ac_cv_prog_ac_ct_CC
3463if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3465$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466else
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 test -n "$ac_ct_CC" && break
3473done
Michael W. Hudson54241132001-12-07 15:38:26 +00003474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 if test "x$ac_ct_CC" = x; then
3476 CC=""
3477 else
3478 case $cross_compiling:$ac_tool_warned in
3479yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3481$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482ac_tool_warned=yes ;;
3483esac
3484 CC=$ac_ct_CC
3485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003486fi
3487
3488fi
3489
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003493as_fn_error $? "no acceptable C compiler found in \$PATH
3494See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003495
3496# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003497$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3498set X $ac_compile
3499ac_compiler=$2
3500for ac_option in --version -v -V -qversion; do
3501 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3507$as_echo "$ac_try_echo"; } >&5
3508 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 if test -s conftest.err; then
3511 sed '10a\
3512... rest of stderr output deleted ...
3513 10q' conftest.err >conftest.er1
3514 cat conftest.er1 >&5
3515 fi
3516 rm -f conftest.er1 conftest.err
3517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3518 test $ac_status = 0; }
3519done
Martin v. Löwis11437992002-04-12 09:54:03 +00003520
Matthias Kloseb9621712010-04-24 17:59:49 +00003521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003522/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003523
Martin v. Löwis11437992002-04-12 09:54:03 +00003524int
3525main ()
3526{
3527
3528 ;
3529 return 0;
3530}
3531_ACEOF
3532ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003533ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003534# Try to create an executable without -o first, disregard a.out.
3535# It will help us diagnose broken compilers, and finding out an intuition
3536# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3538$as_echo_n "checking whether the C compiler works... " >&6; }
3539ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3540
3541# The possible output files:
3542ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544ac_rmfiles=
3545for ac_file in $ac_files
3546do
3547 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003548 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3550 esac
3551done
3552rm -f $ac_rmfiles
3553
Matthias Kloseb9621712010-04-24 17:59:49 +00003554if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555case "(($ac_try" in
3556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3557 *) ac_try_echo=$ac_try;;
3558esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3560$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3564 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3566# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3567# in a Makefile. We should not override ac_cv_exeext if it was cached,
3568# so that the user can short-circuit this test for compilers unknown to
3569# Autoconf.
3570for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003571do
3572 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003575 ;;
3576 [ab].out )
3577 # We found the default executable, but exeext='' is most
3578 # certainly right.
3579 break;;
3580 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582 then :; else
3583 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3584 fi
3585 # We set ac_cv_exeext here because the later test for it is not
3586 # safe: cross compilers may not add the suffix if given an `-o'
3587 # argument, so we may need to know it at that point already.
3588 # Even if this section looks crufty: it has the advantage of
3589 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003590 break;;
3591 * )
3592 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 esac
3594done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595test "$ac_cv_exeext" = no && ac_cv_exeext=
3596
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003597else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598 ac_file=''
3599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003600if test -z "$ac_file"; then :
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602$as_echo "no" >&6; }
3603$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003604sed 's/^/| /' conftest.$ac_ext >&5
3605
Matthias Kloseb9621712010-04-24 17:59:49 +00003606{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003608as_fn_error 77 "C compiler cannot create executables
3609See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003610else
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3612$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3615$as_echo_n "checking for C compiler default output file name... " >&6; }
3616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3617$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003619
Matthias Kloseb9621712010-04-24 17:59:49 +00003620rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3623$as_echo_n "checking for suffix of executables... " >&6; }
3624if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625case "(($ac_try" in
3626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3627 *) ac_try_echo=$ac_try;;
3628esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3630$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3634 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003635 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3636# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3637# work properly (i.e., refer to `conftest.exe'), while it won't with
3638# `rm'.
3639for ac_file in conftest.exe conftest conftest.*; do
3640 test -f "$ac_file" || continue
3641 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003643 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3644 break;;
3645 * ) break;;
3646 esac
3647done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003648else
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003651as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3652See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003654rm -f conftest conftest$ac_cv_exeext
3655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3656$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003657
3658rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003659EXEEXT=$ac_cv_exeext
3660ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3662/* end confdefs.h. */
3663#include <stdio.h>
3664int
3665main ()
3666{
3667FILE *f = fopen ("conftest.out", "w");
3668 return ferror (f) || fclose (f) != 0;
3669
3670 ;
3671 return 0;
3672}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003674ac_clean_files="$ac_clean_files conftest.out"
3675# Check that the compiler produces executables we can run. If not, either
3676# the compiler is broken, or we cross compile.
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3678$as_echo_n "checking whether we are cross compiling... " >&6; }
3679if test "$cross_compiling" != yes; then
3680 { { ac_try="$ac_link"
3681case "(($ac_try" in
3682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3683 *) ac_try_echo=$ac_try;;
3684esac
3685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3686$as_echo "$ac_try_echo"; } >&5
3687 (eval "$ac_link") 2>&5
3688 ac_status=$?
3689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3690 test $ac_status = 0; }
3691 if { ac_try='./conftest$ac_cv_exeext'
3692 { { case "(($ac_try" in
3693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3694 *) ac_try_echo=$ac_try;;
3695esac
3696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3697$as_echo "$ac_try_echo"; } >&5
3698 (eval "$ac_try") 2>&5
3699 ac_status=$?
3700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3701 test $ac_status = 0; }; }; then
3702 cross_compiling=no
3703 else
3704 if test "$cross_compiling" = maybe; then
3705 cross_compiling=yes
3706 else
3707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003709as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003710If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003711See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 fi
3713 fi
3714fi
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3716$as_echo "$cross_compiling" >&6; }
3717
3718rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3719ac_clean_files=$ac_clean_files_save
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3721$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003722if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
3724else
3725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003726/* end confdefs.h. */
3727
3728int
3729main ()
3730{
3731
3732 ;
3733 return 0;
3734}
3735_ACEOF
3736rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003737if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3747 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748 for ac_file in conftest.o conftest.obj conftest.*; do
3749 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3753 break;;
3754 esac
3755done
3756else
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003758sed 's/^/| /' conftest.$ac_ext >&5
3759
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003762as_fn_error $? "cannot compute suffix of object files: cannot compile
3763See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003765rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3768$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003769OBJEXT=$ac_cv_objext
3770ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3772$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003773if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779int
3780main ()
3781{
3782#ifndef __GNUC__
3783 choke me
3784#endif
3785
3786 ;
3787 return 0;
3788}
3789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003790if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 ac_compiler_gnu=yes
3792else
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003796ac_cv_c_compiler_gnu=$ac_compiler_gnu
3797
3798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3800$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3801if test $ac_compiler_gnu = yes; then
3802 GCC=yes
3803else
3804 GCC=
3805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806ac_test_CFLAGS=${CFLAGS+set}
3807ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3809$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003810if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 ac_save_c_werror_flag=$ac_c_werror_flag
3814 ac_c_werror_flag=yes
3815 ac_cv_prog_cc_g=no
3816 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820int
3821main ()
3822{
3823
3824 ;
3825 return 0;
3826}
3827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003829 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003830else
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 CFLAGS=""
3832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833/* end confdefs.h. */
3834
3835int
3836main ()
3837{
3838
3839 ;
3840 return 0;
3841}
3842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003843if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844
Matthias Kloseb9621712010-04-24 17:59:49 +00003845else
3846 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849/* end confdefs.h. */
3850
3851int
3852main ()
3853{
3854
3855 ;
3856 return 0;
3857}
3858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003859if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3867 ac_c_werror_flag=$ac_save_c_werror_flag
3868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3870$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003871if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873elif test $ac_cv_prog_cc_g = yes; then
3874 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003875 CFLAGS="-g -O2"
3876 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003877 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878 fi
3879else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003880 if test "$GCC" = yes; then
3881 CFLAGS="-O2"
3882 else
3883 CFLAGS=
3884 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3887$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003888if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003890else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003892ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003894/* end confdefs.h. */
3895#include <stdarg.h>
3896#include <stdio.h>
3897#include <sys/types.h>
3898#include <sys/stat.h>
3899/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3900struct buf { int x; };
3901FILE * (*rcsopen) (struct buf *, struct stat *, int);
3902static char *e (p, i)
3903 char **p;
3904 int i;
3905{
3906 return p[i];
3907}
3908static char *f (char * (*g) (char **, int), char **p, ...)
3909{
3910 char *s;
3911 va_list v;
3912 va_start (v,p);
3913 s = g (p, va_arg (v,int));
3914 va_end (v);
3915 return s;
3916}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003917
3918/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3919 function prototypes and stuff, but not '\xHH' hex character constants.
3920 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003922 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3923 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003925int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3928 inside strings and character constants. */
3929#define FOO(x) 'x'
3930int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3931
Skip Montanaro6dead952003-09-25 14:50:04 +00003932int test (int i, double x);
3933struct s1 {int (*f) (int a);};
3934struct s2 {int (*f) (double a);};
3935int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3936int argc;
3937char **argv;
3938int
3939main ()
3940{
3941return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3942 ;
3943 return 0;
3944}
3945_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3947 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003948do
3949 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953rm -f core conftest.err conftest.$ac_objext
3954 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003955done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003957CC=$ac_save_CC
3958
3959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960# AC_CACHE_VAL
3961case "x$ac_cv_prog_cc_c89" in
3962 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3964$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3967$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003968 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3971$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003972esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003976
Martin v. Löwis11437992002-04-12 09:54:03 +00003977ac_ext=c
3978ac_cpp='$CPP $CPPFLAGS'
3979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3981ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003982
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003983
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003984
3985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3987$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003990if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003992
3993 case $withval in
3994 no) with_cxx_main=no
3995 MAINCC='$(CC)';;
3996 yes) with_cxx_main=yes
3997 MAINCC='$(CXX)';;
3998 *) with_cxx_main=yes
3999 MAINCC=$withval
4000 if test -z "$CXX"
4001 then
4002 CXX=$withval
4003 fi;;
4004 esac
4005else
4006
4007 with_cxx_main=no
4008 MAINCC='$(CC)'
4009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010fi
4011
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4013$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014
4015preset_cxx="$CXX"
4016if test -z "$CXX"
4017then
4018 case "$CC" in
4019 gcc) # Extract the first word of "g++", so it can be a program name with args.
4020set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4022$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004023if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004025else
4026 case $CXX in
4027 [\\/]* | ?:[\\/]*)
4028 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4029 ;;
4030 *)
4031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4032for as_dir in notfound
4033do
4034 IFS=$as_save_IFS
4035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037 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 +00004038 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040 break 2
4041 fi
4042done
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004044IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
4046 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4047 ;;
4048esac
4049fi
4050CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004051if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4053$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004054else
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004059 ;;
4060 cc) # Extract the first word of "c++", so it can be a program name with args.
4061set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4063$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004064if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004066else
4067 case $CXX in
4068 [\\/]* | ?:[\\/]*)
4069 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4070 ;;
4071 *)
4072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073for as_dir in notfound
4074do
4075 IFS=$as_save_IFS
4076 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078 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 +00004079 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081 break 2
4082 fi
4083done
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004086
4087 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4088 ;;
4089esac
4090fi
4091CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004092if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4094$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004095else
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4097$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004099
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100 ;;
4101 esac
4102 if test "$CXX" = "notfound"
4103 then
4104 CXX=""
4105 fi
4106fi
4107if test -z "$CXX"
4108then
4109 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4110do
4111 # Extract the first word of "$ac_prog", so it can be a program name with args.
4112set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4114$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004115if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117else
4118 if test -n "$CXX"; then
4119 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4120else
4121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4122for as_dir in $PATH
4123do
4124 IFS=$as_save_IFS
4125 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 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 +00004128 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 break 2
4131 fi
4132done
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135
4136fi
4137fi
4138CXX=$ac_cv_prog_CXX
4139if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4141$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142else
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4144$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145fi
4146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148 test -n "$CXX" && break
4149done
4150test -n "$CXX" || CXX="notfound"
4151
4152 if test "$CXX" = "notfound"
4153 then
4154 CXX=""
4155 fi
4156fi
4157if test "$preset_cxx" != "$CXX"
4158then
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004160
4161 By default, distutils will build C++ extension modules with \"$CXX\".
4162 If this is not intended, then set CXX on the configure command line.
4163 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004164$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004165
4166 By default, distutils will build C++ extension modules with \"$CXX\".
4167 If this is not intended, then set CXX on the configure command line.
4168 " >&2;}
4169fi
4170
4171
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4173$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4174save_LDFLAGS="$LDFLAGS"
4175LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004176
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178/* end confdefs.h. */
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
4188if ac_fn_c_try_link "$LINENO"; then :
4189 NO_AS_NEEDED="-Wl,--no-as-needed"
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4191$as_echo "yes" >&6; }
4192else
4193 NO_AS_NEEDED=""
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4195$as_echo "no" >&6; }
4196fi
4197rm -f core conftest.err conftest.$ac_objext \
4198 conftest$ac_exeext conftest.$ac_ext
4199LDFLAGS="$save_LDFLAGS"
4200
4201
4202
4203# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004204ac_ext=c
4205ac_cpp='$CPP $CPPFLAGS'
4206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4208ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4210$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004211# On Suns, sometimes $CPP names a directory.
4212if test -n "$CPP" && test -d "$CPP"; then
4213 CPP=
4214fi
4215if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004216 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004218else
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 # Double quotes because CPP needs to be expanded
4220 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4221 do
4222 ac_preproc_ok=false
4223for ac_c_preproc_warn_flag in '' yes
4224do
4225 # Use a header file that comes with gcc, so configuring glibc
4226 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004227 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4228 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004229 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
4233#ifdef __STDC__
4234# include <limits.h>
4235#else
4236# include <assert.h>
4237#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004238 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 # Broken: fails on valid input.
4244continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004245fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004246rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004252#include <ac_nonexistent.h>
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Broken: success on invalid input.
4256continue
4257else
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Passes both tests.
4259ac_preproc_ok=:
4260break
4261fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004262rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004263
4264done
4265# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004266rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 break
4269fi
4270
4271 done
4272 ac_cv_prog_CPP=$CPP
4273
4274fi
4275 CPP=$ac_cv_prog_CPP
4276else
4277 ac_cv_prog_CPP=$CPP
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4280$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004281ac_preproc_ok=false
4282for ac_c_preproc_warn_flag in '' yes
4283do
4284 # Use a header file that comes with gcc, so configuring glibc
4285 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004286 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4287 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 # On the NeXT, cc -E runs the code through the compiler's parser,
4289 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#ifdef __STDC__
4293# include <limits.h>
4294#else
4295# include <assert.h>
4296#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004299if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004300
Matthias Kloseb9621712010-04-24 17:59:49 +00004301else
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 # Broken: fails on valid input.
4303continue
4304fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004305rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004308 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004311#include <ac_nonexistent.h>
4312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004313if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # Broken: success on invalid input.
4315continue
4316else
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # Passes both tests.
4318ac_preproc_ok=:
4319break
4320fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004321rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004322
4323done
4324# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004325rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004326if $ac_preproc_ok; then :
4327
Martin v. Löwis11437992002-04-12 09:54:03 +00004328else
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004331as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4332See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004333fi
4334
4335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340
4341
Matthias Kloseb9621712010-04-24 17:59:49 +00004342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4343$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004344if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004346else
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 # Loop through the user's path and test for each of PROGNAME-LIST
4350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4352do
4353 IFS=$as_save_IFS
4354 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 for ac_prog in grep ggrep; do
4356 for ac_exec_ext in '' $ac_executable_extensions; do
4357 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4358 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4359# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 # Check for GNU $ac_path_GREP
4361case `"$ac_path_GREP" --version 2>&1` in
4362*GNU*)
4363 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4364*)
4365 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 while :
4368 do
4369 cat "conftest.in" "conftest.in" >"conftest.tmp"
4370 mv "conftest.tmp" "conftest.in"
4371 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4374 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4377 # Best one so far, save it but keep looking for a better one
4378 ac_cv_path_GREP="$ac_path_GREP"
4379 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004380 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 # 10*(2^10) chars as input seems more than enough
4382 test $ac_count -gt 10 && break
4383 done
4384 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4385esac
4386
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 $ac_path_GREP_found && break 3
4388 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004393 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 +00004394 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395else
4396 ac_cv_path_GREP=$GREP
4397fi
4398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4401$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 GREP="$ac_cv_path_GREP"
4403
4404
Matthias Kloseb9621712010-04-24 17:59:49 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4406$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004407if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409else
4410 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4411 then ac_cv_path_EGREP="$GREP -E"
4412 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004413 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 # Loop through the user's path and test for each of PROGNAME-LIST
4416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4418do
4419 IFS=$as_save_IFS
4420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 for ac_prog in egrep; do
4422 for ac_exec_ext in '' $ac_executable_extensions; do
4423 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4424 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4425# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 # Check for GNU $ac_path_EGREP
4427case `"$ac_path_EGREP" --version 2>&1` in
4428*GNU*)
4429 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4430*)
4431 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 while :
4434 do
4435 cat "conftest.in" "conftest.in" >"conftest.tmp"
4436 mv "conftest.tmp" "conftest.in"
4437 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4440 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4443 # Best one so far, save it but keep looking for a better one
4444 ac_cv_path_EGREP="$ac_path_EGREP"
4445 ac_path_EGREP_max=$ac_count
4446 fi
4447 # 10*(2^10) chars as input seems more than enough
4448 test $ac_count -gt 10 && break
4449 done
4450 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4451esac
4452
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 $ac_path_EGREP_found && break 3
4454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004455 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004459 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 +00004460 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461else
4462 ac_cv_path_EGREP=$EGREP
4463fi
4464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465 fi
4466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4468$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004470
4471
Matthias Kloseb9621712010-04-24 17:59:49 +00004472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4473$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004474if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 $as_echo_n "(cached) " >&6
4476else
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004478/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004479#include <stdlib.h>
4480#include <stdarg.h>
4481#include <string.h>
4482#include <float.h>
4483
4484int
4485main ()
4486{
4487
4488 ;
4489 return 0;
4490}
4491_ACEOF
4492if ac_fn_c_try_compile "$LINENO"; then :
4493 ac_cv_header_stdc=yes
4494else
4495 ac_cv_header_stdc=no
4496fi
4497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4498
4499if test $ac_cv_header_stdc = yes; then
4500 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4502/* end confdefs.h. */
4503#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004504
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004505_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004508
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004509else
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004511fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004512rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004513
Matthias Kloseb9621712010-04-24 17:59:49 +00004514fi
4515
4516if test $ac_cv_header_stdc = yes; then
4517 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519/* end confdefs.h. */
4520#include <stdlib.h>
4521
4522_ACEOF
4523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4524 $EGREP "free" >/dev/null 2>&1; then :
4525
4526else
4527 ac_cv_header_stdc=no
4528fi
4529rm -f conftest*
4530
4531fi
4532
4533if test $ac_cv_header_stdc = yes; then
4534 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4535 if test "$cross_compiling" = yes; then :
4536 :
4537else
4538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539/* end confdefs.h. */
4540#include <ctype.h>
4541#include <stdlib.h>
4542#if ((' ' & 0x0FF) == 0x020)
4543# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4544# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4545#else
4546# define ISLOWER(c) \
4547 (('a' <= (c) && (c) <= 'i') \
4548 || ('j' <= (c) && (c) <= 'r') \
4549 || ('s' <= (c) && (c) <= 'z'))
4550# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4551#endif
4552
4553#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4554int
4555main ()
4556{
4557 int i;
4558 for (i = 0; i < 256; i++)
4559 if (XOR (islower (i), ISLOWER (i))
4560 || toupper (i) != TOUPPER (i))
4561 return 2;
4562 return 0;
4563}
4564_ACEOF
4565if ac_fn_c_try_run "$LINENO"; then :
4566
4567else
4568 ac_cv_header_stdc=no
4569fi
4570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4571 conftest.$ac_objext conftest.beam conftest.$ac_ext
4572fi
4573
4574fi
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4577$as_echo "$ac_cv_header_stdc" >&6; }
4578if test $ac_cv_header_stdc = yes; then
4579
4580$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4581
4582fi
4583
4584# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4585for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4586 inttypes.h stdint.h unistd.h
4587do :
4588 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4589ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4590"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004591if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004592 cat >>confdefs.h <<_ACEOF
4593#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4594_ACEOF
4595
4596fi
4597
4598done
4599
4600
4601
4602 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 +00004603if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 MINIX=yes
4605else
4606 MINIX=
4607fi
4608
4609
4610 if test "$MINIX" = yes; then
4611
4612$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4613
4614
4615$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4616
4617
4618$as_echo "#define _MINIX 1" >>confdefs.h
4619
4620 fi
4621
4622
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4624$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004625if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004626 $as_echo_n "(cached) " >&6
4627else
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h. */
4630
4631# define __EXTENSIONS__ 1
4632 $ac_includes_default
4633int
4634main ()
4635{
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641if ac_fn_c_try_compile "$LINENO"; then :
4642 ac_cv_safe_to_define___extensions__=yes
4643else
4644 ac_cv_safe_to_define___extensions__=no
4645fi
4646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4647fi
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4649$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4650 test $ac_cv_safe_to_define___extensions__ = yes &&
4651 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4652
4653 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4654
4655 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4656
4657 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4658
4659 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4660
4661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004663# Check for unsupported systems
4664case $ac_sys_system/$ac_sys_release in
4665atheos*|Linux*/1*)
4666 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4667 echo See README for details.
4668 exit 1;;
4669esac
4670
4671
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4673$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674
4675# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004676if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677 withval=$with_suffix;
4678 case $withval in
4679 no) EXEEXT=;;
4680 yes) EXEEXT=.exe;;
4681 *) EXEEXT=$withval;;
4682 esac
4683fi
4684
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4686$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687
4688# Test whether we're running on a non-case-sensitive system, in which
4689# case we give a warning if no ext is given
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4692$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693if test ! -d CaseSensitiveTestDir; then
4694mkdir CaseSensitiveTestDir
4695fi
4696
4697if test -d casesensitivetestdir
4698then
Matthias Kloseb9621712010-04-24 17:59:49 +00004699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4700$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701 BUILDEXEEXT=.exe
4702else
Matthias Kloseb9621712010-04-24 17:59:49 +00004703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705 BUILDEXEEXT=$EXEEXT
4706fi
4707rmdir CaseSensitiveTestDir
4708
4709case $MACHDEP in
4710bsdos*)
4711 case $CC in
4712 gcc) CC="$CC -D_HAVE_BSDI";;
4713 esac;;
4714esac
4715
4716case $ac_sys_system in
4717hp*|HP*)
4718 case $CC in
4719 cc|*/cc) CC="$CC -Ae";;
4720 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721esac
4722
4723
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4726$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727if test -z "$LIBRARY"
4728then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004729 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4732$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733
4734# LDLIBRARY is the name of the library to link against (as opposed to the
4735# name of the library into which to insert object files). BLDLIBRARY is also
4736# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4737# is blank as the main program is not linked directly against LDLIBRARY.
4738# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4739# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4740# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4741# DLLLIBRARY is the shared (i.e., DLL) library.
4742#
4743# RUNSHARED is used to run shared python without installed libraries
4744#
4745# INSTSONAME is the name of the shared library that will be use to install
4746# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004747#
4748# LDVERSION is the shared library version number, normally the Python version
4749# with the ABI build flags appended.
4750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751
4752
4753
4754
4755
4756
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758LDLIBRARY="$LIBRARY"
4759BLDLIBRARY='$(LDLIBRARY)'
4760INSTSONAME='$(LDLIBRARY)'
4761DLLLIBRARY=''
4762LDLIBRARYDIR=''
4763RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004764LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765
4766# LINKCC is the command that links the python executable -- default is $(CC).
4767# If CXX is set, and if it is needed to link a main function that was
4768# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4769# python might then depend on the C++ runtime
4770# This is altered for AIX in order to build the export list before
4771# linking.
4772
Matthias Kloseb9621712010-04-24 17:59:49 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4774$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775if test -z "$LINKCC"
4776then
4777 LINKCC='$(PURIFY) $(MAINCC)'
4778 case $ac_sys_system in
4779 AIX*)
4780 exp_extra="\"\""
4781 if test $ac_sys_release -ge 5 -o \
4782 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4783 exp_extra="."
4784 fi
4785 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004786 QNX*)
4787 # qcc must be used because the other compilers do not
4788 # support -N.
4789 LINKCC=qcc;;
4790 esac
4791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4793$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794
4795# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4796# make sure we default having it set to "no": this is used by
4797# distutils.unixccompiler to know if it should add --enable-new-dtags
4798# to linker command lines, and failing to detect GNU ld simply results
4799# in the same bahaviour as before.
4800
Matthias Kloseb9621712010-04-24 17:59:49 +00004801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4802$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803ac_prog=ld
4804if test "$GCC" = yes; then
4805 ac_prog=`$CC -print-prog-name=ld`
4806fi
4807case `"$ac_prog" -V 2>&1 < /dev/null` in
4808 *GNU*)
4809 GNULD=yes;;
4810 *)
4811 GNULD=no;;
4812esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4814$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4817$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004818if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004819 $as_echo_n "(cached) " >&6
4820else
4821 ac_cv_c_inline=no
4822for ac_kw in inline __inline__ __inline; do
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824/* end confdefs.h. */
4825#ifndef __cplusplus
4826typedef int foo_t;
4827static $ac_kw foo_t static_foo () {return 0; }
4828$ac_kw foo_t foo () {return 0; }
4829#endif
4830
4831_ACEOF
4832if ac_fn_c_try_compile "$LINENO"; then :
4833 ac_cv_c_inline=$ac_kw
4834fi
4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 test "$ac_cv_c_inline" != no && break
4837done
4838
4839fi
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4841$as_echo "$ac_cv_c_inline" >&6; }
4842
4843case $ac_cv_c_inline in
4844 inline | yes) ;;
4845 *)
4846 case $ac_cv_c_inline in
4847 no) ac_val=;;
4848 *) ac_val=$ac_cv_c_inline;;
4849 esac
4850 cat >>confdefs.h <<_ACEOF
4851#ifndef __cplusplus
4852#define inline $ac_val
4853#endif
4854_ACEOF
4855 ;;
4856esac
4857
4858if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004859
4860$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004861
4862
4863fi
4864
4865
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4867$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004869if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870 enableval=$enable_shared;
4871fi
4872
4873
4874if test -z "$enable_shared"
4875then
4876 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004877 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878 enable_shared="yes";;
4879 *)
4880 enable_shared="no";;
4881 esac
4882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4884$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4887$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004889if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 enableval=$enable_profiling; ac_save_cc="$CC"
4891 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893 ac_enable_profiling="no"
4894else
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896/* end confdefs.h. */
4897int main() { return 0; }
4898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 ac_enable_profiling="yes"
4901else
Matthias Kloseb9621712010-04-24 17:59:49 +00004902 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906fi
4907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 CC="$ac_save_cc"
4909fi
4910
Matthias Kloseb9621712010-04-24 17:59:49 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4912$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913
4914case "$ac_enable_profiling" in
4915 "yes")
4916 BASECFLAGS="-pg $BASECFLAGS"
4917 LDFLAGS="-pg $LDFLAGS"
4918 ;;
4919esac
4920
Matthias Kloseb9621712010-04-24 17:59:49 +00004921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4922$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923
4924# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4925# library that we build, but we do not want to link against it (we
4926# will find it with a -framework option). For this reason there is an
4927# extra variable BLDLIBRARY against which Python and the extension
4928# modules are linked, BLDLIBRARY. This is normally the same as
4929# LDLIBRARY, but empty for MacOSX framework builds.
4930if test "$enable_framework"
4931then
4932 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4933 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4934 BLDLIBRARY=''
4935else
4936 BLDLIBRARY='$(LDLIBRARY)'
4937fi
4938
4939# Other platforms follow
4940if test $enable_shared = "yes"; then
4941
Matthias Kloseb9621712010-04-24 17:59:49 +00004942$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943
4944 case $ac_sys_system in
4945 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).dll.a'
4947 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 ;;
4949 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).so'
4951 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4953 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004954 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004955 then
4956 PY3LIBRARY=libpython3.so
4957 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 ;;
4959 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004960 LDLIBRARY='libpython$(LDVERSION).so'
4961 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4963 case $ac_sys_system in
4964 FreeBSD*)
4965 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4966 ;;
4967 esac
4968 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004969 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004970 then
4971 PY3LIBRARY=libpython3.so
4972 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 ;;
4974 hp*|HP*)
4975 case `uname -m` in
4976 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004977 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 ;;
4979 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 ;;
4982 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004983 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4985 ;;
4986 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004987 LDLIBRARY='libpython$(LDVERSION).so'
4988 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4990 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004992 LDLIBRARY='libpython$(LDVERSION).dylib'
4993 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4995 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004996 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004997 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004998 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4999 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000
5001 esac
5002else # shared is disabled
5003 case $ac_sys_system in
5004 CYGWIN*)
5005 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005006 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007 ;;
5008 esac
5009fi
5010
Matthias Kloseb9621712010-04-24 17:59:49 +00005011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5012$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013
5014if test -n "$ac_tool_prefix"; then
5015 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5016set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005019if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021else
5022 if test -n "$RANLIB"; then
5023 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5024else
5025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026for as_dir in $PATH
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5032 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 break 2
5035 fi
5036done
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038IFS=$as_save_IFS
5039
5040fi
5041fi
5042RANLIB=$ac_cv_prog_RANLIB
5043if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5045$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046else
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049fi
5050
5051
5052fi
5053if test -z "$ac_cv_prog_RANLIB"; then
5054 ac_ct_RANLIB=$RANLIB
5055 # Extract the first word of "ranlib", so it can be a program name with args.
5056set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005059if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061else
5062 if test -n "$ac_ct_RANLIB"; then
5063 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5064else
5065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005071 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5072 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 break 2
5075 fi
5076done
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078IFS=$as_save_IFS
5079
5080fi
5081fi
5082ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5083if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5085$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086else
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089fi
5090
5091 if test "x$ac_ct_RANLIB" = x; then
5092 RANLIB=":"
5093 else
5094 case $cross_compiling:$ac_tool_warned in
5095yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098ac_tool_warned=yes ;;
5099esac
5100 RANLIB=$ac_ct_RANLIB
5101 fi
5102else
5103 RANLIB="$ac_cv_prog_RANLIB"
5104fi
5105
5106
5107for ac_prog in ar aal
5108do
5109 # Extract the first word of "$ac_prog", so it can be a program name with args.
5110set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005113if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115else
5116 if test -n "$AR"; then
5117 ac_cv_prog_AR="$AR" # Let the user override the test.
5118else
5119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120for as_dir in $PATH
5121do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5126 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 break 2
5129 fi
5130done
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132IFS=$as_save_IFS
5133
5134fi
5135fi
5136AR=$ac_cv_prog_AR
5137if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5139$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140else
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5142$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143fi
5144
5145
5146 test -n "$AR" && break
5147done
5148test -n "$AR" || AR="ar"
5149
5150
5151# tweak ARFLAGS only if the user didn't set it on the command line
5152
5153if test -z "$ARFLAGS"
5154then
5155 ARFLAGS="rc"
5156fi
5157
5158
5159# Extract the first word of "svnversion", so it can be a program name with args.
5160set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5162$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005163if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005164 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165else
5166 if test -n "$SVNVERSION"; then
5167 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5168else
5169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170for as_dir in $PATH
5171do
5172 IFS=$as_save_IFS
5173 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005174 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5176 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 break 2
5179 fi
5180done
Matthias Kloseb9621712010-04-24 17:59:49 +00005181 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182IFS=$as_save_IFS
5183
5184 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5185fi
5186fi
5187SVNVERSION=$ac_cv_prog_SVNVERSION
5188if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5190$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191else
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194fi
5195
5196
5197if test $SVNVERSION = found
5198then
5199 SVNVERSION="svnversion \$(srcdir)"
5200else
5201 SVNVERSION="echo Unversioned directory"
5202fi
5203
Georg Brandl1ca2e792011-03-05 20:51:24 +01005204
5205
5206
5207# Extract the first word of "hg", so it can be a program name with args.
5208set dummy hg; ac_word=$2
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210$as_echo_n "checking for $ac_word... " >&6; }
5211if ${ac_cv_prog_HAS_HG+:} false; then :
5212 $as_echo_n "(cached) " >&6
5213else
5214 if test -n "$HAS_HG"; then
5215 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5216else
5217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220 IFS=$as_save_IFS
5221 test -z "$as_dir" && as_dir=.
5222 for ac_exec_ext in '' $ac_executable_extensions; do
5223 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5224 ac_cv_prog_HAS_HG="found"
5225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226 break 2
5227 fi
5228done
5229 done
5230IFS=$as_save_IFS
5231
5232 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5233fi
5234fi
5235HAS_HG=$ac_cv_prog_HAS_HG
5236if test -n "$HAS_HG"; then
5237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5238$as_echo "$HAS_HG" >&6; }
5239else
5240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
5242fi
5243
5244
5245if test $HAS_HG = found
5246then
5247 HGVERSION="hg id -i \$(srcdir)"
5248 HGTAG="hg id -t \$(srcdir)"
5249 HGBRANCH="hg id -b \$(srcdir)"
5250else
5251 HGVERSION=""
5252 HGTAG=""
5253 HGBRANCH=""
5254fi
5255
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256case $MACHDEP in
5257bsdos*|hp*|HP*)
5258 # install -d does not work on BSDI or HP-UX
5259 if test -z "$INSTALL"
5260 then
5261 INSTALL="${srcdir}/install-sh -c"
5262 fi
5263esac
5264ac_aux_dir=
5265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279done
5280if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
5292
5293# Find a good install program. We prefer a C program (faster),
5294# so one script is as good as another. But avoid the broken or
5295# incompatible versions:
5296# SysV /etc/install, /usr/sbin/install
5297# SunOS /usr/etc/install
5298# IRIX /sbin/install
5299# AIX /bin/install
5300# AmigaOS /C/install, which installs bootblocks on floppy discs
5301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5304# OS/2's system install, which has a completely different semantic
5305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306# Reject install programs that cannot install multiple files.
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316 IFS=$as_save_IFS
5317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 # Account for people who put trailing slashes in PATH elements.
5319case $as_dir/ in #((
5320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 /usr/ucb/* ) ;;
5324 *)
5325 # OSF1 and SCO ODT 3.0 have their own names for install.
5326 # Don't use installbsd from OSF since it installs stuff as root
5327 # by default.
5328 for ac_prog in ginstall scoinst install; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5331 if test $ac_prog = install &&
5332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5333 # AIX install. It has an incompatible calling convention.
5334 :
5335 elif test $ac_prog = install &&
5336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5337 # program-specific install script used by HP pwplus--don't use.
5338 :
5339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 rm -rf conftest.one conftest.two conftest.dir
5341 echo one > conftest.one
5342 echo two > conftest.two
5343 mkdir conftest.dir
5344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5345 test -s conftest.one && test -s conftest.two &&
5346 test -s conftest.dir/conftest.one &&
5347 test -s conftest.dir/conftest.two
5348 then
5349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5350 break 3
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 fi
5353 fi
5354 done
5355 done
5356 ;;
5357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005358
5359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360IFS=$as_save_IFS
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365 if test "${ac_cv_path_install+set}" = set; then
5366 INSTALL=$ac_cv_path_install
5367 else
5368 # As a last resort, use the slow shell script. Don't cache a
5369 # value for INSTALL within a source directory, because that will
5370 # break other packages using the cache if that directory is
5371 # removed, or if the value is a relative name.
5372 INSTALL=$ac_install_sh
5373 fi
5374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5379# It thinks the first close brace ends the variable substitution.
5380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5381
5382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5383
5384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5385
5386
5387# Not every filesystem supports hard links
5388
5389if test -z "$LN" ; then
5390 case $ac_sys_system in
5391 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392 *) LN=ln;;
5393 esac
5394fi
5395
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005396# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397
5398ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5402$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005403
5404# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005405if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 withval=$with_pydebug;
5407if test "$withval" != no
5408then
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5413$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005415 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005416else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5417$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418fi
5419else
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422fi
5423
5424
5425# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5426# merged with this chunk of code?
5427
5428# Optimizer/debugger flags
5429# ------------------------
5430# (The following bit of code is complicated enough - please keep things
5431# indented properly. Just pretend you're editing Python code. ;-)
5432
5433# There are two parallel sets of case statements below, one that checks to
5434# see if OPT was set and one that does BASECFLAGS setting based upon
5435# compiler and platform. BASECFLAGS tweaks need to be made even if the
5436# user set OPT.
5437
5438# tweak OPT based on compiler and platform, only if the user didn't set
5439# it on the command line
5440
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005441if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442then
5443 case $GCC in
5444 yes)
5445 if test "$CC" != 'g++' ; then
5446 STRICT_PROTO="-Wstrict-prototypes"
5447 fi
5448 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5449 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5450 WRAP="-fwrapv"
5451 fi
5452 case $ac_cv_prog_cc_g in
5453 yes)
5454 if test "$Py_DEBUG" = 'true' ; then
5455 # Optimization messes up debuggers, so turn it off for
5456 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005457 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458 else
5459 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5460 fi
5461 ;;
5462 *)
5463 OPT="-O3 -Wall $STRICT_PROTO"
5464 ;;
5465 esac
5466 case $ac_sys_system in
5467 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5468 ;;
5469 esac
5470 ;;
5471
5472 *)
5473 OPT="-O"
5474 ;;
5475 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476fi
5477
5478
5479
5480# The -arch flags for universal builds on OSX
5481UNIVERSAL_ARCH_FLAGS=
5482
5483
5484# tweak BASECFLAGS based on compiler and platform
5485case $GCC in
5486yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005487 # Python doesn't violate C99 aliasing rules, but older versions of
5488 # GCC produce warnings for legal Python code. Enable
5489 # -fno-strict-aliasing on versions of GCC that support but produce
5490 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5492$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 ac_save_cc="$CC"
5494 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005495 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005496 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005501
Matthias Kloseb159a552010-04-25 21:00:44 +00005502
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005503int
5504main ()
5505{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005506
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005507 ;
5508 return 0;
5509}
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005512if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005513
5514 CC="$ac_save_cc -fstrict-aliasing"
5515 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517/* end confdefs.h. */
5518
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005519 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520int
5521main ()
5522{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005523double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005524 ;
5525 return 0;
5526}
Matthias Kloseb159a552010-04-25 21:00:44 +00005527
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005529if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005530
5531 ac_cv_no_strict_aliasing=no
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
Matthias Kloseb159a552010-04-25 21:00:44 +00005534
5535 ac_cv_no_strict_aliasing=yes
5536
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005537fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005539
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005540else
Matthias Kloseb159a552010-04-25 21:00:44 +00005541
5542 ac_cv_no_strict_aliasing=no
5543
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005546fi
5547
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005548 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5551$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005552 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553 then
5554 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5555 fi
5556
5557 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5558 # support. Without this, treatment of subnormals doesn't follow
5559 # the standard.
5560 case $ac_sys_machine in
5561 alpha*)
5562 BASECFLAGS="$BASECFLAGS -mieee"
5563 ;;
5564 esac
5565
5566 case $ac_sys_system in
5567 SCO_SV*)
5568 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5569 ;;
5570 # is there any other compiler on Darwin besides gcc?
5571 Darwin*)
5572 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5573 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005574 if test "${CC}" = gcc
5575 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5577$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005578 case "${UNIVERSALSDK}" in
5579 */MacOSX10.4u.sdk)
5580 # Build using 10.4 SDK, force usage of gcc when the
5581 # compiler is gcc, otherwise the user will get very
5582 # confusing error messages when building on OSX 10.6
5583 CC=gcc-4.0
5584 CPP=cpp-4.0
5585 ;;
5586 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5588$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005589 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
5591
5592 if test "${enable_universalsdk}"; then
5593 UNIVERSAL_ARCH_FLAGS=""
5594 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5595 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5596 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005597 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5599 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005600 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005601 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5604 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005605 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005606 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005608 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5609 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005610 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005611 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005612
5613 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5614 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005615 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005616 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005619 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 +00005620
5621 fi
5622
5623
Ronald Oussoren666028b2010-04-18 19:07:43 +00005624 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5625 if test "${UNIVERSALSDK}" != "/"
5626 then
5627 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5628 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005629 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 fi
5631 fi
5632
5633 # Calculate the right deployment target for this build.
5634 #
5635 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5636 if test ${cur_target} '>' 10.2; then
5637 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005638 if test ${enable_universalsdk}; then
5639 if test "${UNIVERSAL_ARCHS}" = "all"; then
5640 # Ensure that the default platform for a
5641 # 4-way universal build is OSX 10.5,
5642 # that's the first OS release where
5643 # 4-way builds make sense.
5644 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005645
5646 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5647 cur_target='10.5'
5648
5649 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5650 cur_target='10.5'
5651
5652 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5653 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005654 fi
5655 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005656 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005657 # On Intel macs default to a deployment
5658 # target of 10.4, that's the first OSX
5659 # release with Intel support.
5660 cur_target="10.4"
5661 fi
5662 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 fi
5664 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5665
5666 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5667 # environment with a value that is the same as what we'll use
5668 # in the Makefile to ensure that we'll get the same compiler
5669 # environment during configure and build time.
5670 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5671 export MACOSX_DEPLOYMENT_TARGET
5672 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5673
5674 ;;
5675 OSF*)
5676 BASECFLAGS="$BASECFLAGS -mieee"
5677 ;;
5678 esac
5679 ;;
5680
5681*)
5682 case $ac_sys_system in
5683 OpenUNIX*|UnixWare*)
5684 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5685 ;;
5686 OSF*)
5687 BASECFLAGS="$BASECFLAGS -ieee -std"
5688 ;;
5689 SCO_SV*)
5690 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5691 ;;
5692 esac
5693 ;;
5694esac
5695
5696if test "$Py_DEBUG" = 'true'; then
5697 :
5698else
5699 OPT="-DNDEBUG $OPT"
5700fi
5701
5702if test "$ac_arch_flags"
5703then
5704 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5705fi
5706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707# Check whether GCC supports PyArg_ParseTuple format
5708if test "$GCC" = "yes"
5709then
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5711$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 save_CFLAGS=$CFLAGS
5713 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715/* end confdefs.h. */
5716
5717 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718int
5719main ()
5720{
5721
5722 ;
5723 return 0;
5724}
Matthias Kloseb159a552010-04-25 21:00:44 +00005725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005727if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
Matthias Kloseb159a552010-04-25 21:00:44 +00005729
Matthias Kloseb9621712010-04-24 17:59:49 +00005730$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731
Matthias Kloseb159a552010-04-25 21:00:44 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005733$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735else
Matthias Kloseb159a552010-04-25 21:00:44 +00005736
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005738$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5742 CFLAGS=$save_CFLAGS
5743fi
5744
5745# On some compilers, pthreads are available without further options
5746# (e.g. MacOS X). On some of these systems, the compiler will not
5747# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5748# So we have to see first whether pthreads are available without
5749# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5751$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005752if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754else
Matthias Kloseb9621712010-04-24 17:59:49 +00005755 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_pthread_is_default=no
5757else
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759/* end confdefs.h. */
5760
5761#include <pthread.h>
5762
5763void* routine(void* p){return NULL;}
5764
5765int main(){
5766 pthread_t p;
5767 if(pthread_create(&p,NULL,routine,NULL)!=0)
5768 return 1;
5769 (void)pthread_detach(p);
5770 return 0;
5771}
5772
5773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
5776 ac_cv_pthread_is_default=yes
5777 ac_cv_kthread=no
5778 ac_cv_pthread=no
5779
5780else
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785fi
5786
5787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788fi
5789
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5791$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
5793
5794if test $ac_cv_pthread_is_default = yes
5795then
5796 ac_cv_kpthread=no
5797else
5798# -Kpthread, if available, provides the right #defines
5799# and linker options to make pthread_create available
5800# Some compilers won't report that they do not support -Kpthread,
5801# so we need to run a program to see whether it really made the
5802# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5804$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005805if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005806 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807else
5808 ac_save_cc="$CC"
5809CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005810if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ac_cv_kpthread=no
5812else
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814/* end confdefs.h. */
5815
5816#include <pthread.h>
5817
5818void* routine(void* p){return NULL;}
5819
5820int main(){
5821 pthread_t p;
5822 if(pthread_create(&p,NULL,routine,NULL)!=0)
5823 return 1;
5824 (void)pthread_detach(p);
5825 return 0;
5826}
5827
5828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005829if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830 ac_cv_kpthread=yes
5831else
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
5837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838CC="$ac_save_cc"
5839fi
5840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5842$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
5845if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5846then
5847# -Kthread, if available, provides the right #defines
5848# and linker options to make pthread_create available
5849# Some compilers won't report that they do not support -Kthread,
5850# so we need to run a program to see whether it really made the
5851# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5853$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005854if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005855 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856else
5857 ac_save_cc="$CC"
5858CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005859if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 ac_cv_kthread=no
5861else
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863/* end confdefs.h. */
5864
5865#include <pthread.h>
5866
5867void* routine(void* p){return NULL;}
5868
5869int main(){
5870 pthread_t p;
5871 if(pthread_create(&p,NULL,routine,NULL)!=0)
5872 return 1;
5873 (void)pthread_detach(p);
5874 return 0;
5875}
5876
5877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005878if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 ac_cv_kthread=yes
5880else
Matthias Kloseb9621712010-04-24 17:59:49 +00005881 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
5886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887CC="$ac_save_cc"
5888fi
5889
Matthias Kloseb9621712010-04-24 17:59:49 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5891$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
5894if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5895then
5896# -pthread, if available, provides the right #defines
5897# and linker options to make pthread_create available
5898# Some compilers won't report that they do not support -pthread,
5899# so we need to run a program to see whether it really made the
5900# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5902$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005903if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905else
5906 ac_save_cc="$CC"
5907CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005908if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ac_cv_pthread=no
5910else
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912/* end confdefs.h. */
5913
5914#include <pthread.h>
5915
5916void* routine(void* p){return NULL;}
5917
5918int main(){
5919 pthread_t p;
5920 if(pthread_create(&p,NULL,routine,NULL)!=0)
5921 return 1;
5922 (void)pthread_detach(p);
5923 return 0;
5924}
5925
5926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005927if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ac_cv_pthread=yes
5929else
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934fi
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936CC="$ac_save_cc"
5937fi
5938
Matthias Kloseb9621712010-04-24 17:59:49 +00005939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5940$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941fi
5942
5943# If we have set a CC compiler flag for thread support then
5944# check if it works for CXX, too.
5945ac_cv_cxx_thread=no
5946if test ! -z "$CXX"
5947then
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5949$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950ac_save_cxx="$CXX"
5951
5952if test "$ac_cv_kpthread" = "yes"
5953then
5954 CXX="$CXX -Kpthread"
5955 ac_cv_cxx_thread=yes
5956elif test "$ac_cv_kthread" = "yes"
5957then
5958 CXX="$CXX -Kthread"
5959 ac_cv_cxx_thread=yes
5960elif test "$ac_cv_pthread" = "yes"
5961then
5962 CXX="$CXX -pthread"
5963 ac_cv_cxx_thread=yes
5964fi
5965
5966if test $ac_cv_cxx_thread = yes
5967then
5968 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5969 $CXX -c conftest.$ac_ext 2>&5
5970 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5971 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5972 then
5973 ac_cv_cxx_thread=yes
5974 else
5975 ac_cv_cxx_thread=no
5976 fi
5977 rm -fr conftest*
5978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5980$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981fi
5982CXX="$ac_save_cxx"
5983
5984
5985# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5987$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005988if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992/* end confdefs.h. */
5993#include <stdlib.h>
5994#include <stdarg.h>
5995#include <string.h>
5996#include <float.h>
5997
5998int
5999main ()
6000{
6001
6002 ;
6003 return 0;
6004}
6005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006006if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 ac_cv_header_stdc=yes
6008else
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6012
6013if test $ac_cv_header_stdc = yes; then
6014 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016/* end confdefs.h. */
6017#include <string.h>
6018
6019_ACEOF
6020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 $EGREP "memchr" >/dev/null 2>&1; then :
6022
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023else
6024 ac_cv_header_stdc=no
6025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006026rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027
6028fi
6029
6030if test $ac_cv_header_stdc = yes; then
6031 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033/* end confdefs.h. */
6034#include <stdlib.h>
6035
6036_ACEOF
6037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 $EGREP "free" >/dev/null 2>&1; then :
6039
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
6041 ac_cv_header_stdc=no
6042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006043rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044
6045fi
6046
6047if test $ac_cv_header_stdc = yes; then
6048 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 :
6051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053/* end confdefs.h. */
6054#include <ctype.h>
6055#include <stdlib.h>
6056#if ((' ' & 0x0FF) == 0x020)
6057# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6058# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6059#else
6060# define ISLOWER(c) \
6061 (('a' <= (c) && (c) <= 'i') \
6062 || ('j' <= (c) && (c) <= 'r') \
6063 || ('s' <= (c) && (c) <= 'z'))
6064# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6065#endif
6066
6067#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6068int
6069main ()
6070{
6071 int i;
6072 for (i = 0; i < 256; i++)
6073 if (XOR (islower (i), ISLOWER (i))
6074 || toupper (i) != TOUPPER (i))
6075 return 2;
6076 return 0;
6077}
6078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006079if ac_fn_c_try_run "$LINENO"; then :
6080
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086fi
6087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088fi
6089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6091$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092if test $ac_cv_header_stdc = yes; then
6093
Matthias Kloseb9621712010-04-24 17:59:49 +00006094$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095
6096fi
6097
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006098for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6099fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006100ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006101shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006102unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006103sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6104sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006105sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006106sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006107sys/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 +00006108sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006109bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006110do :
6111 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6112ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006113if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006114 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006115#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006116_ACEOF
6117
6118fi
6119
Guido van Rossum627b2d71993-12-24 10:39:16 +00006120done
6121
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006123for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6126$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006127if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006129else
Matthias Kloseb9621712010-04-24 17:59:49 +00006130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006131/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006132#include <sys/types.h>
6133#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006134
Martin v. Löwis11437992002-04-12 09:54:03 +00006135int
6136main ()
6137{
6138if ((DIR *) 0)
6139return 0;
6140 ;
6141 return 0;
6142}
6143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006146else
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006151eval ac_res=\$$as_ac_Header
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6153$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006154if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006156#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006157_ACEOF
6158
6159ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162done
6163# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6164if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6166$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006167if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169else
Martin v. Löwis11437992002-04-12 09:54:03 +00006170 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174/* Override any GCC internal prototype to avoid an error.
6175 Use char because int might match the return type of a GCC
6176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006177#ifdef __cplusplus
6178extern "C"
6179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006180char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006181int
6182main ()
6183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006185 ;
6186 return 0;
6187}
6188_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189for ac_lib in '' dir; do
6190 if test -z "$ac_lib"; then
6191 ac_res="none required"
6192 else
6193 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006194 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199rm -f core conftest.err conftest.$ac_objext \
6200 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006201 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006205if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207else
6208 ac_cv_search_opendir=no
6209fi
6210rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006211LIBS=$ac_func_search_save_LIBS
6212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6214$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006215ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006216if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006220
Michael W. Hudson54241132001-12-07 15:38:26 +00006221else
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6223$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006224if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006226else
6227 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231/* Override any GCC internal prototype to avoid an error.
6232 Use char because int might match the return type of a GCC
6233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006234#ifdef __cplusplus
6235extern "C"
6236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006237char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006238int
6239main ()
6240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006242 ;
6243 return 0;
6244}
6245_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246for ac_lib in '' x; do
6247 if test -z "$ac_lib"; then
6248 ac_res="none required"
6249 else
6250 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006251 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006252 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006253 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006254 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006256rm -f core conftest.err conftest.$ac_objext \
6257 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006258 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006262if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006264else
6265 ac_cv_search_opendir=no
6266fi
6267rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006268LIBS=$ac_func_search_save_LIBS
6269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6271$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006273if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276fi
6277
6278fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279
Matthias Kloseb9621712010-04-24 17:59:49 +00006280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6281$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006282if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284else
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006286/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288int
6289main ()
6290{
6291return makedev(0, 0);
6292 ;
6293 return 0;
6294}
6295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297 ac_cv_header_sys_types_h_makedev=yes
6298else
Matthias Kloseb9621712010-04-24 17:59:49 +00006299 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006301rm -f core conftest.err conftest.$ac_objext \
6302 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303
6304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6306$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307
6308if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006309ac_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 +00006310if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313
6314fi
6315
6316
6317
6318 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006319 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 +00006320if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006321
Matthias Kloseb9621712010-04-24 17:59:49 +00006322$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324fi
6325
6326
6327 fi
6328fi
6329
Michael W. Hudson54241132001-12-07 15:38:26 +00006330
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006331# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006332for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006333do :
6334 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006335#ifdef HAVE_CURSES_H
6336#include <curses.h>
6337#endif
6338
Matthias Kloseb9621712010-04-24 17:59:49 +00006339"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006340if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006341 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006343_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006344
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006345fi
6346
6347done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348
6349
Martin v. Löwis11017b12006-01-14 18:12:57 +00006350# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006351for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006352do :
6353 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 +00006354#ifdef HAVE_ASM_TYPES_H
6355#include <asm/types.h>
6356#endif
6357#ifdef HAVE_SYS_SOCKET_H
6358#include <sys/socket.h>
6359#endif
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006362if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006364#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006365_ACEOF
6366
6367fi
6368
6369done
6370
6371
Guido van Rossum627b2d71993-12-24 10:39:16 +00006372# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006373was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6375$as_echo_n "checking for clock_t in time.h... " >&6; }
6376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006377/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006378#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006379
6380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006383 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006384else
Martin v. Löwis11437992002-04-12 09:54:03 +00006385
6386
Matthias Kloseb9621712010-04-24 17:59:49 +00006387$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006388
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006389
Guido van Rossum627b2d71993-12-24 10:39:16 +00006390fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006391rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6394$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006395
Neal Norwitz11690112002-07-30 01:08:28 +00006396# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6398$as_echo_n "checking for makedev... " >&6; }
6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006401
Jesus Cea740f53a2010-04-28 11:35:30 +00006402#if defined(MAJOR_IN_MKDEV)
6403#include <sys/mkdev.h>
6404#elif defined(MAJOR_IN_SYSMACROS)
6405#include <sys/sysmacros.h>
6406#else
6407#include <sys/types.h>
6408#endif
6409
Neal Norwitz11690112002-07-30 01:08:28 +00006410int
6411main ()
6412{
Jesus Cea740f53a2010-04-28 11:35:30 +00006413
6414 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006415 ;
6416 return 0;
6417}
Matthias Kloseb159a552010-04-25 21:00:44 +00006418
Neal Norwitz11690112002-07-30 01:08:28 +00006419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006420if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006421 ac_cv_has_makedev=yes
6422else
Matthias Kloseb9621712010-04-24 17:59:49 +00006423 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006425rm -f core conftest.err conftest.$ac_objext \
6426 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006427if test "$ac_cv_has_makedev" = "no"; then
6428 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006430/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006431
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006432#define _OSF_SOURCE 1
6433#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006434
Neal Norwitz11690112002-07-30 01:08:28 +00006435int
6436main ()
6437{
6438 makedev(0, 0)
6439 ;
6440 return 0;
6441}
6442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006443if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006444 ac_cv_has_makedev=yes
6445else
Matthias Kloseb9621712010-04-24 17:59:49 +00006446 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006448rm -f core conftest.err conftest.$ac_objext \
6449 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006450 if test "$ac_cv_has_makedev" = "yes"; then
6451
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006453
6454 fi
6455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6457$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006458if test "$ac_cv_has_makedev" = "yes"; then
6459
Matthias Kloseb9621712010-04-24 17:59:49 +00006460$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006461
6462fi
6463
Martin v. Löwis399a6892002-10-04 10:22:02 +00006464# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6465# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6466# defined, but the compiler does not support pragma redefine_extname,
6467# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6468# structures (such as rlimit64) without declaring them. As a
6469# work-around, disable LFS on such configurations
6470
6471use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6473$as_echo_n "checking Solaris LFS bug... " >&6; }
6474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006475/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006476
6477#define _LARGEFILE_SOURCE 1
6478#define _FILE_OFFSET_BITS 64
6479#include <sys/resource.h>
6480
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481int
6482main ()
6483{
6484struct rlimit foo;
6485 ;
6486 return 0;
6487}
6488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006490 sol_lfs_bug=no
6491else
Matthias Kloseb9621712010-04-24 17:59:49 +00006492 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6496$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006497if test "$sol_lfs_bug" = "yes"; then
6498 use_lfs=no
6499fi
6500
6501if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006502# Two defines needed to enable largefile support on various platforms
6503# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006504case $ac_sys_system/$ac_sys_release in
6505AIX*)
6506
6507$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6508
6509 ;;
6510esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006516
Martin v. Löwis399a6892002-10-04 10:22:02 +00006517fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006518
Guido van Rossum84e7b241996-08-19 21:59:00 +00006519# Add some code to confdefs.h so that the test for off_t works on SCO
6520cat >> confdefs.h <<\EOF
6521#if defined(SCO_DS)
6522#undef _OFF_T
6523#endif
6524EOF
6525
Guido van Rossumef2255b2000-03-10 22:30:29 +00006526# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006527ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006528if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530else
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532cat >>confdefs.h <<_ACEOF
6533#define mode_t int
6534_ACEOF
6535
6536fi
6537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006539if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541else
Martin v. Löwis11437992002-04-12 09:54:03 +00006542
6543cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006545_ACEOF
6546
6547fi
6548
Matthias Kloseb9621712010-04-24 17:59:49 +00006549ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006550if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552else
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554cat >>confdefs.h <<_ACEOF
6555#define pid_t int
6556_ACEOF
6557
6558fi
6559
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006560
Martin v. Löwis11437992002-04-12 09:54:03 +00006561cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006562#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006563_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006564
Matthias Kloseb9621712010-04-24 17:59:49 +00006565ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006566if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006567
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006568else
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006572_ACEOF
6573
6574fi
6575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6577$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006578if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006580else
Matthias Kloseb9621712010-04-24 17:59:49 +00006581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006584
6585_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006588 ac_cv_type_uid_t=yes
6589else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006590 ac_cv_type_uid_t=no
6591fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006592rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6596$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006597if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006598
Matthias Kloseb9621712010-04-24 17:59:49 +00006599$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006600
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603
6604fi
6605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6607case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006608 no|yes) ;; #(
6609 *)
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006612
6613
6614cat >>confdefs.h <<_ACEOF
6615#define uint32_t $ac_cv_c_uint32_t
6616_ACEOF
6617;;
6618 esac
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6621case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006622 no|yes) ;; #(
6623 *)
6624
Matthias Kloseb9621712010-04-24 17:59:49 +00006625$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006626
6627
6628cat >>confdefs.h <<_ACEOF
6629#define uint64_t $ac_cv_c_uint64_t
6630_ACEOF
6631;;
6632 esac
6633
Matthias Kloseb9621712010-04-24 17:59:49 +00006634ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6635case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006636 no|yes) ;; #(
6637 *)
6638
6639cat >>confdefs.h <<_ACEOF
6640#define int32_t $ac_cv_c_int32_t
6641_ACEOF
6642;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006643esac
6644
Matthias Kloseb9621712010-04-24 17:59:49 +00006645ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6646case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006647 no|yes) ;; #(
6648 *)
6649
6650cat >>confdefs.h <<_ACEOF
6651#define int64_t $ac_cv_c_int64_t
6652_ACEOF
6653;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006654esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006655
Matthias Kloseb9621712010-04-24 17:59:49 +00006656ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006657if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658
Matthias Kloseb9621712010-04-24 17:59:49 +00006659$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006660
6661fi
6662
Jack Jansendd19cf82001-12-06 22:36:17 +00006663
Michael W. Hudson54241132001-12-07 15:38:26 +00006664# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006665# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666# The cast to long int works around a bug in the HP C Compiler
6667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6671$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006672if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 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 +00006676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 if test "$ac_cv_type_int" = yes; then
6679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006681as_fn_error 77 "cannot compute sizeof (int)
6682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683 else
6684 ac_cv_sizeof_int=0
6685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6690$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006691
6692
6693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006695#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006696_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006697
6698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006699# The cast to long int works around a bug in the HP C Compiler
6700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6704$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006705if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006707else
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 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 +00006709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710else
Matthias Kloseb9621712010-04-24 17:59:49 +00006711 if test "$ac_cv_type_long" = yes; then
6712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006714as_fn_error 77 "cannot compute sizeof (long)
6715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716 else
6717 ac_cv_sizeof_long=0
6718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006720
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6723$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006724
6725
6726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006728#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006729_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006730
6731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006732# The cast to long int works around a bug in the HP C Compiler
6733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6737$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006738if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006740else
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 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 +00006742
Martin v. Löwis11437992002-04-12 09:54:03 +00006743else
Matthias Kloseb9621712010-04-24 17:59:49 +00006744 if test "$ac_cv_type_void_p" = yes; then
6745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006747as_fn_error 77 "cannot compute sizeof (void *)
6748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749 else
6750 ac_cv_sizeof_void_p=0
6751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6756$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757
6758
6759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006761#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006762_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006763
6764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765# The cast to long int works around a bug in the HP C Compiler
6766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6770$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006771if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006773else
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 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 +00006775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 if test "$ac_cv_type_short" = yes; then
6778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006780as_fn_error 77 "cannot compute sizeof (short)
6781See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782 else
6783 ac_cv_sizeof_short=0
6784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6789$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790
6791
6792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006794#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006796
6797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006798# The cast to long int works around a bug in the HP C Compiler
6799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6803$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006804if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006806else
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 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 +00006808
Martin v. Löwis11437992002-04-12 09:54:03 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 if test "$ac_cv_type_float" = yes; then
6811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006813as_fn_error 77 "cannot compute sizeof (float)
6814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815 else
6816 ac_cv_sizeof_float=0
6817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006819
Martin v. Löwis11437992002-04-12 09:54:03 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6822$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823
6824
6825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006827#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006828_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829
6830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831# The cast to long int works around a bug in the HP C Compiler
6832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6834# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6836$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006837if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006839else
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 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 +00006841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842else
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 if test "$ac_cv_type_double" = yes; then
6844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006846as_fn_error 77 "cannot compute sizeof (double)
6847See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848 else
6849 ac_cv_sizeof_double=0
6850 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006852
Martin v. Löwis11437992002-04-12 09:54:03 +00006853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6855$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006856
6857
6858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006860#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006861_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006862
6863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006864# The cast to long int works around a bug in the HP C Compiler
6865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6867# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6869$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006870if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006872else
Matthias Kloseb9621712010-04-24 17:59:49 +00006873 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 +00006874
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 if test "$ac_cv_type_fpos_t" = yes; then
6877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006879as_fn_error 77 "cannot compute sizeof (fpos_t)
6880See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881 else
6882 ac_cv_sizeof_fpos_t=0
6883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6888$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889
6890
6891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006893#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006894_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006895
Michael W. Hudson54241132001-12-07 15:38:26 +00006896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897# The cast to long int works around a bug in the HP C Compiler
6898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6902$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006903if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006905else
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 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 +00006907
Martin v. Löwis18e16552006-02-15 17:27:45 +00006908else
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 if test "$ac_cv_type_size_t" = yes; then
6910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006912as_fn_error 77 "cannot compute sizeof (size_t)
6913See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914 else
6915 ac_cv_sizeof_size_t=0
6916 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006918
Martin v. Löwis18e16552006-02-15 17:27:45 +00006919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6921$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006922
6923
6924
Martin v. Löwis18e16552006-02-15 17:27:45 +00006925cat >>confdefs.h <<_ACEOF
6926#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6927_ACEOF
6928
6929
Christian Heimes400adb02008-02-01 08:12:03 +00006930# The cast to long int works around a bug in the HP C Compiler
6931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6935$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006936if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006938else
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 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 +00006940
Christian Heimes400adb02008-02-01 08:12:03 +00006941else
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 if test "$ac_cv_type_pid_t" = yes; then
6943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006945as_fn_error 77 "cannot compute sizeof (pid_t)
6946See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006947 else
6948 ac_cv_sizeof_pid_t=0
6949 fi
6950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006951
Christian Heimes400adb02008-02-01 08:12:03 +00006952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6954$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006955
6956
6957
6958cat >>confdefs.h <<_ACEOF
6959#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6960_ACEOF
6961
6962
Michael W. Hudson54241132001-12-07 15:38:26 +00006963
Matthias Kloseb9621712010-04-24 17:59:49 +00006964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6965$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006966have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006968/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970int
6971main ()
6972{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006973long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006974 ;
6975 return 0;
6976}
6977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006979
6980
Matthias Kloseb9621712010-04-24 17:59:49 +00006981$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006982
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006983 have_long_long=yes
6984
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6988$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006989if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990# The cast to long int works around a bug in the HP C Compiler
6991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6995$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006996if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006998else
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 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 +00007000
Martin v. Löwis11437992002-04-12 09:54:03 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 if test "$ac_cv_type_long_long" = yes; then
7003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007005as_fn_error 77 "cannot compute sizeof (long long)
7006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007 else
7008 ac_cv_sizeof_long_long=0
7009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7014$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015
7016
7017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007019#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007020_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007021
Michael W. Hudson54241132001-12-07 15:38:26 +00007022
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007023fi
7024
Matthias Kloseb9621712010-04-24 17:59:49 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7026$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007029/* end confdefs.h. */
7030
7031int
7032main ()
7033{
7034long double x; x = (long double)0;
7035 ;
7036 return 0;
7037}
7038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007039if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040
7041
Matthias Kloseb9621712010-04-24 17:59:49 +00007042$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007043
7044 have_long_double=yes
7045
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7049$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007050if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007051# The cast to long int works around a bug in the HP C Compiler
7052# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7053# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7054# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7056$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007057if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007058 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007059else
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 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 +00007061
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007062else
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 if test "$ac_cv_type_long_double" = yes; then
7064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007066as_fn_error 77 "cannot compute sizeof (long double)
7067See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007068 else
7069 ac_cv_sizeof_long_double=0
7070 fi
7071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007072
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7075$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007076
7077
7078
7079cat >>confdefs.h <<_ACEOF
7080#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7081_ACEOF
7082
7083
7084fi
7085
7086
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7088$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007089have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007091/* end confdefs.h. */
7092
7093int
7094main ()
7095{
7096_Bool x; x = (_Bool)0;
7097 ;
7098 return 0;
7099}
7100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007101if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007102
7103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007105
7106 have_c99_bool=yes
7107
Thomas Woutersb2137042007-02-01 18:02:27 +00007108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7111$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007112if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007113# The cast to long int works around a bug in the HP C Compiler
7114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7118$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007119if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007120 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 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 +00007123
Thomas Woutersb2137042007-02-01 18:02:27 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 if test "$ac_cv_type__Bool" = yes; then
7126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007128as_fn_error 77 "cannot compute sizeof (_Bool)
7129See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130 else
7131 ac_cv_sizeof__Bool=0
7132 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134
Thomas Woutersb2137042007-02-01 18:02:27 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7137$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138
7139
7140
Thomas Woutersb2137042007-02-01 18:02:27 +00007141cat >>confdefs.h <<_ACEOF
7142#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7143_ACEOF
7144
7145
7146fi
7147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007149 #include <stdint.h>
7150 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007151 #ifdef HAVE_INTTYPES_H
7152 #include <inttypes.h>
7153 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007154"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007155if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007156
7157cat >>confdefs.h <<_ACEOF
7158#define HAVE_UINTPTR_T 1
7159_ACEOF
7160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007161# The cast to long int works around a bug in the HP C Compiler
7162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7166$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007167if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 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 +00007171
Martin v. Löwis11437992002-04-12 09:54:03 +00007172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 if test "$ac_cv_type_uintptr_t" = yes; then
7174 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007176as_fn_error 77 "cannot compute sizeof (uintptr_t)
7177See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007178 else
7179 ac_cv_sizeof_uintptr_t=0
7180 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7185$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007186
7187
7188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007190#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007191_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007192
Michael W. Hudson54241132001-12-07 15:38:26 +00007193
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007194fi
7195
Thomas Wouters89f507f2006-12-13 04:49:30 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197# The cast to long int works around a bug in the HP C Compiler
7198# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7199# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7200# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7202$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007203if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007204 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205else
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007207#ifdef HAVE_SYS_TYPES_H
7208#include <sys/types.h>
7209#endif
7210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 if test "$ac_cv_type_off_t" = yes; then
7215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007217as_fn_error 77 "cannot compute sizeof (off_t)
7218See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219 else
7220 ac_cv_sizeof_off_t=0
7221 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007223
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7226$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007227
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228
7229
Martin v. Löwis11437992002-04-12 09:54:03 +00007230cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007231#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007232_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007233
Michael W. Hudson54241132001-12-07 15:38:26 +00007234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7237$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007238if test "$have_long_long" = yes
7239then
7240if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007241 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007244
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7246$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247else
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7249$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007250fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007254fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256# The cast to long int works around a bug in the HP C Compiler
7257# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7258# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7259# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7261$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007262if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007263 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007264else
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266#ifdef HAVE_SYS_TYPES_H
7267#include <sys/types.h>
7268#endif
7269#ifdef HAVE_TIME_H
7270#include <time.h>
7271#endif
7272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275else
Matthias Kloseb9621712010-04-24 17:59:49 +00007276 if test "$ac_cv_type_time_t" = yes; then
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007279as_fn_error 77 "cannot compute sizeof (time_t)
7280See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281 else
7282 ac_cv_sizeof_time_t=0
7283 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007285
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7288$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007290
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007293#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007294_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007295
Michael W. Hudson54241132001-12-07 15:38:26 +00007296
7297
Trent Mick635f6fb2000-08-23 21:33:05 +00007298# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007299ac_save_cc="$CC"
7300if test "$ac_cv_kpthread" = "yes"
7301then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007302elif test "$ac_cv_kthread" = "yes"
7303then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007304elif test "$ac_cv_pthread" = "yes"
7305then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007306fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7309$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007310have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007312/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007313
7314 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007315int
7316main ()
7317{
Guido van Rossum12580492000-09-24 16:47:19 +00007318pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007319 ;
7320 return 0;
7321}
Matthias Kloseb159a552010-04-25 21:00:44 +00007322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007324if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007325 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7329$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007330if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7334# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7336$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007337if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007341#ifdef HAVE_PTHREAD_H
7342#include <pthread.h>
7343#endif
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007347else
Matthias Kloseb9621712010-04-24 17:59:49 +00007348 if test "$ac_cv_type_pthread_t" = yes; then
7349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007351as_fn_error 77 "cannot compute sizeof (pthread_t)
7352See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007353 else
7354 ac_cv_sizeof_pthread_t=0
7355 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007357
Trent Mick635f6fb2000-08-23 21:33:05 +00007358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7360$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007362
7363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007368
Trent Mick635f6fb2000-08-23 21:33:05 +00007369fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007370CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007371
Michael W. Hudson54241132001-12-07 15:38:26 +00007372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007374 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007375 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7376 ;;
7377 Darwin/*)
7378 OTHER_LIBTOOL_OPT=""
7379 ;;
7380esac
7381
7382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007383ARCH_RUN_32BIT=""
7384
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007385case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007386 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007387 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7388 if test "${enable_universalsdk}"; then
7389 :
7390 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007391 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007392 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007395 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007396 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007397 if test ${gcc_version} '<' 4.0
7398 then
7399 LIBTOOL_CRUFT="-lcc_dynamic"
7400 else
7401 LIBTOOL_CRUFT=""
7402 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007404 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007407/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007408
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409 #include <unistd.h>
7410 int main(int argc, char*argv[])
7411 {
7412 if (sizeof(long) == 4) {
7413 return 0;
7414 } else {
7415 return 1;
7416 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007417 }
7418
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007420if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007421 ac_osx_32bit=yes
7422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7426 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007427fi
7428
7429
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007430 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007431 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007432 i386)
7433 MACOSX_DEFAULT_ARCH="i386"
7434 ;;
7435 ppc)
7436 MACOSX_DEFAULT_ARCH="ppc"
7437 ;;
7438 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007439 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007440 ;;
7441 esac
7442 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007443 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007444 i386)
7445 MACOSX_DEFAULT_ARCH="x86_64"
7446 ;;
7447 ppc)
7448 MACOSX_DEFAULT_ARCH="ppc64"
7449 ;;
7450 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007451 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007452 ;;
7453 esac
7454
7455 #ARCH_RUN_32BIT="true"
7456 fi
7457
7458 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007459 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007460 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007461esac
7462
Matthias Kloseb9621712010-04-24 17:59:49 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7464$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007465if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007466then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007467 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007469 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007472
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7474$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007475 if test $enable_shared = "yes"
7476 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007477 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 +00007478 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007479else
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007482fi
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7485$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486case $ac_sys_system/$ac_sys_release in
7487 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7492$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007493 ;;
7494 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007497 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007498esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007499
Guido van Rossum0a516c91994-09-12 10:58:40 +00007500# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007501
Michael W. Hudson54241132001-12-07 15:38:26 +00007502
7503
7504
7505
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506
Thomas Wouters477c8d52006-05-27 19:21:47 +00007507
Georg Brandlb1441c72009-01-03 22:33:39 +00007508
Thomas Wouters477c8d52006-05-27 19:21:47 +00007509cat >>confdefs.h <<_ACEOF
7510#define SHLIB_EXT "$SO"
7511_ACEOF
7512
Guido van Rossum0a516c91994-09-12 10:58:40 +00007513# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007514# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515# (Shared libraries in this instance are shared modules to be loaded into
7516# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7518$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007519if test -z "$LDSHARED"
7520then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007521 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007522 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007523 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007524 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007525 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007526 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007527 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007528 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007529 if test "$GCC" = "yes" ; then
7530 LDSHARED='$(CC) -shared'
7531 LDCXXSHARED='$(CXX) -shared'
7532 else
7533 LDSHARED='$(CC) -G'
7534 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007535 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007536 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 if test "$GCC" = "yes" ; then
7538 LDSHARED='$(CC) -shared'
7539 LDCXXSHARED='$(CXX) -shared'
7540 else
7541 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007542 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007543 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007544 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007545 LDSHARED='$(CC) -bundle'
7546 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007547 if test "$enable_framework" ; then
7548 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007549 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7550 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007552 else
7553 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007554 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007555 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007556 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007557 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007558 LDSHARED='$(CC) -bundle'
7559 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007560 if test "$enable_framework" ; then
7561 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007562 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7563 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007565 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007566 # No framework, use the Python app as bundle-loader
7567 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007568 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007569 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007570 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007571 Darwin/*)
7572 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7573 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007574
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007575 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007576 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007577 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007578 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007579 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007580 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7581 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007582 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007584 LDSHARED='$(CC) -bundle'
7585 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007586 if test "$enable_framework" ; then
7587 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007588 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7589 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007590 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007591 else
7592 # No framework, use the Python app as bundle-loader
7593 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7594 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007595 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007596 fi
7597 fi
7598 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007599 Linux*|GNU*|QNX*)
7600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared';;
7602 BSD/OS*/4*)
7603 LDSHARED="gcc -shared"
7604 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007606 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007607 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared'
7609 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007610 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007611 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007612 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007613 OpenBSD*)
7614 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7615 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007616 LDSHARED='$(CC) -shared $(CCSHARED)'
7617 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007618 else
7619 case `uname -r` in
7620 [01].* | 2.[0-7] | 2.[0-7].*)
7621 LDSHARED="ld -Bshareable ${LDFLAGS}"
7622 ;;
7623 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007624 LDSHARED='$(CC) -shared $(CCSHARED)'
7625 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007626 ;;
7627 esac
7628 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007629 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007630 LDSHARED='$(CC) -shared'
7631 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007632 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007633 if test "$GCC" = "yes" ; then
7634 LDSHARED='$(CC) -shared'
7635 LDCXXSHARED='$(CXX) -shared'
7636 else
7637 LDSHARED='$(CC) -G'
7638 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007639 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007640 SCO_SV*)
7641 LDSHARED='$(CC) -Wl,-G,-Bexport'
7642 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7643 CYGWIN*)
7644 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7645 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646 *) LDSHARED="ld";;
7647 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7650$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007651LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007652BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007654# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7656$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657if test -z "$CCSHARED"
7658then
Guido van Rossum07397971997-04-29 21:49:50 +00007659 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007660 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007661 then CCSHARED="-fPIC";
7662 elif test `uname -p` = sparc;
7663 then CCSHARED="-xcode=pic32";
7664 else CCSHARED="-Kpic";
7665 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007666 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007667 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007668 else CCSHARED="+z";
7669 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007670 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007671 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007672 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007673 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007674 if test "$GCC" = "yes"
7675 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007676 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007677 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007678 SCO_SV*)
7679 if test "$GCC" = "yes"
7680 then CCSHARED="-fPIC"
7681 else CCSHARED="-Kpic -belf"
7682 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007683 IRIX*/6*) case $CC in
7684 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007685 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007686 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7690$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007691# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007692# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7694$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007695if test -z "$LINKFORSHARED"
7696then
Guido van Rossum07397971997-04-29 21:49:50 +00007697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007698 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007699 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007700 LINKFORSHARED="-Wl,-E -Wl,+s";;
7701# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007702 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007703 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007704 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007706 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007707 if test "$enable_framework"
7708 then
Jack Jansenda49e192005-01-07 13:08:22 +00007709 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007710 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007711 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007712 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007713 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007714 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007715 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007716 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7717 then
7718 LINKFORSHARED="-Wl,--export-dynamic"
7719 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007720 SunOS/5*) case $CC in
7721 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007722 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007723 then
7724 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007725 fi;;
7726 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007727 CYGWIN*)
7728 if test $enable_shared = "no"
7729 then
7730 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7731 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007732 QNX*)
7733 # -Wl,-E causes the symbols to be added to the dynamic
7734 # symbol table so that they can be found when a module
7735 # is loaded. -N 2048K causes the stack size to be set
7736 # to 2048 kilobytes so that the stack doesn't overflow
7737 # when running test_compile.py.
7738 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007739 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7742$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007743
Michael W. Hudson54241132001-12-07 15:38:26 +00007744
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007745
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7747$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007748if test ! "$LIBRARY" = "$LDLIBRARY"
7749then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007750 case $ac_sys_system in
7751 CYGWIN*)
7752 # Cygwin needs CCSHARED when building extension DLLs
7753 # but not when building the interpreter DLL.
7754 CFLAGSFORSHARED='';;
7755 *)
7756 CFLAGSFORSHARED='$(CCSHARED)'
7757 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7760$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007761
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7763# library (with --enable-shared).
7764# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007765# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7766# if it is not required, since it creates a dependency of the shared library
7767# to LIBS. This, in turn, means that applications linking the shared libpython
7768# don't need to link LIBS explicitly. The default should be only changed
7769# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7772$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007773case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007774 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007775 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007776esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7778$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007779
7780
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7783$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007784if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007786else
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007788LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792/* Override any GCC internal prototype to avoid an error.
7793 Use char because int might match the return type of a GCC
7794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795#ifdef __cplusplus
7796extern "C"
7797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007798char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ;
7804 return 0;
7805}
7806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812rm -f core conftest.err conftest.$ac_objext \
7813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7817$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007818if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 cat >>confdefs.h <<_ACEOF
7820#define HAVE_LIBDL 1
7821_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007823 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007824
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825fi
7826 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7828$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007829if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007831else
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007833LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837/* Override any GCC internal prototype to avoid an error.
7838 Use char because int might match the return type of a GCC
7839 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007840#ifdef __cplusplus
7841extern "C"
7842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007843char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007844int
7845main ()
7846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ;
7849 return 0;
7850}
7851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857rm -f core conftest.err conftest.$ac_objext \
7858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007859LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7862$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007863if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 cat >>confdefs.h <<_ACEOF
7865#define HAVE_LIBDLD 1
7866_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007867
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007868 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007869
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007870fi
7871 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007872
Georg Brandlb1441c72009-01-03 22:33:39 +00007873# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007874if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7876$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007877if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007879else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007880 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884/* Override any GCC internal prototype to avoid an error.
7885 Use char because int might match the return type of a GCC
7886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007887#ifdef __cplusplus
7888extern "C"
7889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007890char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ;
7896 return 0;
7897}
7898_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899for ac_lib in '' pthread rt posix4; do
7900 if test -z "$ac_lib"; then
7901 ac_res="none required"
7902 else
7903 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909rm -f core conftest.err conftest.$ac_objext \
7910 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007911 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007915if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917else
7918 ac_cv_search_sem_init=no
7919fi
7920rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007921LIBS=$ac_func_search_save_LIBS
7922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7924$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007926if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007928
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007929fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007930 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007931 # posix4 on Solaris 2.6
7932 # pthread (first!) on Linux
7933fi
7934
Martin v. Löwis19d17342003-06-14 21:03:05 +00007935# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7937$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007938if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007940else
7941 ac_check_lib_save_LIBS=$LIBS
7942LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007944/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946/* Override any GCC internal prototype to avoid an error.
7947 Use char because int might match the return type of a GCC
7948 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007949#ifdef __cplusplus
7950extern "C"
7951#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007952char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007953int
7954main ()
7955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007957 ;
7958 return 0;
7959}
7960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007962 ac_cv_lib_intl_textdomain=yes
7963else
Matthias Kloseb9621712010-04-24 17:59:49 +00007964 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966rm -f core conftest.err conftest.$ac_objext \
7967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007968LIBS=$ac_check_lib_save_LIBS
7969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7971$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007972if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007975
Brett Cannonc6d936e2009-06-07 20:09:53 +00007976 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977fi
7978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979
7980# checks for system dependent C++ extensions support
7981case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7983$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007986
Georg Brandl59e87bd2011-02-15 19:48:59 +00007987 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007991loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ;
7993 return 0;
7994}
Matthias Kloseb159a552010-04-25 21:00:44 +00007995
Martin v. Löwis11437992002-04-12 09:54:03 +00007996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007998
Matthias Kloseb159a552010-04-25 21:00:44 +00007999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008001
Matthias Kloseb159a552010-04-25 21:00:44 +00008002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008003$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008004
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008005else
Matthias Kloseb159a552010-04-25 21:00:44 +00008006
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008008$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008009
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008013 *) ;;
8014esac
8015
Guido van Rossum70c7f481998-03-26 18:44:10 +00008016# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8018$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008019if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008021else
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008023LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027/* Override any GCC internal prototype to avoid an error.
8028 Use char because int might match the return type of a GCC
8029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030#ifdef __cplusplus
8031extern "C"
8032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008033char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008034int
8035main ()
8036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ;
8039 return 0;
8040}
8041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008044else
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008047rm -f core conftest.err conftest.$ac_objext \
8048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008049LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8052$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008053if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008054 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008055fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008056 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8058$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008059if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061else
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008063LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067/* Override any GCC internal prototype to avoid an error.
8068 Use char because int might match the return type of a GCC
8069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008070#ifdef __cplusplus
8071extern "C"
8072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008073char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008074int
8075main ()
8076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ;
8079 return 0;
8080}
8081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087rm -f core conftest.err conftest.$ac_objext \
8088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008089LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8092$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008093if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008094 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008095fi
8096 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8099$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008102if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8105$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008106LIBS="$withval $LIBS"
8107
8108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111fi
8112
Guido van Rossum7f43da71994-08-01 12:15:30 +00008113
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008114if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8116set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008119if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008121else
8122 case $PKG_CONFIG in
8123 [\\/]* | ?:[\\/]*)
8124 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8125 ;;
8126 *)
8127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130 IFS=$as_save_IFS
8131 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8134 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008136 break 2
8137 fi
8138done
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008140IFS=$as_save_IFS
8141
8142 ;;
8143esac
8144fi
8145PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8146if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8148$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149else
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152fi
8153
8154
8155fi
8156if test -z "$ac_cv_path_PKG_CONFIG"; then
8157 ac_pt_PKG_CONFIG=$PKG_CONFIG
8158 # Extract the first word of "pkg-config", so it can be a program name with args.
8159set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008162if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164else
8165 case $ac_pt_PKG_CONFIG in
8166 [\\/]* | ?:[\\/]*)
8167 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8168 ;;
8169 *)
8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8171for as_dir in $PATH
8172do
8173 IFS=$as_save_IFS
8174 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8177 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008179 break 2
8180 fi
8181done
Matthias Kloseb9621712010-04-24 17:59:49 +00008182 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008183IFS=$as_save_IFS
8184
8185 ;;
8186esac
8187fi
8188ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8189if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8191$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195fi
8196
8197 if test "x$ac_pt_PKG_CONFIG" = x; then
8198 PKG_CONFIG=""
8199 else
8200 case $cross_compiling:$ac_tool_warned in
8201yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008204ac_tool_warned=yes ;;
8205esac
8206 PKG_CONFIG=$ac_pt_PKG_CONFIG
8207 fi
8208else
8209 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8210fi
8211
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008212
8213# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8215$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008216
8217# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008219 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008220else
8221 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008222fi
8223
8224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8226$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008227
8228# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8230$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008231
8232# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008233if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008234 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008235else
8236 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008237fi
8238
8239
8240if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8242else
8243 LIBFFI_INCLUDEDIR=""
8244fi
8245
8246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8248$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008249
Benjamin Peterson076ed002010-10-31 17:11:02 +00008250# Check for support for loadable sqlite extensions
8251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8252$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8253# Check whether --enable-loadable-sqlite-extensions was given.
8254if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8255 enableval=$enable_loadable_sqlite_extensions;
8256else
8257 enable_loadable_sqlite_extensions="no"
8258fi
8259
8260
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8262$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8263
Matthias Klose55708cc2009-04-30 08:06:49 +00008264# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8266$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008267
8268# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008269if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008270 withval=$with_dbmliborder;
8271if test x$with_dbmliborder = xyes
8272then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008273as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008274else
8275 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8276 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8277 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008278 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008279 fi
8280 done
8281fi
8282fi
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8285$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008286
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008287# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8291$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 withval=$with_signal_module;
8296fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008297
8298
8299if test -z "$with_signal_module"
8300then with_signal_module="yes"
8301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8303$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008304
8305if test "${with_signal_module}" = "yes"; then
8306 USE_SIGNAL_MODULE=""
8307 SIGNAL_OBJS=""
8308else
8309 USE_SIGNAL_MODULE="#"
8310 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8311fi
8312
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008313# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008314
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008315USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8318$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008319
Guido van Rossumec2f0731997-01-22 20:54:01 +00008320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008321# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8325$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008326LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008327if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008328 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008329fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8332$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008333fi
8334
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
8336# Templates for things AC_DEFINEd more than once.
8337# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008338
8339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340
8341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8343$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008346if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347 withval=$with_threads;
8348fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008349
8350
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008351# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008354if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355 withval=$with_thread; with_threads=$with_thread
8356fi
8357
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008358
8359if test -z "$with_threads"
8360then with_threads="yes"
8361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8363$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008364
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008365
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008366if test "$with_threads" = "no"
8367then
8368 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008369elif test "$ac_cv_pthread_is_default" = yes
8370then
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008372
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008373 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008375
8376 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008378elif test "$ac_cv_kpthread" = "yes"
8379then
8380 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008381 if test "$ac_cv_cxx_thread" = "yes"; then
8382 CXX="$CXX -Kpthread"
8383 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008386 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008387 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008388elif test "$ac_cv_kthread" = "yes"
8389then
8390 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008391 if test "$ac_cv_cxx_thread" = "yes"; then
8392 CXX="$CXX -Kthread"
8393 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008395
8396 posix_threads=yes
8397 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008398elif test "$ac_cv_pthread" = "yes"
8399then
8400 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008401 if test "$ac_cv_cxx_thread" = "yes"; then
8402 CXX="$CXX -pthread"
8403 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008405
8406 posix_threads=yes
8407 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008408else
8409 if test ! -z "$with_threads" -a -d "$with_threads"
8410 then LDFLAGS="$LDFLAGS -L$with_threads"
8411 fi
8412 if test ! -z "$withval" -a -d "$withval"
8413 then LDFLAGS="$LDFLAGS -L$withval"
8414 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008415
8416 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008417 # define _POSIX_THREADS in unistd.h. Some apparently don't
8418 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8420$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008423
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008424#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008425#ifdef _POSIX_THREADS
8426yes
8427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008432 unistd_defines_pthreads=yes
8433else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008434 unistd_defines_pthreads=no
8435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008436rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8439$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 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 +00008444if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008451
8452 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008453 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008454else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 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 +00008457if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008464
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008465 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008466else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008467
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008468 # Just looking for pthread_create in libpthread is not enough:
8469 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8470 # So we really have to include pthread.h, and then link.
8471 _libs=$LIBS
8472 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8474$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008477#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008478
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008479void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
8482{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008483
8484pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ;
8486 return 0;
8487}
8488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8492$as_echo "yes" >&6; }
8493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008494
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008495 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008496 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008499 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008501if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008503
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008504 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008505 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008506else
Guido van Rossumad678af1998-10-02 14:42:15 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8509$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008510if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008512else
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008514LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518/* Override any GCC internal prototype to avoid an error.
8519 Use char because int might match the return type of a GCC
8520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008521#ifdef __cplusplus
8522extern "C"
8523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008524char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008525int
8526main ()
8527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ;
8530 return 0;
8531}
8532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538rm -f core conftest.err conftest.$ac_objext \
8539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008540LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8543$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008544if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008546
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008547 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008548 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008549 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008550else
Greg Steinadf63d62000-07-05 10:38:09 +00008551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8553$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008554if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008558LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562/* Override any GCC internal prototype to avoid an error.
8563 Use char because int might match the return type of a GCC
8564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008565#ifdef __cplusplus
8566extern "C"
8567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008568char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008569int
8570main ()
8571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ;
8574 return 0;
8575}
8576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582rm -f core conftest.err conftest.$ac_objext \
8583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008584LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8587$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008588if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008591 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008592 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008593 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008594else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008595
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8597$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008598if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008600else
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008602LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606/* Override any GCC internal prototype to avoid an error.
8607 Use char because int might match the return type of a GCC
8608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008609#ifdef __cplusplus
8610extern "C"
8611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008612char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008613int
8614main ()
8615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ;
8618 return 0;
8619}
8620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008621if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626rm -f core conftest.err conftest.$ac_objext \
8627 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008628LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8631$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008632if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008634
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008635 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008636 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008637 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008638else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008639
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8641$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008642if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008644else
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008646LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650/* Override any GCC internal prototype to avoid an error.
8651 Use char because int might match the return type of a GCC
8652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653#ifdef __cplusplus
8654extern "C"
8655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008656char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ;
8662 return 0;
8663}
8664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670rm -f core conftest.err conftest.$ac_objext \
8671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008672LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8675$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008676if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008679 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008680 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008681 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008682else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008683
Martin v. Löwis130fb172001-07-19 11:00:41 +00008684 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008685fi
8686
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008688fi
8689
Guido van Rossum0be3e491997-05-22 20:33:33 +00008690fi
8691
Guido van Rossum49545951997-12-02 19:28:29 +00008692fi
8693
Guido van Rossumb93a8621998-05-07 13:27:32 +00008694fi
8695
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699fi
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701
8702fi
8703
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008704
Michael W. Hudson54241132001-12-07 15:38:26 +00008705
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8707$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008708if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008710else
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008712LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716/* Override any GCC internal prototype to avoid an error.
8717 Use char because int might match the return type of a GCC
8718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719#ifdef __cplusplus
8720extern "C"
8721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008722char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723int
8724main ()
8725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 ;
8728 return 0;
8729}
8730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733else
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736rm -f core conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8741$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008742if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008744
Martin v. Löwis130fb172001-07-19 11:00:41 +00008745 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008746 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008747 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748fi
8749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008750
Neal Norwitza978ab02002-11-02 16:58:05 +00008751 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8753$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008754if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008756else
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008758LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762/* Override any GCC internal prototype to avoid an error.
8763 Use char because int might match the return type of a GCC
8764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765#ifdef __cplusplus
8766extern "C"
8767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008768char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008769int
8770main ()
8771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ;
8774 return 0;
8775}
8776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782rm -f core conftest.err conftest.$ac_objext \
8783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8787$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008788if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008791 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008792 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008793 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008794fi
8795
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008796 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008797
Martin v. Löwis130fb172001-07-19 11:00:41 +00008798 if test "$USE_THREAD_MODULE" != "#"
8799 then
8800 # If the above checks didn't disable threads, (at least) OSF1
8801 # needs this '-threads' argument during linking.
8802 case $ac_sys_system in
8803 OSF1) LDLAST=-threads;;
8804 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008805 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008807
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808if test "$posix_threads" = "yes"; then
8809 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008810
Matthias Kloseb9621712010-04-24 17:59:49 +00008811$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812
8813 fi
8814
8815 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8816 case $ac_sys_system/$ac_sys_release in
8817 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008818$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820 ;;
8821 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008825 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008826$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008827
8828 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008829 AIX/6)
8830$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8831
8832 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833 esac
8834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8836$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008837 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841 ac_cv_pthread_system_supported=no
8842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008845#include <pthread.h>
8846 void *foo(void *parm) {
8847 return NULL;
8848 }
8849 main() {
8850 pthread_attr_t attr;
8851 pthread_t id;
8852 if (pthread_attr_init(&attr)) exit(-1);
8853 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8854 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8855 exit(0);
8856 }
8857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008858if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859 ac_cv_pthread_system_supported=yes
8860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008865fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867
Guido van Rossum627b2d71993-12-24 10:39:16 +00008868fi
8869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8871$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008872 if test "$ac_cv_pthread_system_supported" = "yes"; then
8873
Matthias Kloseb9621712010-04-24 17:59:49 +00008874$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875
8876 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 for ac_func in pthread_sigmask
8878do :
8879 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008880if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008881 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008882#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008884 case $ac_sys_system in
8885 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008888
8889 ;;
8890 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008891fi
8892done
8893
8894fi
8895
8896
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8900$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008902if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008904 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907 ipv6=no
8908 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8910$as_echo "yes" >&6; }
8911 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912
8913 ipv6=yes
8914 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916else
Martin v. Löwis11437992002-04-12 09:54:03 +00008917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922 ipv6=no
8923
8924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927 /* AF_INET6 available check */
8928#include <sys/types.h>
8929#include <sys/socket.h>
8930main()
8931{
8932 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8933 exit(1);
8934 else
8935 exit(0);
8936}
8937
Martin v. Löwis11437992002-04-12 09:54:03 +00008938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008939if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8942$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008943 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945else
Matthias Kloseb159a552010-04-25 21:00:44 +00008946
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
8955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008957if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8959$as_echo_n "checking if RFC2553 API is available... " >&6; }
8960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008961/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008962
8963 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008964#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008969 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ;
8971 return 0;
8972}
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Martin v. Löwis11437992002-04-12 09:54:03 +00008974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008975if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008976
8977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008978$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008979 ipv6=yes
8980
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008981else
Matthias Kloseb159a552010-04-25 21:00:44 +00008982
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008984$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008985 ipv6=no
8986
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008989fi
8990
8991if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008993
8994fi
8995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996fi
8997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998
8999ipv6type=unknown
9000ipv6lib=none
9001ipv6trylibc=no
9002
9003if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9005$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009006 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9007 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008 case $i in
9009 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013#include <netinet/in.h>
9014#ifdef IPV6_INRIA_VERSION
9015yes
9016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009020 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009022rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023
9024 ;;
9025 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029#include <netinet/in.h>
9030#ifdef __KAME__
9031yes
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6type=$i;
9037 ipv6lib=inet6
9038 ipv6libdir=/usr/local/v6/lib
9039 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009041rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042
9043 ;;
9044 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048#include <features.h>
9049#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9050yes
9051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055 ipv6type=$i;
9056 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009058rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059
9060 ;;
9061 linux-inet6)
9062 if test -d /usr/inet6; then
9063 ipv6type=$i
9064 ipv6lib=inet6
9065 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009066 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067 fi
9068 ;;
9069 solaris)
9070 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009071 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072 ipv6type=$i
9073 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074 fi
9075 fi
9076 ;;
9077 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009079/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009080
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081#include <sys/param.h>
9082#ifdef _TOSHIBA_INET6
9083yes
9084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009085_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088 ipv6type=$i;
9089 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009090 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009092rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093
9094 ;;
9095 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099#include </usr/local/v6/include/sys/v6config.h>
9100#ifdef __V6D__
9101yes
9102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106 ipv6type=$i;
9107 ipv6lib=v6;
9108 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009109 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009111rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112
9113 ;;
9114 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118#include <sys/param.h>
9119#ifdef _ZETA_MINAMI_INET6
9120yes
9121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125 ipv6type=$i;
9126 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009127 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009129rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009130
9131 ;;
9132 esac
9133 if test "$ipv6type" != "unknown"; then
9134 break
9135 fi
9136 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9138$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
9140
9141if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9142 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9143 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9144 echo "using lib$ipv6lib"
9145 else
9146 if test $ipv6trylibc = "yes"; then
9147 echo "using libc"
9148 else
9149 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9150 echo "You need to fetch lib$ipv6lib.a from appropriate"
9151 echo 'ipv6 kit and compile beforehand.'
9152 exit 1
9153 fi
9154 fi
9155fi
9156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9158$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009160/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009161
9162 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009163int
9164main ()
9165{
9166FSIORefNum fRef = 0
9167 ;
9168 return 0;
9169}
Matthias Kloseb159a552010-04-25 21:00:44 +00009170
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009172if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009173
Matthias Kloseb159a552010-04-25 21:00:44 +00009174
Matthias Kloseb9621712010-04-24 17:59:49 +00009175$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9178$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009179
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009180else
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009184
9185fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9187
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009188# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9190$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194 withval=$with_doc_strings;
9195fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009196
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009197
9198if test -z "$with_doc_strings"
9199then with_doc_strings="yes"
9200fi
9201if test "$with_doc_strings" != "no"
9202then
9203
Matthias Kloseb9621712010-04-24 17:59:49 +00009204$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009205
9206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9208$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009209
Antoine Pitrou042b1282010-08-13 21:15:58 +00009210# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9212$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009217if test "$withval" != no
9218then
9219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9223$as_echo "yes" >&6; }
9224else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009226fi
9227else
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230fi
9231
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009232
9233# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9235$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009237# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009238if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239 withval=$with_pymalloc;
9240fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009241
Neil Schemenauera35c6882001-02-27 04:45:05 +00009242
Neil Schemenauer16c22972002-03-22 15:34:49 +00009243if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009244then
9245 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009246 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009247fi
9248if test "$with_pymalloc" != "no"
9249then
Martin v. Löwis11437992002-04-12 09:54:03 +00009250
Matthias Kloseb9621712010-04-24 17:59:49 +00009251$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009252
9253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9255$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009256
Benjamin Peterson05159c42009-12-03 03:01:27 +00009257# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9259$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009260
9261# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009262if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009263 withval=$with_valgrind;
9264else
9265 with_valgrind=no
9266fi
9267
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9269$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009270if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 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 +00009272if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009275
9276else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009277 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009278
9279fi
9280
9281
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009282 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009283fi
9284
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009285# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009286
Guido van Rossum98935bf2001-09-05 19:13:16 +00009287DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009288
Guido van Rossume97ee181999-12-20 21:27:22 +00009289# the dlopen() function means we might want to use dynload_shlib.o. some
9290# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009291for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009292do :
9293 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009294if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009296#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009297_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009298
Guido van Rossume97ee181999-12-20 21:27:22 +00009299fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009300done
Guido van Rossume97ee181999-12-20 21:27:22 +00009301
Michael W. Hudson54241132001-12-07 15:38:26 +00009302
Guido van Rossume97ee181999-12-20 21:27:22 +00009303# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9304# loading of modules.
9305
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9307$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009308if test -z "$DYNLOADFILE"
9309then
9310 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009311 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9312 if test "$ac_cv_func_dlopen" = yes
9313 then DYNLOADFILE="dynload_shlib.o"
9314 else DYNLOADFILE="dynload_aix.o"
9315 fi
9316 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009317 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009318 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9319 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009320 *)
9321 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9322 # out any dynamic loading
9323 if test "$ac_cv_func_dlopen" = yes
9324 then DYNLOADFILE="dynload_shlib.o"
9325 else DYNLOADFILE="dynload_stub.o"
9326 fi
9327 ;;
9328 esac
9329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9331$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009332if test "$DYNLOADFILE" != "dynload_stub.o"
9333then
Martin v. Löwis11437992002-04-12 09:54:03 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009336
9337fi
9338
Neil Schemenauer4e425612001-06-19 15:44:15 +00009339# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9340
Michael W. Hudson54241132001-12-07 15:38:26 +00009341
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9343$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009344if test -z "$MACHDEP_OBJS"
9345then
Jack Jansene578a632001-08-15 01:27:14 +00009346 MACHDEP_OBJS=$extra_machdep_objs
9347else
9348 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9351$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009352
Guido van Rossum627b2d71993-12-24 10:39:16 +00009353# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009354for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009355 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009356 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009357 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009358 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009359 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009360 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009361 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9362 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009363 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009364 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009365 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009366 truncate uname unsetenv utimes waitpid wait3 wait4 \
9367 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009368do :
9369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009371if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009374_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009376fi
9377done
9378
Michael W. Hudson54241132001-12-07 15:38:26 +00009379
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380# For some functions, having a definition is not sufficient, since
9381# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9383$as_echo_n "checking for chroot... " >&6; }
9384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387int
9388main ()
9389{
9390void *x=chroot
9391 ;
9392 return 0;
9393}
9394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398
Matthias Kloseb159a552010-04-25 21:00:44 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
9405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9408$as_echo_n "checking for link... " >&6; }
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412int
9413main ()
9414{
9415void *x=link
9416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009423
Matthias Kloseb159a552010-04-25 21:00:44 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429
9430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9433$as_echo_n "checking for symlink... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437int
9438main ()
9439{
9440void *x=symlink
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9458$as_echo_n "checking for fchdir... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461#include <unistd.h>
9462int
9463main ()
9464{
9465void *x=fchdir
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
9480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9483$as_echo_n "checking for fsync... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486#include <unistd.h>
9487int
9488main ()
9489{
9490void *x=fsync
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009504
9505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9508$as_echo_n "checking for fdatasync... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511#include <unistd.h>
9512int
9513main ()
9514{
9515void *x=fdatasync
9516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009523
Matthias Kloseb159a552010-04-25 21:00:44 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009529
9530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9533$as_echo_n "checking for epoll... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535/* end confdefs.h. */
9536#include <sys/epoll.h>
9537int
9538main ()
9539{
9540void *x=epoll_create
9541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009548
Matthias Kloseb159a552010-04-25 21:00:44 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009551else
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009554
9555fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9558$as_echo_n "checking for kqueue... " >&6; }
9559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009560/* end confdefs.h. */
9561
9562#include <sys/types.h>
9563#include <sys/event.h>
9564
9565int
9566main ()
9567{
9568int x=kqueue()
9569 ;
9570 return 0;
9571}
9572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009573if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009576
Matthias Kloseb159a552010-04-25 21:00:44 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009579else
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009582
9583fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009585# On some systems (eg. FreeBSD 5), we would find a definition of the
9586# functions ctermid_r, setgroups in the library, but no prototype
9587# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9588# address to avoid compiler warnings and potential miscompilations
9589# because of the missing prototypes.
9590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9592$as_echo_n "checking for ctermid_r... " >&6; }
9593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009595
Martin v. Löwisd5843682002-11-21 20:41:28 +00009596#include <stdio.h>
9597
Martin v. Löwisd5843682002-11-21 20:41:28 +00009598int
9599main ()
9600{
9601void* p = ctermid_r
9602 ;
9603 return 0;
9604}
9605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009609
Matthias Kloseb159a552010-04-25 21:00:44 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009611$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009612else
Matthias Kloseb9621712010-04-24 17:59:49 +00009613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009615
9616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9618
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9620$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009621if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009622 $as_echo_n "(cached) " >&6
9623else
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009627int
9628main ()
9629{
9630void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009631
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009637 ac_cv_flock_decl=yes
9638else
9639 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009640
9641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009643
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009644fi
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9646$as_echo "$ac_cv_flock_decl" >&6; }
9647if test "x${ac_cv_flock_decl}" = xyes; then
9648 for ac_func in flock
9649do :
9650 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009651if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009652 cat >>confdefs.h <<_ACEOF
9653#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009654_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009655
Antoine Pitroua3000072010-09-07 14:52:42 +00009656else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009658$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009659if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009660 $as_echo_n "(cached) " >&6
9661else
9662 ac_check_lib_save_LIBS=$LIBS
9663LIBS="-lbsd $LIBS"
9664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665/* end confdefs.h. */
9666
9667/* Override any GCC internal prototype to avoid an error.
9668 Use char because int might match the return type of a GCC
9669 builtin and then its argument prototype would still apply. */
9670#ifdef __cplusplus
9671extern "C"
9672#endif
9673char flock ();
9674int
9675main ()
9676{
9677return flock ();
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682if ac_fn_c_try_link "$LINENO"; then :
9683 ac_cv_lib_bsd_flock=yes
9684else
9685 ac_cv_lib_bsd_flock=no
9686fi
9687rm -f core conftest.err conftest.$ac_objext \
9688 conftest$ac_exeext conftest.$ac_ext
9689LIBS=$ac_check_lib_save_LIBS
9690fi
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9692$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009693if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009694 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009695
9696
9697$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9698
9699
9700fi
9701
9702
9703fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009704done
9705
Antoine Pitroua3000072010-09-07 14:52:42 +00009706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9709$as_echo_n "checking for getpagesize... " >&6; }
9710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009712
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009713#include <unistd.h>
9714
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009715int
9716main ()
9717{
9718void* p = getpagesize
9719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009726
Matthias Kloseb159a552010-04-25 21:00:44 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009732
9733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009735
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009736for ac_prog in true
9737do
9738 # Extract the first word of "$ac_prog", so it can be a program name with args.
9739set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9741$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009742if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744else
9745 if test -n "$TRUE"; then
9746 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9747else
9748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9749for as_dir in $PATH
9750do
9751 IFS=$as_save_IFS
9752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754 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 +00009755 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 $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 +00009757 break 2
9758 fi
9759done
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762
9763fi
9764fi
9765TRUE=$ac_cv_prog_TRUE
9766if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9768$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769else
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772fi
9773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775 test -n "$TRUE" && break
9776done
9777test -n "$TRUE" || TRUE="/bin/true"
9778
9779
Matthias Kloseb9621712010-04-24 17:59:49 +00009780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9781$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009782if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009784else
9785 ac_check_lib_save_LIBS=$LIBS
9786LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009788/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790/* Override any GCC internal prototype to avoid an error.
9791 Use char because int might match the return type of a GCC
9792 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793#ifdef __cplusplus
9794extern "C"
9795#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797int
9798main ()
9799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801 ;
9802 return 0;
9803}
9804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806 ac_cv_lib_c_inet_aton=yes
9807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009810rm -f core conftest.err conftest.$ac_objext \
9811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812LIBS=$ac_check_lib_save_LIBS
9813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9815$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009816if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9820$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009821if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009823else
9824 ac_check_lib_save_LIBS=$LIBS
9825LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829/* Override any GCC internal prototype to avoid an error.
9830 Use char because int might match the return type of a GCC
9831 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009832#ifdef __cplusplus
9833extern "C"
9834#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009836int
9837main ()
9838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009840 ;
9841 return 0;
9842}
9843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009845 ac_cv_lib_resolv_inet_aton=yes
9846else
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849rm -f core conftest.err conftest.$ac_objext \
9850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851LIBS=$ac_check_lib_save_LIBS
9852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9854$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009855if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856 cat >>confdefs.h <<_ACEOF
9857#define HAVE_LIBRESOLV 1
9858_ACEOF
9859
9860 LIBS="-lresolv $LIBS"
9861
9862fi
9863
9864
9865fi
9866
9867
Christian Heimesd0764e22007-12-04 15:00:33 +00009868# On Tru64, chflags seems to be present, but calling it will
9869# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9871$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009872if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009876 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009877else
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009879/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009880[
Christian Heimesd0764e22007-12-04 15:00:33 +00009881#include <sys/stat.h>
9882#include <unistd.h>
9883int main(int argc, char*argv[])
9884{
9885 if(chflags(argv[0], 0) != 0)
9886 return 1;
9887 return 0;
9888}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009889]
Christian Heimesd0764e22007-12-04 15:00:33 +00009890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009892 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009898fi
9899
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9903$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009904if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009906if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009907 ac_cv_have_chflags="yes"
9908else
9909 ac_cv_have_chflags="no"
9910fi
9911
9912fi
9913if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009914
Matthias Kloseb9621712010-04-24 17:59:49 +00009915$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009916
9917fi
9918
Matthias Kloseb9621712010-04-24 17:59:49 +00009919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9920$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009921if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009923else
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009925 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009928/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009929[
Christian Heimesd0764e22007-12-04 15:00:33 +00009930#include <sys/stat.h>
9931#include <unistd.h>
9932int main(int argc, char*argv[])
9933{
9934 if(lchflags(argv[0], 0) != 0)
9935 return 1;
9936 return 0;
9937}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009938]
Christian Heimesd0764e22007-12-04 15:00:33 +00009939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009941 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009942else
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009947fi
9948
9949
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9952$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009953if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009955if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009956 ac_cv_have_lchflags="yes"
9957else
9958 ac_cv_have_lchflags="no"
9959fi
9960
9961fi
9962if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009965
9966fi
9967
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009968case $ac_sys_system/$ac_sys_release in
9969Darwin/*)
9970 _CUR_CFLAGS="${CFLAGS}"
9971 _CUR_LDFLAGS="${LDFLAGS}"
9972 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9973 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9974 ;;
9975esac
9976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9978$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009979if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009981else
9982 ac_check_lib_save_LIBS=$LIBS
9983LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009985/* end confdefs.h. */
9986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987/* Override any GCC internal prototype to avoid an error.
9988 Use char because int might match the return type of a GCC
9989 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009990#ifdef __cplusplus
9991extern "C"
9992#endif
9993char inflateCopy ();
9994int
9995main ()
9996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009998 ;
9999 return 0;
10000}
10001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010003 ac_cv_lib_z_inflateCopy=yes
10004else
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007rm -f core conftest.err conftest.$ac_objext \
10008 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010009LIBS=$ac_check_lib_save_LIBS
10010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10012$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010013if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010016
10017fi
10018
10019
10020case $ac_sys_system/$ac_sys_release in
10021Darwin/*)
10022 CFLAGS="${_CUR_CFLAGS}"
10023 LDFLAGS="${_CUR_LDFLAGS}"
10024 ;;
10025esac
10026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10028$as_echo_n "checking for hstrerror... " >&6; }
10029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010031
Martin v. Löwise9416172003-05-03 10:12:45 +000010032#include <netdb.h>
10033
Martin v. Löwise9416172003-05-03 10:12:45 +000010034int
10035main ()
10036{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010038 ;
10039 return 0;
10040}
10041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010043
Matthias Kloseb9621712010-04-24 17:59:49 +000010044$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
Matthias Kloseb159a552010-04-25 21:00:44 +000010046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010048else
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010051
10052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053rm -f core conftest.err conftest.$ac_objext \
10054 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10057$as_echo_n "checking for inet_aton... " >&6; }
10058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010059/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
Martin v. Löwis86d66262006-02-17 08:40:11 +000010061#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010062#include <sys/socket.h>
10063#include <netinet/in.h>
10064#include <arpa/inet.h>
10065
Martin v. Löwise9416172003-05-03 10:12:45 +000010066int
10067main ()
10068{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010069void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010070 ;
10071 return 0;
10072}
10073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010075
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010077
Matthias Kloseb159a552010-04-25 21:00:44 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010080else
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10082$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010083
10084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010085rm -f core conftest.err conftest.$ac_objext \
10086 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10089$as_echo_n "checking for inet_pton... " >&6; }
10090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010091/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010092
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010093#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010094#include <sys/socket.h>
10095#include <netinet/in.h>
10096#include <arpa/inet.h>
10097
Martin v. Löwise9416172003-05-03 10:12:45 +000010098int
10099main ()
10100{
10101void* p = inet_pton
10102 ;
10103 return 0;
10104}
10105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010109
Matthias Kloseb159a552010-04-25 21:00:44 +000010110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010111$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010112else
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010115
10116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010118
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010119# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10121$as_echo_n "checking for setgroups... " >&6; }
10122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010124
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010125#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010126#ifdef HAVE_GRP_H
10127#include <grp.h>
10128#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010129
Martin v. Löwisd5843682002-11-21 20:41:28 +000010130int
10131main ()
10132{
10133void* p = setgroups
10134 ;
10135 return 0;
10136}
10137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010139
Matthias Kloseb9621712010-04-24 17:59:49 +000010140$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010141
Matthias Kloseb159a552010-04-25 21:00:44 +000010142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010143$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010144else
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10146$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010147
10148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010150
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010151# check for openpty and forkpty
10152
10153for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010154do :
10155 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010156if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010158#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010159_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10163$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010164if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175#ifdef __cplusplus
10176extern "C"
10177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010178char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010179int
10180main ()
10181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ;
10184 return 0;
10185}
10186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10197$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010198if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010200 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10203$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010204if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010206else
10207 ac_check_lib_save_LIBS=$LIBS
10208LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210/* end confdefs.h. */
10211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212/* Override any GCC internal prototype to avoid an error.
10213 Use char because int might match the return type of a GCC
10214 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010215#ifdef __cplusplus
10216extern "C"
10217#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218char openpty ();
10219int
10220main ()
10221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228 ac_cv_lib_bsd_openpty=yes
10229else
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232rm -f core conftest.err conftest.$ac_objext \
10233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010234LIBS=$ac_check_lib_save_LIBS
10235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10237$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010238if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010240 LIBS="$LIBS -lbsd"
10241fi
10242
10243
10244fi
10245
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246
10247fi
10248done
10249
10250for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010251do :
10252 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010253if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010255#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010256_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258else
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10260$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010261if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010263else
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010265LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269/* Override any GCC internal prototype to avoid an error.
10270 Use char because int might match the return type of a GCC
10271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010272#ifdef __cplusplus
10273extern "C"
10274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010275char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010276int
10277main ()
10278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 ;
10281 return 0;
10282}
10283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010286else
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010289rm -f core conftest.err conftest.$ac_objext \
10290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10294$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010295if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10300$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010301if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010303else
10304 ac_check_lib_save_LIBS=$LIBS
10305LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010307/* end confdefs.h. */
10308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309/* Override any GCC internal prototype to avoid an error.
10310 Use char because int might match the return type of a GCC
10311 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010312#ifdef __cplusplus
10313extern "C"
10314#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010315char forkpty ();
10316int
10317main ()
10318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010320 ;
10321 return 0;
10322}
10323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010325 ac_cv_lib_bsd_forkpty=yes
10326else
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329rm -f core conftest.err conftest.$ac_objext \
10330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010331LIBS=$ac_check_lib_save_LIBS
10332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10334$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010335if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010337 LIBS="$LIBS -lbsd"
10338fi
10339
10340
10341fi
10342
Fred Drake8cef4cf2000-06-28 16:40:38 +000010343
10344fi
10345done
10346
Jack Jansendd19cf82001-12-06 22:36:17 +000010347
Christian Heimesb186d002008-03-18 15:15:01 +000010348# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010349for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010350do :
10351 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010352if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010355_ACEOF
10356
10357fi
10358done
10359
10360
Michael W. Hudson54241132001-12-07 15:38:26 +000010361# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010362for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010363do :
10364 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10365ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010366if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010368#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010371fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010372done
10373
Michael W. Hudson54241132001-12-07 15:38:26 +000010374
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010375ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10376if test "x$ac_cv_func_dup2" = xyes; then :
10377 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010378
Martin v. Löwis1142de32002-03-29 16:28:31 +000010379else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010381 *" dup2.$ac_objext "* ) ;;
10382 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010384esac
10385
Martin v. Löwis1142de32002-03-29 16:28:31 +000010386fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010387
10388ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10389if test "x$ac_cv_func_getcwd" = xyes; then :
10390 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10391
10392else
10393 case " $LIBOBJS " in
10394 *" getcwd.$ac_objext "* ) ;;
10395 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10396 ;;
10397esac
10398
10399fi
10400
10401ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10402if test "x$ac_cv_func_strdup" = xyes; then :
10403 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10404
10405else
10406 case " $LIBOBJS " in
10407 *" strdup.$ac_objext "* ) ;;
10408 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10409 ;;
10410esac
10411
10412fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010413
10414
10415for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010416do :
10417 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010418if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010423/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010424#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010425int
10426main ()
10427{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010428getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 ;
10430 return 0;
10431}
10432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010436
Guido van Rossum627b2d71993-12-24 10:39:16 +000010437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010439
Guido van Rossum627b2d71993-12-24 10:39:16 +000010440fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010441done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010442
Jack Jansen150753c2003-03-29 22:07:47 +000010443for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010444do :
10445 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010446if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010447 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010452#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010453int
10454main ()
10455{
10456setpgrp(0,0);
10457 ;
10458 return 0;
10459}
10460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010461if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010464
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010467
10468fi
10469done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010470
Thomas Wouters3a584202000-08-05 23:28:51 +000010471for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010472do :
10473 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010474if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010475 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010480#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010481int
10482main ()
10483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010484gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_compile "$LINENO"; then :
10490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491else
Skip Montanaro6dead952003-09-25 14:50:04 +000010492
Matthias Kloseb9621712010-04-24 17:59:49 +000010493$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010494
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010499fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010500done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010501
Michael W. Hudson54241132001-12-07 15:38:26 +000010502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10504$as_echo_n "checking for major... " >&6; }
10505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010507
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010508#if defined(MAJOR_IN_MKDEV)
10509#include <sys/mkdev.h>
10510#elif defined(MAJOR_IN_SYSMACROS)
10511#include <sys/sysmacros.h>
10512#else
10513#include <sys/types.h>
10514#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010515
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010516int
10517main ()
10518{
10519
10520 makedev(major(0),minor(0));
10521
10522 ;
10523 return 0;
10524}
10525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010527
10528
Matthias Kloseb9621712010-04-24 17:59:49 +000010529$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10532$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010533
10534else
Skip Montanaro6dead952003-09-25 14:50:04 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10537$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010538
10539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540rm -f core conftest.err conftest.$ac_objext \
10541 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010542
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010543# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010544# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10546$as_echo_n "checking for getaddrinfo... " >&6; }
10547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010549
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010550#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010551#include <sys/socket.h>
10552#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010553#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010554
Martin v. Löwis11437992002-04-12 09:54:03 +000010555int
10556main ()
10557{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010558getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 ;
10560 return 0;
10561}
10562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010563if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010564 have_getaddrinfo=yes
10565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010568rm -f core conftest.err conftest.$ac_objext \
10569 conftest$ac_exeext conftest.$ac_ext
10570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10571$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572if test $have_getaddrinfo = yes
10573then
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10575$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010576 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010578else
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010584
10585#include <sys/types.h>
10586#include <netdb.h>
10587#include <string.h>
10588#include <sys/socket.h>
10589#include <netinet/in.h>
10590
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010591int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010592{
10593 int passive, gaierr, inet4 = 0, inet6 = 0;
10594 struct addrinfo hints, *ai, *aitop;
10595 char straddr[INET6_ADDRSTRLEN], strport[16];
10596
10597 for (passive = 0; passive <= 1; passive++) {
10598 memset(&hints, 0, sizeof(hints));
10599 hints.ai_family = AF_UNSPEC;
10600 hints.ai_flags = passive ? AI_PASSIVE : 0;
10601 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010602 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010603 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10604 (void)gai_strerror(gaierr);
10605 goto bad;
10606 }
10607 for (ai = aitop; ai; ai = ai->ai_next) {
10608 if (ai->ai_addr == NULL ||
10609 ai->ai_addrlen == 0 ||
10610 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10611 straddr, sizeof(straddr), strport, sizeof(strport),
10612 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10613 goto bad;
10614 }
10615 switch (ai->ai_family) {
10616 case AF_INET:
10617 if (strcmp(strport, "54321") != 0) {
10618 goto bad;
10619 }
10620 if (passive) {
10621 if (strcmp(straddr, "0.0.0.0") != 0) {
10622 goto bad;
10623 }
10624 } else {
10625 if (strcmp(straddr, "127.0.0.1") != 0) {
10626 goto bad;
10627 }
10628 }
10629 inet4++;
10630 break;
10631 case AF_INET6:
10632 if (strcmp(strport, "54321") != 0) {
10633 goto bad;
10634 }
10635 if (passive) {
10636 if (strcmp(straddr, "::") != 0) {
10637 goto bad;
10638 }
10639 } else {
10640 if (strcmp(straddr, "::1") != 0) {
10641 goto bad;
10642 }
10643 }
10644 inet6++;
10645 break;
10646 case AF_UNSPEC:
10647 goto bad;
10648 break;
10649 default:
10650 /* another family support? */
10651 break;
10652 }
10653 }
10654 }
10655
10656 if (!(inet4 == 0 || inet4 == 2))
10657 goto bad;
10658 if (!(inet6 == 0 || inet6 == 2))
10659 goto bad;
10660
10661 if (aitop)
10662 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010663 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010664
10665 bad:
10666 if (aitop)
10667 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010668 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010669}
10670
Martin v. Löwis11437992002-04-12 09:54:03 +000010671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010672if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010673 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010674else
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010681fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010682
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10686$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10687
Mark Dickinson2df5d282009-12-31 21:22:50 +000010688if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010689then
10690 if test $ipv6 = yes
10691 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010692 echo 'Fatal: You must get working getaddrinfo() function.'
10693 echo ' or you can specify "--disable-ipv6"'.
10694 exit 1
10695 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010696else
Martin v. Löwis11437992002-04-12 09:54:03 +000010697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010699
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010700fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010701
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010702for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010703do :
10704 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010705if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010708_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010710fi
10711done
10712
Michael W. Hudson54241132001-12-07 15:38:26 +000010713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10716$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 +000010717if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722#include <sys/types.h>
10723#include <sys/time.h>
10724#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726int
10727main ()
10728{
10729if ((struct tm *) 0)
10730return 0;
10731 ;
10732 return 0;
10733}
10734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010736 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10743$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010744if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747
10748fi
10749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10751$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 +000010752if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757#include <sys/types.h>
10758#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Martin v. Löwis11437992002-04-12 09:54:03 +000010760int
10761main ()
10762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763struct tm tm;
10764 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 ;
10767 return 0;
10768}
10769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010771 ac_cv_struct_tm=time.h
10772else
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10778$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010779if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782
10783fi
10784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785ac_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 +000010786#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010789if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010790
10791cat >>confdefs.h <<_ACEOF
10792#define HAVE_STRUCT_TM_TM_ZONE 1
10793_ACEOF
10794
10795
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010797
Martin v. Löwis11437992002-04-12 09:54:03 +000010798if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801
10802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10804"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010805if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809fi
10810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813_ACEOF
10814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10816$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010817if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819else
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010822#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823#if !HAVE_DECL_TZNAME
10824extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010835if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836 ac_cv_var_tzname=yes
10837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010840rm -f core conftest.err conftest.$ac_objext \
10841 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10844$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010845 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010846
Matthias Kloseb9621712010-04-24 17:59:49 +000010847$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010849 fi
10850fi
10851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852ac_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 +000010853if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010854
10855cat >>confdefs.h <<_ACEOF
10856#define HAVE_STRUCT_STAT_ST_RDEV 1
10857_ACEOF
10858
10859
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862ac_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 +000010863if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865cat >>confdefs.h <<_ACEOF
10866#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10867_ACEOF
10868
10869
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010870fi
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010873if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010874
10875cat >>confdefs.h <<_ACEOF
10876#define HAVE_STRUCT_STAT_ST_FLAGS 1
10877_ACEOF
10878
10879
10880fi
10881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882ac_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 +000010883if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010884
10885cat >>confdefs.h <<_ACEOF
10886#define HAVE_STRUCT_STAT_ST_GEN 1
10887_ACEOF
10888
10889
10890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892ac_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 +000010893if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010894
10895cat >>confdefs.h <<_ACEOF
10896#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10897_ACEOF
10898
10899
10900fi
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902ac_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 +000010903if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905cat >>confdefs.h <<_ACEOF
10906#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10907_ACEOF
10908
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010911
10912else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010913 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010914 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10916 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010917esac
10918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010919fi
10920
Michael W. Hudson54241132001-12-07 15:38:26 +000010921
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10924$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010925if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927else
Matthias Kloseb159a552010-04-25 21:00:44 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 cat 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#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010932int
10933main ()
10934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 ;
10937 return 0;
10938}
10939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010940if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941 ac_cv_header_time_altzone=yes
10942else
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947fi
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10950$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010951if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010954
10955fi
10956
Guido van Rossumda88dad1995-01-26 00:46:29 +000010957was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10959$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010962
10963#include <sys/types.h>
10964#include <sys/select.h>
10965#include <sys/time.h>
10966
Martin v. Löwis11437992002-04-12 09:54:03 +000010967int
10968main ()
10969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970;
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
10977
Matthias Kloseb9621712010-04-24 17:59:49 +000010978$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010980 was_it_defined=yes
10981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10985$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10988$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010989if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010993/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010994#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010995int
10996main ()
10997{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010998struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 ;
11000 return 0;
11001}
11002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011004 ac_cv_struct_addrinfo=yes
11005else
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11012$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011013if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011016
11017fi
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11020$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011021if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011023else
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011025/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026
11027# include <sys/types.h>
11028# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011029int
11030main ()
11031{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011032struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 ;
11034 return 0;
11035}
11036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011038 ac_cv_struct_sockaddr_storage=yes
11039else
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11043fi
11044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11046$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011047if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050
11051fi
11052
Guido van Rossum627b2d71993-12-24 10:39:16 +000011053# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11056$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011057if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
11066static int test_array [1 - 2 * !(((char) -1) < 0)];
11067test_array [0] = 0
11068
11069 ;
11070 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011071}
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011073if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011074 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011075else
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11081$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011082if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084
11085fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11088$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011089if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011091else
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011093/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
Martin v. Löwis11437992002-04-12 09:54:03 +000011095int
11096main ()
11097{
11098/* FIXME: Include the comments suggested by Paul. */
11099#ifndef __cplusplus
11100 /* Ultrix mips cc rejects this. */
11101 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011104 char const *const *pcpcc;
11105 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 /* NEC SVR4.0.2 mips cc rejects this. */
11107 struct point {int x, y;};
11108 static struct point const zero = {0,0};
11109 /* AIX XL C 1.02.0.0 rejects this.
11110 It does not let you subtract one const X* pointer from another in
11111 an arm of an if-expression whose if-part is not a constant
11112 expression */
11113 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116 ++pcpcc;
11117 ppc = (char**) pcpcc;
11118 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 { /* SCO 3.2v4 cc rejects this. */
11120 char *t;
11121 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 }
11126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11127 int x[] = {25, 17};
11128 const int *foo = &x[0];
11129 ++foo;
11130 }
11131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11132 typedef const int *iptr;
11133 iptr p = 0;
11134 ++p;
11135 }
11136 { /* AIX XL C 1.02.0.0 rejects this saying
11137 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11138 struct s { int j; const int *ap[3]; };
11139 struct s *b; b->j = 5;
11140 }
11141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11142 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ;
11149 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011150}
Martin v. Löwis11437992002-04-12 09:54:03 +000011151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011152if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011153 ac_cv_c_const=yes
11154else
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11160$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164
11165fi
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Guido van Rossumda88dad1995-01-26 00:46:29 +000011168works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11170$as_echo_n "checking for working volatile... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011173
Martin v. Löwis11437992002-04-12 09:54:03 +000011174int
11175main ()
11176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011177volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011183 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011184else
Skip Montanaro6dead952003-09-25 14:50:04 +000011185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011188
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11192$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193
Guido van Rossumda88dad1995-01-26 00:46:29 +000011194works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11196$as_echo_n "checking for working signed char... " >&6; }
11197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011198/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011199
Martin v. Löwis11437992002-04-12 09:54:03 +000011200int
11201main ()
11202{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011209 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011210else
Skip Montanaro6dead952003-09-25 14:50:04 +000011211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214
Guido van Rossum7f43da71994-08-01 12:15:30 +000011215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11218$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011219
Guido van Rossumda88dad1995-01-26 00:46:29 +000011220have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11222$as_echo_n "checking for prototypes... " >&6; }
11223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011225int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011229return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Matthias Kloseb159a552010-04-25 21:00:44 +000011238 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11242$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243
Guido van Rossumda88dad1995-01-26 00:46:29 +000011244works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11246$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011249
11250#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011251int foo(int x, ...) {
11252 va_list va;
11253 va_start(va, x);
11254 va_arg(va, int);
11255 va_arg(va, char *);
11256 va_arg(va, double);
11257 return 0;
11258}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011259
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Guido van Rossum90eea071996-08-30 20:58:57 +000011263return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
11270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011273 works=yes
11274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11278$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011279
Martin v. Löwisd6320502004-08-12 13:45:08 +000011280# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11282$as_echo_n "checking for socketpair... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011284/* end confdefs.h. */
11285
11286#include <sys/types.h>
11287#include <sys/socket.h>
11288
11289int
11290main ()
11291{
11292void *x=socketpair
11293 ;
11294 return 0;
11295}
11296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011300
Matthias Kloseb159a552010-04-25 21:00:44 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011303else
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011306
11307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011309
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011310# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11312$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011315#include <sys/types.h>
11316#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011317int
11318main ()
11319{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011320struct sockaddr x;
11321x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326if ac_fn_c_try_compile "$LINENO"; then :
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11328$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011331
11332else
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011335
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011338
Guido van Rossumda88dad1995-01-26 00:46:29 +000011339va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11341$as_echo_n "checking whether va_list is an array... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011344
11345#ifdef HAVE_STDARG_PROTOTYPES
11346#include <stdarg.h>
11347#else
11348#include <varargs.h>
11349#endif
11350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351int
11352main ()
11353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011354va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
11360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011361else
Skip Montanaro6dead952003-09-25 14:50:04 +000011362
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Guido van Rossumda88dad1995-01-26 00:46:29 +000011366 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11371$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011373# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
11375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011377if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11382$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383 OLD_CFLAGS=$CFLAGS
11384 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011387
11388# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390int
11391main ()
11392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393
11394 char *name;
11395 struct hostent *he, *res;
11396 char buffer[2048];
11397 int buflen = 2048;
11398 int h_errnop;
11399
11400 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
11402 ;
11403 return 0;
11404}
11405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011409
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11414$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011416else
Skip Montanaro6dead952003-09-25 14:50:04 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11421$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011423/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011430
11431 char *name;
11432 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011433 char buffer[2048];
11434 int buflen = 2048;
11435 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011436
Matthias Kloseb159a552010-04-25 21:00:44 +000011437 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011438
11439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011446
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Matthias Kloseb159a552010-04-25 21:00:44 +000011448$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11451$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011453else
Skip Montanaro6dead952003-09-25 14:50:04 +000011454
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11458$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460/* end confdefs.h. */
11461
11462# include <netdb.h>
11463
11464int
11465main ()
11466{
11467
11468 char *name;
11469 struct hostent *he;
11470 struct hostent_data data;
11471
11472 (void) gethostbyname_r(name, he, &data);
11473
11474 ;
11475 return 0;
11476}
11477_ACEOF
11478if ac_fn_c_try_compile "$LINENO"; then :
11479
11480 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11481
11482
11483$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11484
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11486$as_echo "yes" >&6; }
11487
11488else
11489
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11491$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011501 CFLAGS=$OLD_CFLAGS
11502
11503else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 for ac_func in gethostbyname
11506do :
11507 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011508if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011510#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011511_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011513fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011514done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011515
Michael W. Hudson54241132001-12-07 15:38:26 +000011516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011517fi
11518
Michael W. Hudson54241132001-12-07 15:38:26 +000011519
11520
11521
11522
11523
11524
Guido van Rossum627b2d71993-12-24 10:39:16 +000011525# checks for system services
11526# (none yet)
11527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011529ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011530if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011531
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011532else
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11534$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011535if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011537else
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011539LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543/* Override any GCC internal prototype to avoid an error.
11544 Use char because int might match the return type of a GCC
11545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011546#ifdef __cplusplus
11547extern "C"
11548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011549char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011550int
11551main ()
11552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ;
11555 return 0;
11556}
11557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011563rm -f core conftest.err conftest.$ac_objext \
11564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11568$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011569if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 cat >>confdefs.h <<_ACEOF
11571#define HAVE_LIBIEEE 1
11572_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011574 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011575
Guido van Rossum627b2d71993-12-24 10:39:16 +000011576fi
11577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011579fi
11580
Michael W. Hudson54241132001-12-07 15:38:26 +000011581
Guido van Rossum7f253911997-05-09 02:42:48 +000011582# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11584$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011589if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011590then
11591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11595$as_echo "yes" >&6; }
11596else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011598fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602fi
11603
Guido van Rossum7f253911997-05-09 02:42:48 +000011604
Guido van Rossum7f43da71994-08-01 12:15:30 +000011605# check for --with-libm=...
11606
Guido van Rossum563e7081996-09-10 18:20:48 +000011607case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011608Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011609*) LIBM=-lm
11610esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11612$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011617if test "$withval" = no
11618then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11620$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011621elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011622then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11624$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011625else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011626fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11629$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630fi
11631
Guido van Rossum7f43da71994-08-01 12:15:30 +000011632
11633# check for --with-libc=...
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11636$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011641if test "$withval" = no
11642then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11644$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011645elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011646then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11648$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011649else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011650fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11653$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654fi
11655
Guido van Rossum7f43da71994-08-01 12:15:30 +000011656
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657# **************************************************
11658# * Check for various properties of floating point *
11659# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11662$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011663if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665else
11666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668 ac_cv_little_endian_double=no
11669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671/* end confdefs.h. */
11672
11673#include <string.h>
11674int main() {
11675 double x = 9006104071832581.0;
11676 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11677 return 0;
11678 else
11679 return 1;
11680}
11681
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684 ac_cv_little_endian_double=yes
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690fi
11691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692fi
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11695$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696if test "$ac_cv_little_endian_double" = yes
11697then
11698
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700
11701fi
11702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11704$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011705if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707else
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710 ac_cv_big_endian_double=no
11711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713/* end confdefs.h. */
11714
11715#include <string.h>
11716int main() {
11717 double x = 9006104071832581.0;
11718 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11719 return 0;
11720 else
11721 return 1;
11722}
11723
11724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726 ac_cv_big_endian_double=yes
11727else
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732fi
11733
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734fi
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11737$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738if test "$ac_cv_big_endian_double" = yes
11739then
11740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742
11743fi
11744
11745# Some ARM platforms use a mixed-endian representation for doubles.
11746# While Python doesn't currently have full support for these platforms
11747# (see e.g., issue 1762561), we can at least make sure that float <-> string
11748# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11750$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011751if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753else
11754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756 ac_cv_mixed_endian_double=no
11757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759/* end confdefs.h. */
11760
11761#include <string.h>
11762int main() {
11763 double x = 9006104071832581.0;
11764 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11765 return 0;
11766 else
11767 return 1;
11768}
11769
11770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772 ac_cv_mixed_endian_double=yes
11773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778fi
11779
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780fi
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11783$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784if test "$ac_cv_mixed_endian_double" = yes
11785then
11786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788
11789fi
11790
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011791# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011792# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011793# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011794# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011795# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011796# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011797
11798# This inline assembler syntax may also work for suncc and icc,
11799# so we try it on all platforms.
11800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11802$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804/* end confdefs.h. */
11805
11806int
11807main ()
11808{
11809
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011810 unsigned short cw;
11811 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11812 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813
11814 ;
11815 return 0;
11816}
11817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011818if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011819 have_gcc_asm_for_x87=yes
11820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11825$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011826if test "$have_gcc_asm_for_x87" = yes
11827then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011832
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011833# Detect whether system arithmetic is subject to x87-style double
11834# rounding issues. The result of this test has little meaning on non
11835# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11836# mode is round-to-nearest and double rounding issues are present, and
11837# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11839$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840# $BASECFLAGS may affect the result
11841ac_save_cc="$CC"
11842CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011844 ac_cv_x87_double_rounding=no
11845else
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011847/* end confdefs.h. */
11848
11849#include <stdlib.h>
11850#include <math.h>
11851int main() {
11852 volatile double x, y, z;
11853 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11854 x = 0.99999999999999989; /* 1-2**-53 */
11855 y = 1./x;
11856 if (y != 1.)
11857 exit(0);
11858 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11859 x = 1e16;
11860 y = 2.99999;
11861 z = x + y;
11862 if (z != 1e16+4.)
11863 exit(0);
11864 /* both tests show evidence of double rounding */
11865 exit(1);
11866}
11867
11868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011870 ac_cv_x87_double_rounding=no
11871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011876fi
11877
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011878CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11880$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011881if test "$ac_cv_x87_double_rounding" = yes
11882then
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011885
11886fi
11887
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011888# ************************************
11889# * Check for mathematical functions *
11890# ************************************
11891
11892LIBS_SAVE=$LIBS
11893LIBS="$LIBS $LIBM"
11894
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011895for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11896do :
11897 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11898ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011899if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011900 cat >>confdefs.h <<_ACEOF
11901#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11902_ACEOF
11903
11904fi
11905done
11906
11907for ac_func in hypot lgamma log1p round tgamma
11908do :
11909 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11910ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011911if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011912 cat >>confdefs.h <<_ACEOF
11913#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11914_ACEOF
11915
11916fi
11917done
11918
11919ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11920"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011921if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011922 ac_have_decl=1
11923else
11924 ac_have_decl=0
11925fi
11926
11927cat >>confdefs.h <<_ACEOF
11928#define HAVE_DECL_ISINF $ac_have_decl
11929_ACEOF
11930ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11931"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011932if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011933 ac_have_decl=1
11934else
11935 ac_have_decl=0
11936fi
11937
11938cat >>confdefs.h <<_ACEOF
11939#define HAVE_DECL_ISNAN $ac_have_decl
11940_ACEOF
11941ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11942"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011943if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011944 ac_have_decl=1
11945else
11946 ac_have_decl=0
11947fi
11948
11949cat >>confdefs.h <<_ACEOF
11950#define HAVE_DECL_ISFINITE $ac_have_decl
11951_ACEOF
11952
11953
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011954# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11955# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11957$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011958if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011960else
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011963 ac_cv_tanh_preserves_zero_sign=no
11964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011966/* end confdefs.h. */
11967
11968#include <math.h>
11969#include <stdlib.h>
11970int main() {
11971 /* return 0 if either negative zeros don't exist
11972 on this platform or if negative zeros exist
11973 and tanh(-0.) == -0. */
11974 if (atan2(0., -1.) == atan2(-0., -1.) ||
11975 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11976 else exit(1);
11977}
11978
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011981 ac_cv_tanh_preserves_zero_sign=yes
11982else
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011987fi
11988
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989fi
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11992$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011993if test "$ac_cv_tanh_preserves_zero_sign" = yes
11994then
11995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011997
11998fi
11999
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012000if test "$ac_cv_func_log1p" = yes
12001then
12002 # On some versions of AIX, log1p(-0.) returns 0. instead of
12003 # -0. See issue #9920.
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12005$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012006 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012007 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012008else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012009
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012010 if test "$cross_compiling" = yes; then :
12011 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012012else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012015
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012016 #include <math.h>
12017 #include <stdlib.h>
12018 int main() {
12019 /* Fail if the signs of log1p(-0.) and -0. can be
12020 distinguished. */
12021 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12022 return 0;
12023 else
12024 return 1;
12025 }
12026
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012027_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012028if ac_fn_c_try_run "$LINENO"; then :
12029 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012030else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012031 ac_cv_log1p_drops_zero_sign=yes
12032fi
12033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12034 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012035fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012036
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012037fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12040$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12041fi
12042if test "$ac_cv_log1p_drops_zero_sign" = yes
12043then
12044
12045$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12046
12047fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012048
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012049LIBS=$LIBS_SAVE
12050
Mark Dickinsona614f042009-11-28 12:48:43 +000012051# For multiprocessing module, check that sem_open
12052# actually works. For FreeBSD versions <= 7.2,
12053# the kernel module that provides POSIX semaphores
12054# isn't loaded by default, so an attempt to call
12055# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12057$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012058if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012062 ac_cv_posix_semaphores_enabled=yes
12063else
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012065/* end confdefs.h. */
12066
12067#include <unistd.h>
12068#include <fcntl.h>
12069#include <stdio.h>
12070#include <semaphore.h>
12071#include <sys/stat.h>
12072
12073int main(void) {
12074 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12075 if (a == SEM_FAILED) {
12076 perror("sem_open");
12077 return 1;
12078 }
12079 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012080 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012081 return 0;
12082}
12083
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012086 ac_cv_posix_semaphores_enabled=yes
12087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012092fi
12093
12094
Mark Dickinsona614f042009-11-28 12:48:43 +000012095fi
12096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12098$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012099if test $ac_cv_posix_semaphores_enabled = no
12100then
12101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012103
12104fi
12105
Mark Dickinson10683072009-04-18 21:18:19 +000012106# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12108$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012109if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012113 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012116/* end confdefs.h. */
12117
12118#include <unistd.h>
12119#include <fcntl.h>
12120#include <stdio.h>
12121#include <semaphore.h>
12122#include <sys/stat.h>
12123
12124int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012125 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012126 int count;
12127 int res;
12128 if(a==SEM_FAILED){
12129 perror("sem_open");
12130 return 1;
12131
12132 }
12133 res = sem_getvalue(a, &count);
12134 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012135 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012136 return res==-1 ? 1 : 0;
12137}
12138
Mark Dickinson10683072009-04-18 21:18:19 +000012139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012141 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012147fi
12148
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150fi
12151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12153$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012154if test $ac_cv_broken_sem_getvalue = yes
12155then
12156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012158
12159fi
12160
Mark Dickinsonbd792642009-03-18 20:06:12 +000012161# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12163$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012164# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012166 enableval=$enable_big_digits; case $enable_big_digits in
12167yes)
12168 enable_big_digits=30 ;;
12169no)
12170 enable_big_digits=15 ;;
1217115|30)
12172 ;;
12173*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012174 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 +000012175esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12177$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012178
12179cat >>confdefs.h <<_ACEOF
12180#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12181_ACEOF
12182
12183
12184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12186$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012187fi
12188
12189
Guido van Rossumef2255b2000-03-10 22:30:29 +000012190# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012191ac_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 +000012192if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193
12194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012196
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012197 wchar_h="yes"
12198
Guido van Rossumef2255b2000-03-10 22:30:29 +000012199else
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012201
12202fi
12203
Michael W. Hudson54241132001-12-07 15:38:26 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012206# determine wchar_t size
12207if test "$wchar_h" = yes
12208then
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12211# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12212# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12214$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012215if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012217else
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12219"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221else
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 if test "$ac_cv_type_wchar_t" = yes; then
12223 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012225as_fn_error 77 "cannot compute sizeof (wchar_t)
12226See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227 else
12228 ac_cv_sizeof_wchar_t=0
12229 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12234$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235
12236
12237
Martin v. Löwis11437992002-04-12 09:54:03 +000012238cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012239#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012240_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241
Michael W. Hudson54241132001-12-07 15:38:26 +000012242
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012243fi
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12246$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012247have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012250
12251#include <tcl.h>
12252#if TCL_UTF_MAX != 6
12253# error "NOT UCS4_TCL"
12254#endif
12255int
12256main ()
12257{
12258
12259 ;
12260 return 0;
12261}
12262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012264
12265
Matthias Kloseb9621712010-04-24 17:59:49 +000012266$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012267
12268 have_ucs4_tcl=yes
12269
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12273$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012274
Skip Montanaro6dead952003-09-25 14:50:04 +000012275# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012276if test "$wchar_h" = yes
12277then
12278 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12280$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012281 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012283else
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012286 ac_cv_wchar_t_signed=yes
12287else
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012290
12291 #include <wchar.h>
12292 int main()
12293 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012294 /* Success: exit code 0 */
12295 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012296 }
12297
12298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012300 ac_cv_wchar_t_signed=yes
12301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306fi
12307
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012308fi
12309
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12311$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312fi
12313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12315$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012316
12317# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012318if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012319 withval=$with_wide_unicode;
12320if test "$withval" != no
12321then unicode_size="4"
12322else unicode_size="2"
12323fi
12324
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012325else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326
Georg Brandl52d168a2008-01-07 18:10:24 +000012327case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012328 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012329 *) unicode_size="2" ;;
12330esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012331
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012332fi
12333
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012334
12335
Georg Brandl52d168a2008-01-07 18:10:24 +000012336case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012337 4)
12338 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12339
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012340 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012341 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012343 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012344esac
12345
Michael W. Hudson54241132001-12-07 15:38:26 +000012346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Georg Brandl52d168a2008-01-07 18:10:24 +000012348# wchar_t is only usable if it maps to an unsigned type
12349if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012350 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012351then
12352 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012357
Georg Brandl52d168a2008-01-07 18:10:24 +000012358elif test "$ac_cv_sizeof_short" = "$unicode_size"
12359then
12360 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012362
Georg Brandl52d168a2008-01-07 18:10:24 +000012363elif test "$ac_cv_sizeof_long" = "$unicode_size"
12364then
12365 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012367
Georg Brandl52d168a2008-01-07 18:10:24 +000012368else
12369 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12372$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012373
12374# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12376$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012377if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 ac_cv_c_bigendian=unknown
12381 # See if we're dealing with a universal compiler.
12382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12383/* end confdefs.h. */
12384#ifndef __APPLE_CC__
12385 not a universal capable compiler
12386 #endif
12387 typedef int dummy;
12388
Skip Montanaro6dead952003-09-25 14:50:04 +000012389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_compile "$LINENO"; then :
12391
12392 # Check for potential -arch flags. It is not universal unless
12393 # there are at least two -arch flags with different values.
12394 ac_arch=
12395 ac_prev=
12396 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12397 if test -n "$ac_prev"; then
12398 case $ac_word in
12399 i?86 | x86_64 | ppc | ppc64)
12400 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12401 ac_arch=$ac_word
12402 else
12403 ac_cv_c_bigendian=universal
12404 break
12405 fi
12406 ;;
12407 esac
12408 ac_prev=
12409 elif test "x$ac_word" = "x-arch"; then
12410 ac_prev=arch
12411 fi
12412 done
12413fi
12414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12415 if test $ac_cv_c_bigendian = unknown; then
12416 # See if sys/param.h defines the BYTE_ORDER macro.
12417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012419#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422int
12423main ()
12424{
Matthias Kloseb9621712010-04-24 17:59:49 +000012425#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12426 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12427 && LITTLE_ENDIAN)
12428 bogus endian macros
12429 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
12431 ;
12432 return 0;
12433}
12434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012436 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012438/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012439#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012441
Martin v. Löwis11437992002-04-12 09:54:03 +000012442int
12443main ()
12444{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012445#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 not big endian
12447 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
12449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012454 ac_cv_c_bigendian=yes
12455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012459fi
12460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12461 fi
12462 if test $ac_cv_c_bigendian = unknown; then
12463 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012465/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012466#include <limits.h>
12467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468int
12469main ()
12470{
Matthias Kloseb9621712010-04-24 17:59:49 +000012471#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12472 bogus endian macros
12473 #endif
12474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 ;
12476 return 0;
12477}
12478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if ac_fn_c_try_compile "$LINENO"; then :
12480 # It does; now see whether it defined to _BIG_ENDIAN or not.
12481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482/* end confdefs.h. */
12483#include <limits.h>
12484
12485int
12486main ()
12487{
12488#ifndef _BIG_ENDIAN
12489 not big endian
12490 #endif
12491
12492 ;
12493 return 0;
12494}
12495_ACEOF
12496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12502fi
12503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12504 fi
12505 if test $ac_cv_c_bigendian = unknown; then
12506 # Compile a test program.
12507 if test "$cross_compiling" = yes; then :
12508 # Try to guess by grepping values from an object file.
12509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12510/* end confdefs.h. */
12511short int ascii_mm[] =
12512 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12513 short int ascii_ii[] =
12514 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12515 int use_ascii (int i) {
12516 return ascii_mm[i] + ascii_ii[i];
12517 }
12518 short int ebcdic_ii[] =
12519 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12520 short int ebcdic_mm[] =
12521 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12522 int use_ebcdic (int i) {
12523 return ebcdic_mm[i] + ebcdic_ii[i];
12524 }
12525 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527int
12528main ()
12529{
12530return use_ascii (foo) == use_ebcdic (foo);
12531 ;
12532 return 0;
12533}
12534_ACEOF
12535if ac_fn_c_try_compile "$LINENO"; then :
12536 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12537 ac_cv_c_bigendian=yes
12538 fi
12539 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12540 if test "$ac_cv_c_bigendian" = unknown; then
12541 ac_cv_c_bigendian=no
12542 else
12543 # finding both strings is unlikely to happen, but who knows?
12544 ac_cv_c_bigendian=unknown
12545 fi
12546 fi
12547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012549else
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012551/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012553int
12554main ()
12555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 /* Are we little or big endian? From Harbison&Steele. */
12558 union
12559 {
12560 long int l;
12561 char c[sizeof (long int)];
12562 } u;
12563 u.l = 1;
12564 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565
12566 ;
12567 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012568}
Martin v. Löwis11437992002-04-12 09:54:03 +000012569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012570if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012571 ac_cv_c_bigendian=no
12572else
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12582$as_echo "$ac_cv_c_bigendian" >&6; }
12583 case $ac_cv_c_bigendian in #(
12584 yes)
12585 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12586;; #(
12587 no)
12588 ;; #(
12589 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 ;; #(
12594 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012595 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012596 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012598
Michael W. Hudson54241132001-12-07 15:38:26 +000012599
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012600# ABI version string for Python extension modules. This appears between the
12601# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12602# from the following attributes which affect the ABI of this Python build (in
12603# this order):
12604#
12605# * The Python implementation (always 'cpython-' for us)
12606# * The major and minor version numbers
12607# * --with-pydebug (adds a 'd')
12608# * --with-pymalloc (adds a 'm')
12609# * --with-wide-unicode (adds a 'u')
12610#
12611# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012612# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12613# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012614
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12616$as_echo_n "checking ABIFLAGS... " >&6; }
12617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12618$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12620$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012621SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12623$as_echo "$SOABI" >&6; }
12624
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12626$as_echo_n "checking LDVERSION... " >&6; }
12627LDVERSION='$(VERSION)$(ABIFLAGS)'
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12629$as_echo "$LDVERSION" >&6; }
12630
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012631# SO is the extension of shared libraries `(including the dot!)
12632# -- usually .so, .sl on HP-UX, .dll on Cygwin
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12634$as_echo_n "checking SO... " >&6; }
12635if test -z "$SO"
12636then
12637 case $ac_sys_system in
12638 hp*|HP*)
12639 case `uname -m` in
12640 ia64) SO=.so;;
12641 *) SO=.sl;;
12642 esac
12643 ;;
12644 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012645 Linux*|GNU*)
12646 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012647 *) SO=.so;;
12648 esac
12649else
12650 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012651 echo
12652 echo '====================================================================='
12653 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012655 echo '+ Do you really mean to change the extension for shared libraries? +'
12656 echo '+ Continuing in 10 seconds to let you to ponder. +'
12657 echo '+ +'
12658 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012659 sleep 10
12660fi
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12662$as_echo "$SO" >&6; }
12663
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012664# Check whether right shifting a negative integer extends the sign bit
12665# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12667$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012668if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012670else
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012673 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012677
12678int main()
12679{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012680 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012681}
12682
Martin v. Löwis11437992002-04-12 09:54:03 +000012683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012685 ac_cv_rshift_extends_sign=yes
12686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012691fi
12692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693fi
12694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12696$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012697if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012698then
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012701
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012702fi
12703
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012704# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12706$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012707if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012709else
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012713#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012714int
12715main ()
12716{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012717
12718 FILE *f = fopen("/dev/null", "r");
12719 flockfile(f);
12720 getc_unlocked(f);
12721 funlockfile(f);
12722
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012728 ac_cv_have_getc_unlocked=yes
12729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 ac_cv_have_getc_unlocked=no
12731fi
12732rm -f core conftest.err conftest.$ac_objext \
12733 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12737$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012738if test "$ac_cv_have_getc_unlocked" = yes
12739then
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012742
12743fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012744
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012745# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012746# save the value of LIBS so we don't actually link Python with readline
12747LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012748
Gregory P. Smith18820942008-09-07 06:24:49 +000012749# On some systems we need to link readline to a termcap compatible
12750# library. NOTE: Keep the precedence of listed libraries synchronised
12751# with setup.py.
12752py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12754$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012755for py_libtermcap in "" ncursesw ncurses curses termcap; do
12756 if test -z "$py_libtermcap"; then
12757 READLINE_LIBS="-lreadline"
12758 else
12759 READLINE_LIBS="-lreadline -l$py_libtermcap"
12760 fi
12761 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012763/* end confdefs.h. */
12764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765/* Override any GCC internal prototype to avoid an error.
12766 Use char because int might match the return type of a GCC
12767 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012768#ifdef __cplusplus
12769extern "C"
12770#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012771char readline ();
12772int
12773main ()
12774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012781 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012783rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012785 if test $py_cv_lib_readline = yes; then
12786 break
12787 fi
12788done
12789# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12790#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012791if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12793$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12796$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012800fi
12801
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012802# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12804$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012805if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012807else
12808 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012809LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012811/* end confdefs.h. */
12812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813/* Override any GCC internal prototype to avoid an error.
12814 Use char because int might match the return type of a GCC
12815 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012816#ifdef __cplusplus
12817extern "C"
12818#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012819char rl_callback_handler_install ();
12820int
12821main ()
12822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012824 ;
12825 return 0;
12826}
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012829 ac_cv_lib_readline_rl_callback_handler_install=yes
12830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012833rm -f core conftest.err conftest.$ac_objext \
12834 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012835LIBS=$ac_check_lib_save_LIBS
12836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12838$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012839if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012842
12843fi
12844
12845
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012846# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012848/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012849#include <readline/readline.h>
12850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012852 have_readline=yes
12853else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012854 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012855
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012856fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012857rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012858if test $have_readline = yes
12859then
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012862#include <readline/readline.h>
12863
12864_ACEOF
12865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869
12870fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012871rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012874/* end confdefs.h. */
12875#include <readline/readline.h>
12876
12877_ACEOF
12878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012882
12883fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012884rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012885
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012886fi
12887
Martin v. Löwis0daad592001-09-30 21:09:59 +000012888# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12890$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012891if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012893else
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012895LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899/* Override any GCC internal prototype to avoid an error.
12900 Use char because int might match the return type of a GCC
12901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012902#ifdef __cplusplus
12903extern "C"
12904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012905char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012906int
12907main ()
12908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ;
12911 return 0;
12912}
12913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012916else
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012919rm -f core conftest.err conftest.$ac_objext \
12920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012921LIBS=$ac_check_lib_save_LIBS
12922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12924$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012925if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012928
Martin v. Löwis0daad592001-09-30 21:09:59 +000012929fi
12930
Michael W. Hudson54241132001-12-07 15:38:26 +000012931
Thomas Wouters89d996e2007-09-08 17:39:28 +000012932# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12934$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012935if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012937else
12938 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012939LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012941/* end confdefs.h. */
12942
12943/* Override any GCC internal prototype to avoid an error.
12944 Use char because int might match the return type of a GCC
12945 builtin and then its argument prototype would still apply. */
12946#ifdef __cplusplus
12947extern "C"
12948#endif
12949char rl_completion_display_matches_hook ();
12950int
12951main ()
12952{
12953return rl_completion_display_matches_hook ();
12954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012959 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012963rm -f core conftest.err conftest.$ac_objext \
12964 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012965LIBS=$ac_check_lib_save_LIBS
12966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12968$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012969if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012972
12973fi
12974
12975
Martin v. Löwis0daad592001-09-30 21:09:59 +000012976# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12978$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012979if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012981else
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012983LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987/* Override any GCC internal prototype to avoid an error.
12988 Use char because int might match the return type of a GCC
12989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012990#ifdef __cplusplus
12991extern "C"
12992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012993char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012994int
12995main ()
12996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ;
12999 return 0;
13000}
13001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013004else
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013007rm -f core conftest.err conftest.$ac_objext \
13008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013009LIBS=$ac_check_lib_save_LIBS
13010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13012$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013013if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013016
Guido van Rossum353ae582001-07-10 16:45:32 +000013017fi
13018
Jack Jansendd19cf82001-12-06 22:36:17 +000013019
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013020# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022/* end confdefs.h. */
13023#include <readline/readline.h>
13024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013025if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013026 have_readline=yes
13027else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013029
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013030fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013031rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013032if test $have_readline = yes
13033then
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035/* end confdefs.h. */
13036#include <readline/readline.h>
13037
13038_ACEOF
13039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043
13044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013045rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013046
13047fi
13048
Martin v. Löwis82bca632006-02-10 20:49:30 +000013049# End of readline checks: restore LIBS
13050LIBS=$LIBS_no_readline
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13053$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013054if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013056else
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013059 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013062/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013063
13064int main()
13065{
13066 int val1 = nice(1);
13067 if (val1 != -1 && val1 == nice(2))
13068 exit(0);
13069 exit(1);
13070}
13071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013074 ac_cv_broken_nice=yes
13075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013080fi
13081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082fi
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13085$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013086if test "$ac_cv_broken_nice" = yes
13087then
Martin v. Löwis11437992002-04-12 09:54:03 +000013088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013090
13091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13094$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013095if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013099 ac_cv_broken_poll=no
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013102/* end confdefs.h. */
13103
13104#include <poll.h>
13105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013106int main()
13107{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013108 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110
13111 close (42);
13112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013114 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013115 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013116 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013118 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013119 return 1;
13120}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121
13122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013124 ac_cv_broken_poll=yes
13125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13135$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013136if test "$ac_cv_broken_poll" = yes
13137then
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140
13141fi
13142
Brett Cannon43802422005-02-10 20:48:03 +000013143# 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 +000013144# (which is not required by ISO C or UNIX spec) and/or if we support
13145# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013146ac_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 +000013147#include <$ac_cv_struct_tm>
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013150if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013151
13152cat >>confdefs.h <<_ACEOF
13153#define HAVE_STRUCT_TM_TM_ZONE 1
13154_ACEOF
13155
13156
13157fi
13158
13159if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013162
13163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13165"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013166if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170fi
13171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174_ACEOF
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13177$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013178if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013182/* end confdefs.h. */
13183#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184#if !HAVE_DECL_TZNAME
13185extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013186#endif
13187
13188int
13189main ()
13190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013192 ;
13193 return 0;
13194}
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013197 ac_cv_var_tzname=yes
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013201rm -f core conftest.err conftest.$ac_objext \
13202 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13205$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013206 if test $ac_cv_var_tzname = yes; then
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013209
13210 fi
13211fi
13212
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013213
Martin v. Löwis1d459062005-03-14 21:23:33 +000013214# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13216$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013217if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013219else
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013222 ac_cv_working_tzset=no
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013226
13227#include <stdlib.h>
13228#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013229#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013230
13231#if HAVE_TZNAME
13232extern char *tzname[];
13233#endif
13234
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013235int main()
13236{
Brett Cannon18367812003-09-19 00:59:16 +000013237 /* Note that we need to ensure that not only does tzset(3)
13238 do 'something' with localtime, but it works as documented
13239 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013240 This includes making sure that tzname is set properly if
13241 tm->tm_zone does not exist since it is the alternative way
13242 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013243
13244 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013245 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013246 */
13247
Martin v. Löwis1d459062005-03-14 21:23:33 +000013248 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013249 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13250
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013251 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013252 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013253 if (localtime(&groundhogday)->tm_hour != 0)
13254 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013255#if HAVE_TZNAME
13256 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13257 if (strcmp(tzname[0], "UTC") ||
13258 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13259 exit(1);
13260#endif
Brett Cannon18367812003-09-19 00:59:16 +000013261
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013262 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013263 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013264 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013266#if HAVE_TZNAME
13267 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13268 exit(1);
13269#endif
Brett Cannon18367812003-09-19 00:59:16 +000013270
13271 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13272 tzset();
13273 if (localtime(&groundhogday)->tm_hour != 11)
13274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013275#if HAVE_TZNAME
13276 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13277 exit(1);
13278#endif
13279
13280#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013281 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13282 exit(1);
13283 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013285#endif
Brett Cannon18367812003-09-19 00:59:16 +000013286
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013287 exit(0);
13288}
13289
13290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013291if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013292 ac_cv_working_tzset=yes
13293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013298fi
13299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300fi
13301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13303$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013304if test "$ac_cv_working_tzset" = yes
13305then
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013308
13309fi
13310
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013311# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13313$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013314if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013318/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013319#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013320int
13321main ()
13322{
13323
13324struct stat st;
13325st.st_mtim.tv_nsec = 1;
13326
13327 ;
13328 return 0;
13329}
13330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013332 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013333else
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13337fi
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13340$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013341if test "$ac_cv_stat_tv_nsec" = yes
13342then
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013345
13346fi
13347
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013348# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13350$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013351if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013355/* end confdefs.h. */
13356#include <sys/stat.h>
13357int
13358main ()
13359{
13360
13361struct stat st;
13362st.st_mtimespec.tv_nsec = 1;
13363
13364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013369 ac_cv_stat_tv_nsec2=yes
13370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13374fi
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13377$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013378if test "$ac_cv_stat_tv_nsec2" = yes
13379then
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013382
13383fi
13384
Jack Jansen666b1e72001-10-31 12:11:48 +000013385# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13387$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013388if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013392/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013393#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013394int
13395main ()
13396{
Jack Jansen666b1e72001-10-31 12:11:48 +000013397
13398 int rtn;
13399 rtn = mvwdelch(0,0,0);
13400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 ;
13402 return 0;
13403}
13404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013406 ac_cv_mvwdelch_is_expression=yes
13407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411fi
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13414$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013415
13416if test "$ac_cv_mvwdelch_is_expression" = yes
13417then
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013420
13421fi
13422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13424$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013425if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013427else
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013430#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013431int
13432main ()
13433{
Jack Jansen666b1e72001-10-31 12:11:48 +000013434
13435 WINDOW *w;
13436 w->_flags = 0;
13437
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 ;
13439 return 0;
13440}
13441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013443 ac_cv_window_has_flags=yes
13444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13448fi
13449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13451$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013452
Jack Jansen666b1e72001-10-31 12:11:48 +000013453
13454if test "$ac_cv_window_has_flags" = yes
13455then
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013458
13459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13462$as_echo_n "checking for is_term_resized... " >&6; }
13463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013464/* end confdefs.h. */
13465#include <curses.h>
13466int
13467main ()
13468{
13469void *x=is_term_resized
13470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013477
Matthias Kloseb159a552010-04-25 21:00:44 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013479$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013480else
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13482$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013483
13484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13488$as_echo_n "checking for resize_term... " >&6; }
13489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013490/* end confdefs.h. */
13491#include <curses.h>
13492int
13493main ()
13494{
13495void *x=resize_term
13496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013503
Matthias Kloseb159a552010-04-25 21:00:44 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013506else
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013509
13510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13514$as_echo_n "checking for resizeterm... " >&6; }
13515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013516/* end confdefs.h. */
13517#include <curses.h>
13518int
13519main ()
13520{
13521void *x=resizeterm
13522 ;
13523 return 0;
13524}
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013529
Matthias Kloseb159a552010-04-25 21:00:44 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013531$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013535
13536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13540$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013541
13542if test -r /dev/ptmx
13543then
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13545$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013548
Thomas Wouters89f507f2006-12-13 04:49:30 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13551$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013552fi
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13555$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013556
13557if test -r /dev/ptc
13558then
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13560$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013563
Thomas Wouters89f507f2006-12-13 04:49:30 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13566$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013567fi
13568
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013569if test "$have_long_long" = yes
13570then
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13572$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013573 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013577 ac_cv_have_long_long_format=no
13578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580/* end confdefs.h. */
13581
13582 #include <stdio.h>
13583 #include <stddef.h>
13584 #include <string.h>
13585
13586 #ifdef HAVE_SYS_TYPES_H
13587 #include <sys/types.h>
13588 #endif
13589
13590 int main()
13591 {
13592 char buffer[256];
13593
13594 if (sprintf(buffer, "%lld", (long long)123) < 0)
13595 return 1;
13596 if (strcmp(buffer, "123"))
13597 return 1;
13598
13599 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13600 return 1;
13601 if (strcmp(buffer, "-123"))
13602 return 1;
13603
13604 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13605 return 1;
13606 if (strcmp(buffer, "123"))
13607 return 1;
13608
13609 return 0;
13610 }
13611
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013614 ac_cv_have_long_long_format=yes
13615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013620fi
13621
13622
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013623fi
13624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13626$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013627fi
13628
Mark Dickinson89d7d412009-12-31 20:50:59 +000013629if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630then
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013633
13634fi
13635
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013636if test $ac_sys_system = Darwin
13637then
13638 LIBS="$LIBS -framework CoreFoundation"
13639fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13642$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013643if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013647 ac_cv_have_size_t_format="cross -- assuming yes"
13648
Thomas Wouters477c8d52006-05-27 19:21:47 +000013649else
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013651/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013652
Thomas Wouters477c8d52006-05-27 19:21:47 +000013653#include <stdio.h>
13654#include <stddef.h>
13655#include <string.h>
13656
Christian Heimes2c181612007-12-17 20:04:13 +000013657#ifdef HAVE_SYS_TYPES_H
13658#include <sys/types.h>
13659#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013660
13661#ifdef HAVE_SSIZE_T
13662typedef ssize_t Py_ssize_t;
13663#elif SIZEOF_VOID_P == SIZEOF_LONG
13664typedef long Py_ssize_t;
13665#else
13666typedef int Py_ssize_t;
13667#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013668
Christian Heimes2c181612007-12-17 20:04:13 +000013669int main()
13670{
13671 char buffer[256];
13672
Thomas Wouters477c8d52006-05-27 19:21:47 +000013673 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13674 return 1;
13675
Thomas Wouters89f507f2006-12-13 04:49:30 +000013676 if (strcmp(buffer, "123"))
13677 return 1;
13678
13679 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13680 return 1;
13681
13682 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683 return 1;
13684
13685 return 0;
13686}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687
Thomas Wouters477c8d52006-05-27 19:21:47 +000013688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013689if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13695 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013696fi
13697
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13700$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013701if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704
13705fi
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013708#ifdef HAVE_SYS_TYPES_H
13709#include <sys/types.h>
13710#endif
13711#ifdef HAVE_SYS_SOCKET_H
13712#include <sys/socket.h>
13713#endif
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013716if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013721
13722fi
13723
Michael W. Hudson54241132001-12-07 15:38:26 +000013724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13726$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013727if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729else
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013731 ac_cv_broken_mbstowcs=no
13732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013734/* end confdefs.h. */
13735
13736#include<stdlib.h>
13737int main() {
13738 size_t len = -1;
13739 const char *str = "text";
13740 len = mbstowcs(NULL, str, 0);
13741 return (len != 4);
13742}
13743
13744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013746 ac_cv_broken_mbstowcs=no
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013752fi
13753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013754fi
13755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13757$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013758if test "$ac_cv_broken_mbstowcs" = yes
13759then
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013762
13763fi
13764
Antoine Pitrou042b1282010-08-13 21:15:58 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13766$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013767if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013768 $as_echo_n "(cached) " >&6
13769else
13770 if test "$cross_compiling" = yes; then :
13771 ac_cv_computed_gotos=no
13772else
13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774/* end confdefs.h. */
13775
13776int main(int argc, char **argv)
13777{
13778 static void *targets[1] = { &&LABEL1 };
13779 goto LABEL2;
13780LABEL1:
13781 return 0;
13782LABEL2:
13783 goto *targets[0];
13784 return 1;
13785}
13786
13787_ACEOF
13788if ac_fn_c_try_run "$LINENO"; then :
13789 ac_cv_computed_gotos=yes
13790else
13791 ac_cv_computed_gotos=no
13792fi
13793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13794 conftest.$ac_objext conftest.beam conftest.$ac_ext
13795fi
13796
13797fi
13798
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13800$as_echo "$ac_cv_computed_gotos" >&6; }
13801if test "$ac_cv_computed_gotos" = yes
13802then
13803
13804$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13805
13806fi
13807
Antoine Pitroub52ec782009-01-25 16:34:23 +000013808# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13810$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013811
13812# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013813if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013814 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013815if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013816then
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13821$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013822fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013823if test "$withval" = no
13824then
13825
13826$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13829$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013830fi
13831
Antoine Pitrou042b1282010-08-13 21:15:58 +000013832else
13833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13834$as_echo "no value specified" >&6; }
13835fi
13836
Antoine Pitroub52ec782009-01-25 16:34:23 +000013837
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013838case $ac_sys_system in
13839AIX*)
13840
13841$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13842 ;;
13843esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013844
Michael W. Hudson54241132001-12-07 15:38:26 +000013845
Jesus Cea6a792292010-05-03 21:18:48 +000013846case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013847 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 +000013848esac
13849
Gregory P. Smith138fa432010-12-13 08:00:52 +000013850ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013851if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013852
13853$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13854
13855fi
Jesus Cea6a792292010-05-03 21:18:48 +000013856
13857
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013858
13859
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013860for h in `(cd $srcdir;echo Python/thread_*.h)`
13861do
13862 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13863done
13864
Michael W. Hudson54241132001-12-07 15:38:26 +000013865
Neal Norwitzd24499d2005-12-18 21:36:39 +000013866SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13868$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013869for dir in $SRCDIRS; do
13870 if test ! -d $dir; then
13871 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013872 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013873done
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13875$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013876
Guido van Rossum627b2d71993-12-24 10:39:16 +000013877# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013878ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013879
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013880ac_config_files="$ac_config_files Modules/ld_so_aix"
13881
Martin v. Löwis11437992002-04-12 09:54:03 +000013882cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883# This file is a shell script that caches the results of configure
13884# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013885# scripts and configure runs, see configure's option --config-cache.
13886# It is not useful on other systems. If it contains results you don't
13887# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888#
Martin v. Löwis11437992002-04-12 09:54:03 +000013889# config.status only pays attention to the cache file if you give it
13890# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013891#
Skip Montanaro6dead952003-09-25 14:50:04 +000013892# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013893# loading this file, other *unset* `ac_cv_foo' will be assigned the
13894# following values.
13895
13896_ACEOF
13897
Guido van Rossumf78abae1997-01-21 22:02:36 +000013898# The following way of writing the cache mishandles newlines in values,
13899# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013901# Ultrix sh set writes to stderr and can't be redirected directly,
13902# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903(
13904 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13905 eval ac_val=\$$ac_var
13906 case $ac_val in #(
13907 *${as_nl}*)
13908 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13910$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 esac
13912 case $ac_var in #(
13913 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13915 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 esac ;;
13917 esac
13918 done
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13922 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 # `set' does not quote correctly, so add quotes: double-quote
13924 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013926 "s/'/'\\\\''/g;
13927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 *)
13930 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 esac |
13934 sort
13935) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13941 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13943 :end' >>confcache
13944if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13945 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013946 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13948$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013949 if test ! -f "$cache_file" || test -h "$cache_file"; then
13950 cat confcache >"$cache_file"
13951 else
13952 case $cache_file in #(
13953 */* | ?:*)
13954 mv -f confcache "$cache_file"$$ &&
13955 mv -f "$cache_file"$$ "$cache_file" ;; #(
13956 *)
13957 mv -f confcache "$cache_file" ;;
13958 esac
13959 fi
13960 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013961 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13963$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013964 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013965fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013966rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013968test "x$prefix" = xNONE && prefix=$ac_default_prefix
13969# Let make expand exec_prefix.
13970test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013971
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972DEFS=-DHAVE_CONFIG_H
13973
Skip Montanaro6dead952003-09-25 14:50:04 +000013974ac_libobjs=
13975ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013976U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013977for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13978 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13982 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13984 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013985done
13986LIBOBJS=$ac_libobjs
13987
13988LTLIBOBJS=$ac_ltlibobjs
13989
13990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013993: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013994ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013995ac_clean_files_save=$ac_clean_files
13996ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13998$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13999as_write_fail=0
14000cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014001#! $SHELL
14002# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014003# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014005# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014008ac_cs_recheck=false
14009ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014010
Matthias Kloseb9621712010-04-24 17:59:49 +000014011SHELL=\${CONFIG_SHELL-$SHELL}
14012export SHELL
14013_ASEOF
14014cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14015## -------------------- ##
14016## M4sh Initialization. ##
14017## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019# Be more Bourne compatible
14020DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 emulate sh
14023 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 # is contrary to our usage. Disable this feature.
14026 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 case `(set -o) 2>/dev/null` in #(
14030 *posix*) :
14031 set -o posix ;; #(
14032 *) :
14033 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014036
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038as_nl='
14039'
14040export as_nl
14041# Printing a long string crashes Solaris 7 /usr/bin/printf.
14042as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14044as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14045# Prefer a ksh shell builtin over an external printf program on Solaris,
14046# but without wasting forks for bash or zsh.
14047if test -z "$BASH_VERSION$ZSH_VERSION" \
14048 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14049 as_echo='print -r --'
14050 as_echo_n='print -rn --'
14051elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14052 as_echo='printf %s\n'
14053 as_echo_n='printf %s'
14054else
14055 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14056 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14057 as_echo_n='/usr/ucb/echo -n'
14058 else
14059 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14060 as_echo_n_body='eval
14061 arg=$1;
14062 case $arg in #(
14063 *"$as_nl"*)
14064 expr "X$arg" : "X\\(.*\\)$as_nl";
14065 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14066 esac;
14067 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14068 '
14069 export as_echo_n_body
14070 as_echo_n='sh -c $as_echo_n_body as_echo'
14071 fi
14072 export as_echo_body
14073 as_echo='sh -c $as_echo_body as_echo'
14074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
14076# The user is always right.
14077if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 PATH_SEPARATOR=:
14079 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14080 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14081 PATH_SEPARATOR=';'
14082 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085
14086# IFS
14087# We need space, tab and new line, in precisely that order. Quoting is
14088# there to prevent editors from complaining about space-tab.
14089# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14090# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091IFS=" "" $as_nl"
14092
14093# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014096 *[\\/]* ) as_myself=$0 ;;
14097 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014098for as_dir in $PATH
14099do
14100 IFS=$as_save_IFS
14101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106 ;;
14107esac
14108# We did not find ourselves, most probably we were run as `sh COMMAND'
14109# in which case we are not to be found in the path.
14110if test "x$as_myself" = x; then
14111 as_myself=$0
14112fi
14113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116fi
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118# Unset variables that we do not need and which cause bugs (e.g. in
14119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14120# suppresses any "Segmentation fault" message there. '((' could
14121# trigger a bug in pdksh 5.2.14.
14122for as_var in BASH_ENV ENV MAIL MAILPATH
14123do eval test x\${$as_var+set} = xset \
14124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125done
14126PS1='$ '
14127PS2='> '
14128PS4='+ '
14129
14130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014131LC_ALL=C
14132export LC_ALL
14133LANGUAGE=C
14134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135
Matthias Kloseb9621712010-04-24 17:59:49 +000014136# CDPATH.
14137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14138
14139
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014140# as_fn_error STATUS ERROR [LINENO LOG_FD]
14141# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014142# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14143# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014144# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014145as_fn_error ()
14146{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014147 as_status=$1; test $as_status -eq 0 && as_status=1
14148 if test "$4"; then
14149 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14150 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014152 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 as_fn_exit $as_status
14154} # as_fn_error
14155
14156
14157# as_fn_set_status STATUS
14158# -----------------------
14159# Set $? to STATUS, without forking.
14160as_fn_set_status ()
14161{
14162 return $1
14163} # as_fn_set_status
14164
14165# as_fn_exit STATUS
14166# -----------------
14167# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14168as_fn_exit ()
14169{
14170 set +e
14171 as_fn_set_status $1
14172 exit $1
14173} # as_fn_exit
14174
14175# as_fn_unset VAR
14176# ---------------
14177# Portably unset VAR.
14178as_fn_unset ()
14179{
14180 { eval $1=; unset $1;}
14181}
14182as_unset=as_fn_unset
14183# as_fn_append VAR VALUE
14184# ----------------------
14185# Append the text in VALUE to the end of the definition contained in VAR. Take
14186# advantage of any shell optimizations that allow amortized linear growth over
14187# repeated appends, instead of the typical quadratic growth present in naive
14188# implementations.
14189if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14190 eval 'as_fn_append ()
14191 {
14192 eval $1+=\$2
14193 }'
14194else
14195 as_fn_append ()
14196 {
14197 eval $1=\$$1\$2
14198 }
14199fi # as_fn_append
14200
14201# as_fn_arith ARG...
14202# ------------------
14203# Perform arithmetic evaluation on the ARGs, and store the result in the
14204# global $as_val. Take advantage of shells that can avoid forks. The arguments
14205# must be portable across $(()) and expr.
14206if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14207 eval 'as_fn_arith ()
14208 {
14209 as_val=$(( $* ))
14210 }'
14211else
14212 as_fn_arith ()
14213 {
14214 as_val=`expr "$@" || test $? -eq 1`
14215 }
14216fi # as_fn_arith
14217
14218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219if expr a : '\(a\)' >/dev/null 2>&1 &&
14220 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14221 as_expr=expr
14222else
14223 as_expr=false
14224fi
14225
14226if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14227 as_basename=basename
14228else
14229 as_basename=false
14230fi
14231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14233 as_dirname=dirname
14234else
14235 as_dirname=false
14236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238as_me=`$as_basename -- "$0" ||
14239$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14240 X"$0" : 'X\(//\)$' \| \
14241 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014242$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243 sed '/^.*\/\([^/][^/]*\)\/*$/{
14244 s//\1/
14245 q
14246 }
14247 /^X\/\(\/\/\)$/{
14248 s//\1/
14249 q
14250 }
14251 /^X\/\(\/\).*/{
14252 s//\1/
14253 q
14254 }
14255 s/.*/./; q'`
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257# Avoid depending upon Character Ranges.
14258as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14259as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14260as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14261as_cr_digits='0123456789'
14262as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263
14264ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014265case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 xy) ECHO_C='\c';;
14270 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14271 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 esac;;
14273*)
14274 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014275esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278if test -d conf$$.dir; then
14279 rm -f conf$$.dir/conf$$.file
14280else
14281 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if (echo >conf$$.file) 2>/dev/null; then
14285 if ln -s conf$$.file conf$$ 2>/dev/null; then
14286 as_ln_s='ln -s'
14287 # ... but there are two gotchas:
14288 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14289 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14290 # In both cases, we have to default to `cp -p'.
14291 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14292 as_ln_s='cp -p'
14293 elif ln conf$$.file conf$$ 2>/dev/null; then
14294 as_ln_s=ln
14295 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014298else
14299 as_ln_s='cp -p'
14300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14302rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304
14305# as_fn_mkdir_p
14306# -------------
14307# Create "$as_dir" as a directory, including parents if necessary.
14308as_fn_mkdir_p ()
14309{
14310
14311 case $as_dir in #(
14312 -*) as_dir=./$as_dir;;
14313 esac
14314 test -d "$as_dir" || eval $as_mkdir_p || {
14315 as_dirs=
14316 while :; do
14317 case $as_dir in #(
14318 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14319 *) as_qdir=$as_dir;;
14320 esac
14321 as_dirs="'$as_qdir' $as_dirs"
14322 as_dir=`$as_dirname -- "$as_dir" ||
14323$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14324 X"$as_dir" : 'X\(//\)[^/]' \| \
14325 X"$as_dir" : 'X\(//\)$' \| \
14326 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14327$as_echo X"$as_dir" |
14328 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14329 s//\1/
14330 q
14331 }
14332 /^X\(\/\/\)[^/].*/{
14333 s//\1/
14334 q
14335 }
14336 /^X\(\/\/\)$/{
14337 s//\1/
14338 q
14339 }
14340 /^X\(\/\).*/{
14341 s//\1/
14342 q
14343 }
14344 s/.*/./; q'`
14345 test -d "$as_dir" && break
14346 done
14347 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014348 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014349
14350
14351} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014352if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014354else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014356 as_mkdir_p=false
14357fi
14358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359if test -x / >/dev/null 2>&1; then
14360 as_test_x='test -x'
14361else
14362 if ls -dL / >/dev/null 2>&1; then
14363 as_ls_L_option=L
14364 else
14365 as_ls_L_option=
14366 fi
14367 as_test_x='
14368 eval sh -c '\''
14369 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 case $1 in #(
14373 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376 ???[sx]*):;;*)false;;esac;fi
14377 '\'' sh
14378 '
14379fi
14380as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
14382# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
14385# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014386as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
14388
Martin v. Löwis11437992002-04-12 09:54:03 +000014389exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014390## ----------------------------------- ##
14391## Main body of $CONFIG_STATUS script. ##
14392## ----------------------------------- ##
14393_ASEOF
14394test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14397# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014398# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399# values after options handling.
14400ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014401This file was extended by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014402generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
14404 CONFIG_FILES = $CONFIG_FILES
14405 CONFIG_HEADERS = $CONFIG_HEADERS
14406 CONFIG_LINKS = $CONFIG_LINKS
14407 CONFIG_COMMANDS = $CONFIG_COMMANDS
14408 $ $0 $@
14409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410on `(hostname || uname -n) 2>/dev/null | sed 1q`
14411"
14412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413_ACEOF
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415case $ac_config_files in *"
14416"*) set x $ac_config_files; shift; ac_config_files=$*;;
14417esac
14418
14419case $ac_config_headers in *"
14420"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14421esac
14422
14423
14424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014425# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014426config_files="$ac_config_files"
14427config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
Matthias Kloseb9621712010-04-24 17:59:49 +000014431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014433\`$as_me' instantiates files and other configuration actions
14434from templates according to the current configuration. Unless the files
14435and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
14439 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 --config print configuration, then exit
14442 -q, --quiet, --silent
14443 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 -d, --debug don't remove temporary files
14445 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 --file=FILE[:TEMPLATE]
14447 instantiate the configuration file FILE
14448 --header=FILE[:TEMPLATE]
14449 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
14451Configuration files:
14452$config_files
14453
14454Configuration headers:
14455$config_headers
14456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14461ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014462ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014463python config.status 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014464configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014467Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014468This config.status script is free software; the Free Software Foundation
14469gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470
14471ac_pwd='$ac_pwd'
14472srcdir='$srcdir'
14473INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014474test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014475_ACEOF
14476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14478# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014479ac_need_defaults=:
14480while test $# != 0
14481do
14482 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014483 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14485 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014486 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014488 --*=)
14489 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14490 ac_optarg=
14491 ac_shift=:
14492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 ac_option=$1
14495 ac_optarg=$2
14496 ac_shift=shift
14497 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 esac
14499
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14503 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo "$ac_cs_version"; exit ;;
14506 --config | --confi | --conf | --con | --co | --c )
14507 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 debug=: ;;
14510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014511 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 case $ac_optarg in
14513 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014514 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 esac
14516 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 ac_need_defaults=false;;
14518 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014519 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 case $ac_optarg in
14521 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14522 esac
14523 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 --he | --h)
14526 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014527 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014528Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14532 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14533 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
14535 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014536 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014537Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542 esac
14543 shift
14544done
14545
Skip Montanaro6dead952003-09-25 14:50:04 +000014546ac_configure_extra_args=
14547
14548if $ac_cs_silent; then
14549 exec 6>/dev/null
14550 ac_configure_extra_args="$ac_configure_extra_args --silent"
14551fi
14552
14553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014555if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14557 shift
14558 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14559 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014562fi
14563
Martin v. Löwis11437992002-04-12 09:54:03 +000014564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566exec 5>>config.log
14567{
14568 echo
14569 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14570## Running $as_me. ##
14571_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580
14581# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014582for ac_config_target in $ac_config_targets
14583do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584 case $ac_config_target in
14585 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14586 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14587 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014588 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14589 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14591 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014592 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014593 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014595 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 esac
14597done
14598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600# If the user did not use the arguments to specify the items to instantiate,
14601# then the envvar interface is used. Set only those that are not.
14602# We use the long form for the default assignment because of an extremely
14603# bizarre bug on SunOS 4.1.3.
14604if $ac_need_defaults; then
14605 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14606 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14607fi
14608
Skip Montanaro6dead952003-09-25 14:50:04 +000014609# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014611# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612# Hook for its removal unless debugging.
14613# Note that there is a small window in which the directory will not be cleaned:
14614# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014615$debug ||
14616{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014617 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014619 : "${ac_tmp:=$tmp}"
14620 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014623}
Martin v. Löwis11437992002-04-12 09:54:03 +000014624# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014628 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014629} ||
14630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 tmp=./conf$$-$RANDOM
14632 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014633} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14634ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636# Set up the scripts for CONFIG_FILES section.
14637# No need to generate them if there are no CONFIG_FILES.
14638# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641
14642ac_cr=`echo X | tr X '\015'`
14643# On cygwin, bash can eat \r inside `` if the user requested igncr.
14644# But we know of no other shell where ac_cr would be empty at this
14645# point, so we can use a bashism as a fallback.
14646if test "x$ac_cr" = x; then
14647 eval ac_cr=\$\'\\r\'
14648fi
14649ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14650if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014651 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014652else
14653 ac_cs_awk_cr=$ac_cr
14654fi
14655
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014656echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014657_ACEOF
14658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{
14661 echo "cat >conf$$subs.awk <<_ACEOF" &&
14662 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14663 echo "_ACEOF"
14664} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14666ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667ac_delim='%!_!# '
14668for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014670 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14673 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 break
14675 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014676 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677 else
14678 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680done
Matthias Kloseb9621712010-04-24 17:59:49 +000014681rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014684cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686sed -n '
14687h
14688s/^/S["/; s/!.*/"]=/
14689p
14690g
14691s/^[^!]*!//
14692:repl
14693t repl
14694s/'"$ac_delim"'$//
14695t delim
14696:nl
14697h
14698s/\(.\{148\}\)..*/\1/
14699t more1
14700s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14701p
14702n
14703b repl
14704:more1
14705s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14706p
14707g
14708s/.\{148\}//
14709t nl
14710:delim
14711h
14712s/\(.\{148\}\)..*/\1/
14713t more2
14714s/["\\]/\\&/g; s/^/"/; s/$/"/
14715p
14716b
14717:more2
14718s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14719p
14720g
14721s/.\{148\}//
14722t delim
14723' <conf$$subs.awk | sed '
14724/^[^""]/{
14725 N
14726 s/\n//
14727}
14728' >>$CONFIG_STATUS || ac_write_fail=1
14729rm -f conf$$subs.awk
14730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14731_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014732cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 for (key in S) S_is_set[key] = 1
14734 FS = ""
14735
14736}
14737{
14738 line = $ 0
14739 nfields = split(line, field, "@")
14740 substed = 0
14741 len = length(field[1])
14742 for (i = 2; i < nfields; i++) {
14743 key = field[i]
14744 keylen = length(key)
14745 if (S_is_set[key]) {
14746 value = S[key]
14747 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14748 len += length(value) + length(field[++i])
14749 substed = 1
14750 } else
14751 len += 1 + keylen
14752 }
14753
14754 print line
14755}
14756
14757_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14760if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14761 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14762else
14763 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014764fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14765 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014766_ACEOF
14767
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014768# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14769# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770# trailing colons and then remove the whole line if VPATH becomes empty
14771# (actually we leave an empty line to preserve line numbers).
14772if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014773 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14774h
14775s///
14776s/^/:/
14777s/[ ]*$/:/
14778s/:\$(srcdir):/:/g
14779s/:\${srcdir}:/:/g
14780s/:@srcdir@:/:/g
14781s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014783x
14784s/\(=[ ]*\).*/\1/
14785G
14786s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787s/^[^=]*=[ ]*$//
14788}'
14789fi
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014792fi # test -n "$CONFIG_FILES"
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794# Set up the scripts for CONFIG_HEADERS section.
14795# No need to generate them if there are no CONFIG_HEADERS.
14796# This happens for instance with `./config.status Makefile'.
14797if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014798cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014799BEGIN {
14800_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802# Transform confdefs.h into an awk script `defines.awk', embedded as
14803# here-document in config.status, that substitutes the proper values into
14804# config.h.in to produce config.h.
14805
14806# Create a delimiter string that does not exist in confdefs.h, to ease
14807# handling of long lines.
14808ac_delim='%!_!# '
14809for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014810 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14811 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 break
14813 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014814 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 else
14816 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14817 fi
14818done
14819
14820# For the awk script, D is an array of macro values keyed by name,
14821# likewise P contains macro parameters if any. Preserve backslash
14822# newline sequences.
14823
14824ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14825sed -n '
14826s/.\{148\}/&'"$ac_delim"'/g
14827t rset
14828:rset
14829s/^[ ]*#[ ]*define[ ][ ]*/ /
14830t def
14831d
14832:def
14833s/\\$//
14834t bsnl
14835s/["\\]/\\&/g
14836s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14837D["\1"]=" \3"/p
14838s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14839d
14840:bsnl
14841s/["\\]/\\&/g
14842s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14843D["\1"]=" \3\\\\\\n"\\/p
14844t cont
14845s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14846t cont
14847d
14848:cont
14849n
14850s/.\{148\}/&'"$ac_delim"'/g
14851t clear
14852:clear
14853s/\\$//
14854t bsnlc
14855s/["\\]/\\&/g; s/^/"/; s/$/"/p
14856d
14857:bsnlc
14858s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14859b cont
14860' <confdefs.h | sed '
14861s/'"$ac_delim"'/"\\\
14862"/g' >>$CONFIG_STATUS || ac_write_fail=1
14863
14864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14865 for (key in D) D_is_set[key] = 1
14866 FS = ""
14867}
14868/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14869 line = \$ 0
14870 split(line, arg, " ")
14871 if (arg[1] == "#") {
14872 defundef = arg[2]
14873 mac1 = arg[3]
14874 } else {
14875 defundef = substr(arg[1], 2)
14876 mac1 = arg[2]
14877 }
14878 split(mac1, mac2, "(") #)
14879 macro = mac2[1]
14880 prefix = substr(line, 1, index(line, defundef) - 1)
14881 if (D_is_set[macro]) {
14882 # Preserve the white space surrounding the "#".
14883 print prefix "define", macro P[macro] D[macro]
14884 next
14885 } else {
14886 # Replace #undef with comments. This is necessary, for example,
14887 # in the case of _POSIX_SOURCE, which is predefined and required
14888 # on some systems where configure will not decide to define it.
14889 if (defundef == "undef") {
14890 print "/*", prefix defundef, macro, "*/"
14891 next
14892 }
14893 }
14894}
14895{ print }
14896_ACAWK
14897_ACEOF
14898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014899 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014900fi # test -n "$CONFIG_HEADERS"
14901
14902
14903eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14904shift
14905for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906do
14907 case $ac_tag in
14908 :[FHLC]) ac_mode=$ac_tag; continue;;
14909 esac
14910 case $ac_mode$ac_tag in
14911 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014912 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 :[FH]-) ac_tag=-:-;;
14914 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14915 esac
14916 ac_save_IFS=$IFS
14917 IFS=:
14918 set x $ac_tag
14919 IFS=$ac_save_IFS
14920 shift
14921 ac_file=$1
14922 shift
14923
14924 case $ac_mode in
14925 :L) ac_source=$1;;
14926 :[FH])
14927 ac_file_inputs=
14928 for ac_f
14929 do
14930 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014931 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 *) # Look for the file first in the build tree, then in the source tree
14933 # (if the path is not absolute). The absolute path cannot be DOS-style,
14934 # because $ac_f cannot contain `:'.
14935 test -f "$ac_f" ||
14936 case $ac_f in
14937 [\\/$]*) false;;
14938 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14939 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014940 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14943 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 done
14945
14946 # Let's still pretend it is `configure' which instantiates (i.e., don't
14947 # use $as_me), people would be surprised to read:
14948 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 configure_input='Generated from '`
14950 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14951 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 if test x"$ac_file" != x-; then
14953 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14955$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 # Neutralize special characters interpreted by sed in replacement strings.
14958 case $configure_input in #(
14959 *\&* | *\|* | *\\* )
14960 ac_sed_conf_input=`$as_echo "$configure_input" |
14961 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14962 *) ac_sed_conf_input=$configure_input;;
14963 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964
14965 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014966 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14967 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 esac
14969 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 esac
14971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014973$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 X"$ac_file" : 'X\(//\)[^/]' \| \
14975 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14979 s//\1/
14980 q
14981 }
14982 /^X\(\/\/\)[^/].*/{
14983 s//\1/
14984 q
14985 }
14986 /^X\(\/\/\)$/{
14987 s//\1/
14988 q
14989 }
14990 /^X\(\/\).*/{
14991 s//\1/
14992 q
14993 }
14994 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ac_builddir=.
14997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998case "$ac_dir" in
14999.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15000*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 case $ac_top_builddir_sub in
15005 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15006 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15007 esac ;;
15008esac
15009ac_abs_top_builddir=$ac_pwd
15010ac_abs_builddir=$ac_pwd$ac_dir_suffix
15011# for backward compatibility:
15012ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015013
15014case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 ac_top_srcdir=$ac_top_builddir_sub
15018 ac_abs_top_srcdir=$ac_pwd ;;
15019 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ac_top_srcdir=$srcdir
15022 ac_abs_top_srcdir=$srcdir ;;
15023 *) # Relative name.
15024 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15025 ac_top_srcdir=$ac_top_build_prefix$srcdir
15026 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015027esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015029
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 case $ac_mode in
15032 :F)
15033 #
15034 # CONFIG_FILE
15035 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
15037 case $INSTALL in
15038 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015041_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042
Matthias Kloseb9621712010-04-24 17:59:49 +000015043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044# If the template does not know about datarootdir, expand it.
15045# FIXME: This hack should be removed a few years after 2.60.
15046ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015047ac_sed_dataroot='
15048/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049 p
15050 q
15051}
15052/@datadir@/p
15053/@docdir@/p
15054/@infodir@/p
15055/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015056/@mandir@/p'
15057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058*datarootdir*) ac_datarootdir_seen=yes;;
15059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 ac_datarootdir_hack='
15065 s&@datadir@&$datadir&g
15066 s&@docdir@&$docdir&g
15067 s&@infodir@&$infodir&g
15068 s&@localedir@&$localedir&g
15069 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071esac
15072_ACEOF
15073
15074# Neutralize VPATH when `$srcdir' = `.'.
15075# Shell code in configure.ac might set extrasub.
15076# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15078ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015079$extrasub
15080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015082:t
15083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015084s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015086s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087s&@srcdir@&$ac_srcdir&;t t
15088s&@abs_srcdir@&$ac_abs_srcdir&;t t
15089s&@top_srcdir@&$ac_top_srcdir&;t t
15090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15091s&@builddir@&$ac_builddir&;t t
15092s&@abs_builddir@&$ac_abs_builddir&;t t
15093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15094s&@INSTALL@&$ac_INSTALL&;t t
15095$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015096"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015097eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15098 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015101 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15102 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15103 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015105which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015107which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015108
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015109 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015111 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15112 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015114 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115 ;;
15116 :H)
15117 #
15118 # CONFIG_HEADER
15119 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 {
15122 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015123 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15124 } >"$ac_tmp/config.h" \
15125 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15126 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15128$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015131 mv "$ac_tmp/config.h" "$ac_file" \
15132 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 fi
15134 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015136 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15137 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141
15142 esac
15143
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015144
15145 case $ac_file$ac_mode in
15146 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15147
15148 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149done # for ac_tag
15150
Guido van Rossum627b2d71993-12-24 10:39:16 +000015151
Matthias Kloseb9621712010-04-24 17:59:49 +000015152as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015153_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015154ac_clean_files=$ac_clean_files_save
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015157 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160# configure is writing to config.log, and then calls config.status.
15161# config.status does its own redirection, appending to config.log.
15162# Unfortunately, on DOS this fails, as config.log is still kept open
15163# by configure, so config.status won't be able to write to it; its
15164# output is simply discarded. So we exec the FD to /dev/null,
15165# effectively closing config.log, so it can be properly (re)opened and
15166# appended to by config.status. When coming back to configure, we
15167# need to make the FD available again.
15168if test "$no_create" != yes; then
15169 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015170 ac_config_status_args=
15171 test "$silent" = yes &&
15172 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015174 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 exec 5>>config.log
15176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15177 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015178 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015179fi
15180if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15182$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015183fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015184
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015185
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015186echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015187if test ! -f Modules/Setup
15188then
15189 cp $srcdir/Modules/Setup.dist Modules/Setup
15190fi
15191
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015192echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015193if test ! -f Modules/Setup.local
15194then
15195 echo "# Edit this file for local setup changes" >Modules/Setup.local
15196fi
15197
15198echo "creating Makefile"
15199$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15200 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015201 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015202mv config.c Modules