blob: dbca957e864e67f7ae1c9908eca604d15d5f3f9c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl9a829be2011-02-15 15:44:51 +00002# From configure.in Revision: 88350 .
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
647SVNVERSION
648ARFLAGS
649AR
650RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000651USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652GNULD
653LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000654LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000655RUNSHARED
656INSTSONAME
657LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000658PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000659BLDLIBRARY
660DLLLIBRARY
661LDLIBRARY
662LIBRARY
663BUILDEXEEXT
664EGREP
665GREP
666CPP
667MAINCC
668CXX
669OBJEXT
670EXEEXT
671ac_ct_CC
672CPPFLAGS
673LDFLAGS
674CFLAGS
675CC
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CONFIGURE_MACOSX_DEPLOYMENT_TARGET
678SGI_ABI
679MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000680FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000681FRAMEWORKUNIXTOOLSPREFIX
682FRAMEWORKALTINSTALLLAST
683FRAMEWORKALTINSTALLFIRST
684FRAMEWORKINSTALLLAST
685FRAMEWORKINSTALLFIRST
686PYTHONFRAMEWORKINSTALLDIR
687PYTHONFRAMEWORKPREFIX
688PYTHONFRAMEWORKDIR
689PYTHONFRAMEWORKIDENTIFIER
690PYTHONFRAMEWORK
691LIPO_32BIT_FLAGS
692ARCH_RUN_32BIT
693UNIVERSALSDK
694CONFIG_ARGS
695SOVERSION
696VERSION
697target_alias
698host_alias
699build_alias
700LIBS
701ECHO_T
702ECHO_N
703ECHO_C
704DEFS
705mandir
706localedir
707libdir
708psdir
709pdfdir
710dvidir
711htmldir
712infodir
713docdir
714oldincludedir
715includedir
716localstatedir
717sharedstatedir
718sysconfdir
719datadir
720datarootdir
721libexecdir
722sbindir
723bindir
724program_transform_name
725prefix
726exec_prefix
727PACKAGE_URL
728PACKAGE_BUGREPORT
729PACKAGE_STRING
730PACKAGE_VERSION
731PACKAGE_TARNAME
732PACKAGE_NAME
733PATH_SEPARATOR
734SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000736ac_user_opts='
737enable_option_checking
738enable_universalsdk
739with_universal_archs
740with_framework_name
741enable_framework
742with_gcc
743with_cxx_main
744with_suffix
745enable_shared
746enable_profiling
747with_pydebug
748with_libs
749with_system_expat
750with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000751enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_dbmliborder
753with_signal_module
754with_dec_threads
755with_threads
756with_thread
757enable_ipv6
758with_doc_strings
759with_tsc
760with_pymalloc
761with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000762with_fpectl
763with_libm
764with_libc
765enable_big_digits
766with_wide_unicode
767with_computed_gotos
768'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000769 ac_precious_vars='build_alias
770host_alias
771target_alias
772CC
773CFLAGS
774LDFLAGS
775LIBS
776CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000777CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778
Guido van Rossum627b2d71993-12-24 10:39:16 +0000779
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000781ac_init_help=
782ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000783ac_unrecognized_opts=
784ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785# The variables have the same names as the options, with
786# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000787cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790no_recursion=
791prefix=NONE
792program_prefix=NONE
793program_suffix=NONE
794program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799x_includes=NONE
800x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000801
802# Installation directory options.
803# These are left unexpanded so users can "make install exec_prefix=/foo"
804# and all the variables that are supposed to be based on exec_prefix
805# by default will actually change.
806# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808bindir='${exec_prefix}/bin'
809sbindir='${exec_prefix}/sbin'
810libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811datarootdir='${prefix}/share'
812datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813sysconfdir='${prefix}/etc'
814sharedstatedir='${prefix}/com'
815localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816includedir='${prefix}/include'
817oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
819infodir='${datarootdir}/info'
820htmldir='${docdir}'
821dvidir='${docdir}'
822pdfdir='${docdir}'
823psdir='${docdir}'
824libdir='${exec_prefix}/lib'
825localedir='${datarootdir}/locale'
826mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000831do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832 # If the previous option needs an argument, assign it.
833 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 ac_prev=
836 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000840 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
841 *=) ac_optarg= ;;
842 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845 # Accept the important Cygnus configure options, so we can diagnose typos.
846
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 case $ac_dashdash$ac_option in
848 --)
849 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851 -bindir | --bindir | --bindi | --bind | --bin | --bi)
852 ac_prev=bindir ;;
853 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855
856 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861 -cache-file | --cache-file | --cache-fil | --cache-fi \
862 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
863 ac_prev=cache_file ;;
864 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
865 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 cache_file=$ac_optarg ;;
867
868 --config-cache | -C)
869 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
877 | --dataroo | --dataro | --datar)
878 ac_prev=datarootdir ;;
879 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
880 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
881 datarootdir=$ac_optarg ;;
882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000886 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000887 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt_orig=$ac_useropt
889 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
890 case $ac_user_opts in
891 *"
892"enable_$ac_useropt"
893"*) ;;
894 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
895 ac_unrecognized_sep=', ';;
896 esac
897 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898
899 -docdir | --docdir | --docdi | --doc | --do)
900 ac_prev=docdir ;;
901 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
902 docdir=$ac_optarg ;;
903
904 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
905 ac_prev=dvidir ;;
906 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
907 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
909 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000913 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt_orig=$ac_useropt
915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916 case $ac_user_opts in
917 *"
918"enable_$ac_useropt"
919"*) ;;
920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
921 ac_unrecognized_sep=', ';;
922 esac
923 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
926 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
927 | --exec | --exe | --ex)
928 ac_prev=exec_prefix ;;
929 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
930 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
931 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Obsolete; use --with-gas.
936 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 -help | --help | --hel | --he | -h)
939 ac_init_help=long ;;
940 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
941 ac_init_help=recursive ;;
942 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
943 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
945 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
951 ac_prev=htmldir ;;
952 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
953 | --ht=*)
954 htmldir=$ac_optarg ;;
955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 -includedir | --includedir | --includedi | --included | --include \
957 | --includ | --inclu | --incl | --inc)
958 ac_prev=includedir ;;
959 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
960 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -infodir | --infodir | --infodi | --infod | --info | --inf)
964 ac_prev=infodir ;;
965 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libdir | --libdir | --libdi | --libd)
969 ac_prev=libdir ;;
970 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
973 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
974 | --libexe | --libex | --libe)
975 ac_prev=libexecdir ;;
976 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
977 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 -localedir | --localedir | --localedi | --localed | --locale)
981 ac_prev=localedir ;;
982 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
983 localedir=$ac_optarg ;;
984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000986 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 ac_prev=localstatedir ;;
988 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
993 ac_prev=mandir ;;
994 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --without-fp.
999 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 no_create=yes ;;
1004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1010 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1011 | --oldin | --oldi | --old | --ol | --o)
1012 ac_prev=oldincludedir ;;
1013 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1014 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1015 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1019 ac_prev=prefix ;;
1020 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1024 | --program-pre | --program-pr | --program-p)
1025 ac_prev=program_prefix ;;
1026 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1027 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1031 | --program-suf | --program-su | --program-s)
1032 ac_prev=program_suffix ;;
1033 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1034 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -program-transform-name | --program-transform-name \
1038 | --program-transform-nam | --program-transform-na \
1039 | --program-transform-n | --program-transform- \
1040 | --program-transform | --program-transfor \
1041 | --program-transfo | --program-transf \
1042 | --program-trans | --program-tran \
1043 | --progr-tra | --program-tr | --program-t)
1044 ac_prev=program_transform_name ;;
1045 -program-transform-name=* | --program-transform-name=* \
1046 | --program-transform-nam=* | --program-transform-na=* \
1047 | --program-transform-n=* | --program-transform-=* \
1048 | --program-transform=* | --program-transfor=* \
1049 | --program-transfo=* | --program-transf=* \
1050 | --program-trans=* | --program-tran=* \
1051 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1055 ac_prev=pdfdir ;;
1056 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1057 pdfdir=$ac_optarg ;;
1058
1059 -psdir | --psdir | --psdi | --psd | --ps)
1060 ac_prev=psdir ;;
1061 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1062 psdir=$ac_optarg ;;
1063
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1065 | -silent | --silent | --silen | --sile | --sil)
1066 silent=yes ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1069 ac_prev=sbindir ;;
1070 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1071 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1075 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1076 | --sharedst | --shareds | --shared | --share | --shar \
1077 | --sha | --sh)
1078 ac_prev=sharedstatedir ;;
1079 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1080 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1081 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1082 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 -site | --site | --sit)
1086 ac_prev=site ;;
1087 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091 ac_prev=srcdir ;;
1092 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1096 | --syscon | --sysco | --sysc | --sys | --sy)
1097 ac_prev=sysconfdir ;;
1098 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1099 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1108 verbose=yes ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 -version | --version | --versio | --versi | --vers | -V)
1111 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001117 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt_orig=$ac_useropt
1119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1120 case $ac_user_opts in
1121 *"
1122"with_$ac_useropt"
1123"*) ;;
1124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1125 ac_unrecognized_sep=', ';;
1126 esac
1127 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
1129 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001133 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138"with_$ac_useropt"
1139"*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
1142 esac
1143 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 --x)
1146 # Obsolete; use --with-x.
1147 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1150 | --x-incl | --x-inc | --x-in | --x-i)
1151 ac_prev=x_includes ;;
1152 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1153 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1157 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1158 ac_prev=x_libraries ;;
1159 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1160 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001163 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1164Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 ;;
1166
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 *=*)
1168 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1169 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 case $ac_envvar in #(
1171 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001172 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 export $ac_envvar ;;
1176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001182 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ;;
1184
1185 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001186done
1187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001190 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191fi
1192
Matthias Kloseb9621712010-04-24 17:59:49 +00001193if test -n "$ac_unrecognized_opts"; then
1194 case $enable_option_checking in
1195 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001196 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1198 esac
1199fi
1200
1201# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1203 datadir sysconfdir sharedstatedir localstatedir includedir \
1204 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1205 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 # Remove trailing slashes.
1209 case $ac_val in
1210 */ )
1211 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1212 eval $ac_var=\$ac_val;;
1213 esac
1214 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216 [\\/$]* | ?:[\\/]* ) continue;;
1217 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001219 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001220done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222# There might be people who depend on the old broken behavior: `$host'
1223# used to hold the argument of --host etc.
1224# FIXME: To remove some day.
1225build=$build_alias
1226host=$host_alias
1227target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229# FIXME: To remove some day.
1230if test "x$host_alias" != x; then
1231 if test "x$build_alias" = x; then
1232 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001233 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1234 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 elif test "x$build_alias" != "x$host_alias"; then
1236 cross_compiling=yes
1237 fi
1238fi
1239
1240ac_tool_prefix=
1241test -n "$host_alias" && ac_tool_prefix=$host_alias-
1242
1243test "$silent" = yes && exec 6>/dev/null
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246ac_pwd=`pwd` && test -n "$ac_pwd" &&
1247ac_ls_di=`ls -di .` &&
1248ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001249 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001251 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252
1253
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254# Find the source files, if location was not specified.
1255if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 ac_confdir=`$as_dirname -- "$as_myself" ||
1259$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1260 X"$as_myself" : 'X\(//\)[^/]' \| \
1261 X"$as_myself" : 'X\(//\)$' \| \
1262 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1263$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)[^/].*/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)$/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\).*/{
1277 s//\1/
1278 q
1279 }
1280 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283 srcdir=..
1284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285else
1286 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288if test ! -r "$srcdir/$ac_unique_file"; then
1289 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001290 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1293ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001294 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 pwd)`
1296# When building in place, set srcdir=.
1297if test "$ac_abs_confdir" = "$ac_pwd"; then
1298 srcdir=.
1299fi
1300# Remove unnecessary trailing slashes from srcdir.
1301# Double slashes in file names in object file debugging info
1302# mess up M-x gdb in Emacs.
1303case $srcdir in
1304*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1305esac
1306for ac_var in $ac_precious_vars; do
1307 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1308 eval ac_env_${ac_var}_value=\$${ac_var}
1309 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1310 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1311done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313#
1314# Report the --help message.
1315#
1316if test "$ac_init_help" = "long"; then
1317 # Omit some internal or obsolete options to make the list less imposing.
1318 # This message is too long to be a string in the A/UX 3.1 sh.
1319 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001320\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001321
1322Usage: $0 [OPTION]... [VAR=VALUE]...
1323
1324To assign environment variables (e.g., CC, CFLAGS...), specify them as
1325VAR=VALUE. See below for descriptions of some of the useful variables.
1326
1327Defaults for the options are specified in brackets.
1328
1329Configuration:
1330 -h, --help display this help and exit
1331 --help=short display options specific to this package
1332 --help=recursive display the short help of all the included packages
1333 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001334 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001335 --cache-file=FILE cache test results in FILE [disabled]
1336 -C, --config-cache alias for \`--cache-file=config.cache'
1337 -n, --no-create do not create output files
1338 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340Installation directories:
1341 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001343 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001345
1346By default, \`make install' will install all the files in
1347\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1348an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1349for instance \`--prefix=\$HOME'.
1350
1351For better control, use the options below.
1352
1353Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001354 --bindir=DIR user executables [EPREFIX/bin]
1355 --sbindir=DIR system admin executables [EPREFIX/sbin]
1356 --libexecdir=DIR program executables [EPREFIX/libexec]
1357 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1358 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1359 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1360 --libdir=DIR object code libraries [EPREFIX/lib]
1361 --includedir=DIR C header files [PREFIX/include]
1362 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1363 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1364 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1365 --infodir=DIR info documentation [DATAROOTDIR/info]
1366 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1367 --mandir=DIR man documentation [DATAROOTDIR/man]
1368 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1369 --htmldir=DIR html documentation [DOCDIR]
1370 --dvidir=DIR dvi documentation [DOCDIR]
1371 --pdfdir=DIR pdf documentation [DOCDIR]
1372 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001373_ACEOF
1374
1375 cat <<\_ACEOF
1376_ACEOF
1377fi
1378
1379if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001380 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001381 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001382 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 cat <<\_ACEOF
1384
1385Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001386 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1388 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001389 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001390 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001391 --enable-framework[=INSTALLDIR]
1392 Build (MacOSX|Darwin) framework
1393 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001394 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001395 --enable-loadable-sqlite-extensions
1396 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397 --enable-ipv6 Enable ipv6 (with ipv4) support
1398 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001399 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001400 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Optional Packages:
1403 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1404 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001405 --with-universal-archs=ARCH
1406 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001407 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001408 --with-framework-name=FRAMEWORK
1409 specify an alternate name of the framework built
1410 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001412 --with-cxx-main=<compiler>
1413 compile main() and link python executable with C++
1414 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-suffix=.exe set executable suffix
1416 --with-pydebug build with Py_DEBUG defined
1417 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001418 --with-system-expat build pyexpat module using an installed expat
1419 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001420 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001421 --with-dbmliborder=db1:db2:...
1422 order to check db backends for dbm. Valid value is a
1423 colon separated string with the backend names
1424 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-signal-module disable/enable signal module
1426 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1427 --with(out)-threads[=DIRECTORY]
1428 disable/enable thread support
1429 --with(out)-thread[=DIRECTORY]
1430 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001432 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001434 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with-fpectl enable SIGFPE catching
1436 --with-libm=STRING math library
1437 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001438 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001439 --with(out)-computed-gotos
1440 Use computed gotos in evaluation loop (enabled by
1441 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
1443Some influential environment variables:
1444 CC C compiler command
1445 CFLAGS C compiler flags
1446 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1447 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 CPP C preprocessor
1452
1453Use these variables to override the choices made by `configure' or to help
1454it to find libraries and programs with nonstandard names/locations.
1455
Georg Brandle2e15612009-05-20 18:25:10 +00001456Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001459fi
1460
1461if test "$ac_init_help" = "recursive"; then
1462 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 test -d "$ac_dir" ||
1465 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1466 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 ac_builddir=.
1468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469case "$ac_dir" in
1470.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 case $ac_top_builddir_sub in
1476 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1477 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1478 esac ;;
1479esac
1480ac_abs_top_builddir=$ac_pwd
1481ac_abs_builddir=$ac_pwd$ac_dir_suffix
1482# for backward compatibility:
1483ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 ac_top_srcdir=$ac_top_builddir_sub
1489 ac_abs_top_srcdir=$ac_pwd ;;
1490 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 ac_top_srcdir=$srcdir
1493 ac_abs_top_srcdir=$srcdir ;;
1494 *) # Relative name.
1495 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1496 ac_top_srcdir=$ac_top_build_prefix$srcdir
1497 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001498esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 cd "$ac_dir" || { ac_status=$?; continue; }
1502 # Check for guested configure.
1503 if test -f "$ac_srcdir/configure.gnu"; then
1504 echo &&
1505 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1506 elif test -f "$ac_srcdir/configure"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001510 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 fi || ac_status=$?
1512 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 done
1514fi
1515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001517if $ac_init_version; then
1518 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001519python configure 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001520generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001521
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001522Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523This configure script is free software; the Free Software Foundation
1524gives unlimited permission to copy, distribute and modify it.
1525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001528
1529## ------------------------ ##
1530## Autoconf initialization. ##
1531## ------------------------ ##
1532
1533# ac_fn_c_try_compile LINENO
1534# --------------------------
1535# Try to compile conftest.$ac_ext, and return whether this succeeded.
1536ac_fn_c_try_compile ()
1537{
1538 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1539 rm -f conftest.$ac_objext
1540 if { { ac_try="$ac_compile"
1541case "(($ac_try" in
1542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1543 *) ac_try_echo=$ac_try;;
1544esac
1545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1546$as_echo "$ac_try_echo"; } >&5
1547 (eval "$ac_compile") 2>conftest.err
1548 ac_status=$?
1549 if test -s conftest.err; then
1550 grep -v '^ *+' conftest.err >conftest.er1
1551 cat conftest.er1 >&5
1552 mv -f conftest.er1 conftest.err
1553 fi
1554 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1555 test $ac_status = 0; } && {
1556 test -z "$ac_c_werror_flag" ||
1557 test ! -s conftest.err
1558 } && test -s conftest.$ac_objext; then :
1559 ac_retval=0
1560else
1561 $as_echo "$as_me: failed program was:" >&5
1562sed 's/^/| /' conftest.$ac_ext >&5
1563
1564 ac_retval=1
1565fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001566 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 as_fn_set_status $ac_retval
1568
1569} # ac_fn_c_try_compile
1570
1571# ac_fn_c_try_cpp LINENO
1572# ----------------------
1573# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1574ac_fn_c_try_cpp ()
1575{
1576 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1577 if { { ac_try="$ac_cpp conftest.$ac_ext"
1578case "(($ac_try" in
1579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580 *) ac_try_echo=$ac_try;;
1581esac
1582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583$as_echo "$ac_try_echo"; } >&5
1584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1585 ac_status=$?
1586 if test -s conftest.err; then
1587 grep -v '^ *+' conftest.err >conftest.er1
1588 cat conftest.er1 >&5
1589 mv -f conftest.er1 conftest.err
1590 fi
1591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001592 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1594 test ! -s conftest.err
1595 }; then :
1596 ac_retval=0
1597else
1598 $as_echo "$as_me: failed program was:" >&5
1599sed 's/^/| /' conftest.$ac_ext >&5
1600
1601 ac_retval=1
1602fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001603 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 as_fn_set_status $ac_retval
1605
1606} # ac_fn_c_try_cpp
1607
1608# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1609# -------------------------------------------------------
1610# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1611# the include files in INCLUDES and setting the cache variable VAR
1612# accordingly.
1613ac_fn_c_check_header_mongrel ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001616 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1618$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001619if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo_n "(cached) " >&6
1621fi
1622eval ac_res=\$$3
1623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1624$as_echo "$ac_res" >&6; }
1625else
1626 # Is the header compilable?
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1628$as_echo_n "checking $2 usability... " >&6; }
1629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1630/* end confdefs.h. */
1631$4
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_compile "$LINENO"; then :
1635 ac_header_compiler=yes
1636else
1637 ac_header_compiler=no
1638fi
1639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1641$as_echo "$ac_header_compiler" >&6; }
1642
1643# Is the header present?
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1645$as_echo_n "checking $2 presence... " >&6; }
1646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1647/* end confdefs.h. */
1648#include <$2>
1649_ACEOF
1650if ac_fn_c_try_cpp "$LINENO"; then :
1651 ac_header_preproc=yes
1652else
1653 ac_header_preproc=no
1654fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001655rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1657$as_echo "$ac_header_preproc" >&6; }
1658
1659# So? What about this header?
1660case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1661 yes:no: )
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1663$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1666 ;;
1667 no:yes:* )
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1669$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1671$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1673$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1675$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001678( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001679## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001680## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 ) | sed "s/^/$as_me: WARNING: /" >&2
1682 ;;
1683esac
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1685$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001686if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 $as_echo_n "(cached) " >&6
1688else
1689 eval "$3=\$ac_header_compiler"
1690fi
1691eval ac_res=\$$3
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1693$as_echo "$ac_res" >&6; }
1694fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001696
1697} # ac_fn_c_check_header_mongrel
1698
1699# ac_fn_c_try_run LINENO
1700# ----------------------
1701# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1702# that executables *can* be run.
1703ac_fn_c_try_run ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1706 if { { ac_try="$ac_link"
1707case "(($ac_try" in
1708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1709 *) ac_try_echo=$ac_try;;
1710esac
1711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1712$as_echo "$ac_try_echo"; } >&5
1713 (eval "$ac_link") 2>&5
1714 ac_status=$?
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1717 { { case "(($ac_try" in
1718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719 *) ac_try_echo=$ac_try;;
1720esac
1721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722$as_echo "$ac_try_echo"; } >&5
1723 (eval "$ac_try") 2>&5
1724 ac_status=$?
1725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726 test $ac_status = 0; }; }; then :
1727 ac_retval=0
1728else
1729 $as_echo "$as_me: program exited with status $ac_status" >&5
1730 $as_echo "$as_me: failed program was:" >&5
1731sed 's/^/| /' conftest.$ac_ext >&5
1732
1733 ac_retval=$ac_status
1734fi
1735 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001736 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001737 as_fn_set_status $ac_retval
1738
1739} # ac_fn_c_try_run
1740
1741# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1742# -------------------------------------------------------
1743# Tests whether HEADER exists and can be compiled using the include files in
1744# INCLUDES, setting the cache variable VAR accordingly.
1745ac_fn_c_check_header_compile ()
1746{
1747 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1749$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001750if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 $as_echo_n "(cached) " >&6
1752else
1753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1754/* end confdefs.h. */
1755$4
1756#include <$2>
1757_ACEOF
1758if ac_fn_c_try_compile "$LINENO"; then :
1759 eval "$3=yes"
1760else
1761 eval "$3=no"
1762fi
1763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1764fi
1765eval ac_res=\$$3
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769
1770} # ac_fn_c_check_header_compile
1771
1772# ac_fn_c_try_link LINENO
1773# -----------------------
1774# Try to link conftest.$ac_ext, and return whether this succeeded.
1775ac_fn_c_try_link ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 rm -f conftest.$ac_objext conftest$ac_exeext
1779 if { { ac_try="$ac_link"
1780case "(($ac_try" in
1781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1782 *) ac_try_echo=$ac_try;;
1783esac
1784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1785$as_echo "$ac_try_echo"; } >&5
1786 (eval "$ac_link") 2>conftest.err
1787 ac_status=$?
1788 if test -s conftest.err; then
1789 grep -v '^ *+' conftest.err >conftest.er1
1790 cat conftest.er1 >&5
1791 mv -f conftest.er1 conftest.err
1792 fi
1793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794 test $ac_status = 0; } && {
1795 test -z "$ac_c_werror_flag" ||
1796 test ! -s conftest.err
1797 } && test -s conftest$ac_exeext && {
1798 test "$cross_compiling" = yes ||
1799 $as_test_x conftest$ac_exeext
1800 }; then :
1801 ac_retval=0
1802else
1803 $as_echo "$as_me: failed program was:" >&5
1804sed 's/^/| /' conftest.$ac_ext >&5
1805
1806 ac_retval=1
1807fi
1808 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1809 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1810 # interfere with the next link command; also delete a directory that is
1811 # left behind by Apple's compiler. We do this before executing the actions.
1812 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001813 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 as_fn_set_status $ac_retval
1815
1816} # ac_fn_c_try_link
1817
1818# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1819# -------------------------------------------
1820# Tests whether TYPE exists after having included INCLUDES, setting cache
1821# variable VAR accordingly.
1822ac_fn_c_check_type ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1826$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001827if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001828 $as_echo_n "(cached) " >&6
1829else
1830 eval "$3=no"
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof ($2))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846$4
1847int
1848main ()
1849{
1850if (sizeof (($2)))
1851 return 0;
1852 ;
1853 return 0;
1854}
1855_ACEOF
1856if ac_fn_c_try_compile "$LINENO"; then :
1857
1858else
1859 eval "$3=yes"
1860fi
1861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865eval ac_res=\$$3
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1867$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001868 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001869
1870} # ac_fn_c_check_type
1871
1872# ac_fn_c_find_uintX_t LINENO BITS VAR
1873# ------------------------------------
1874# Finds an unsigned integer type with width BITS, setting cache variable VAR
1875# accordingly.
1876ac_fn_c_find_uintX_t ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1880$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001881if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001882 $as_echo_n "(cached) " >&6
1883else
1884 eval "$3=no"
1885 # Order is important - never check a type that is potentially smaller
1886 # than half of the expected target width.
1887 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1888 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890/* end confdefs.h. */
1891$ac_includes_default
1892int
1893main ()
1894{
1895static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1896test_array [0] = 0
1897
1898 ;
1899 return 0;
1900}
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 case $ac_type in #(
1904 uint$2_t) :
1905 eval "$3=yes" ;; #(
1906 *) :
1907 eval "$3=\$ac_type" ;;
1908esac
1909fi
1910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001911 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912
1913else
1914 break
1915fi
1916 done
1917fi
1918eval ac_res=\$$3
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923} # ac_fn_c_find_uintX_t
1924
1925# ac_fn_c_find_intX_t LINENO BITS VAR
1926# -----------------------------------
1927# Finds a signed integer type with width BITS, setting cache variable VAR
1928# accordingly.
1929ac_fn_c_find_intX_t ()
1930{
1931 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1933$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001934if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935 $as_echo_n "(cached) " >&6
1936else
1937 eval "$3=no"
1938 # Order is important - never check a type that is potentially smaller
1939 # than half of the expected target width.
1940 for ac_type in int$2_t 'int' 'long int' \
1941 'long long int' 'short int' 'signed char'; do
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001945 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001946int
1947main ()
1948{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001949static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001950test_array [0] = 0
1951
1952 ;
1953 return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001960 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001961int
1962main ()
1963{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001964static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001965 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1966test_array [0] = 0
1967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 case $ac_type in #(
1976 int$2_t) :
1977 eval "$3=yes" ;; #(
1978 *) :
1979 eval "$3=\$ac_type" ;;
1980esac
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001985 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987else
1988 break
1989fi
1990 done
1991fi
1992eval ac_res=\$$3
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997} # ac_fn_c_find_intX_t
1998
1999# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2000# --------------------------------------------
2001# Tries to find the compile-time value of EXPR in a program that includes
2002# INCLUDES, setting VAR accordingly. Returns whether the value could be
2003# computed
2004ac_fn_c_compute_int ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 if test "$cross_compiling" = yes; then
2008 # Depending upon the size, compute the lo and hi bounds.
2009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) >= 0)];
2016test_array [0] = 0
2017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2032test_array [0] = 0
2033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=$ac_mid; break
2040else
2041 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2042 if test $ac_lo -le $ac_mid; then
2043 ac_lo= ac_hi=
2044 break
2045 fi
2046 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 done
2050else
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) < 0)];
2058test_array [0] = 0
2059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2074test_array [0] = 0
2075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=$ac_mid; break
2082else
2083 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084 if test $ac_mid -le $ac_hi; then
2085 ac_lo= ac_hi=
2086 break
2087 fi
2088 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 done
2092else
2093 ac_lo= ac_hi=
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098# Binary search between lo and hi bounds.
2099while test "x$ac_lo" != "x$ac_hi"; do
2100 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2108test_array [0] = 0
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_hi=$ac_mid
2116else
2117 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120done
2121case $ac_lo in #((
2122?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2123'') ac_retval=1 ;;
2124esac
2125 else
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129static long int longval () { return $2; }
2130static unsigned long int ulongval () { return $2; }
2131#include <stdio.h>
2132#include <stdlib.h>
2133int
2134main ()
2135{
2136
2137 FILE *f = fopen ("conftest.val", "w");
2138 if (! f)
2139 return 1;
2140 if (($2) < 0)
2141 {
2142 long int i = longval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%ld", i);
2146 }
2147 else
2148 {
2149 unsigned long int i = ulongval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%lu", i);
2153 }
2154 /* Do not output a trailing newline, as this causes \r\n confusion
2155 on some platforms. */
2156 return ferror (f) || fclose (f) != 0;
2157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_run "$LINENO"; then :
2163 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2164else
2165 ac_retval=1
2166fi
2167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2168 conftest.$ac_objext conftest.beam conftest.$ac_ext
2169rm -f conftest.val
2170
2171 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002172 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002173 as_fn_set_status $ac_retval
2174
2175} # ac_fn_c_compute_int
2176
2177# ac_fn_c_check_func LINENO FUNC VAR
2178# ----------------------------------
2179# Tests whether FUNC exists, setting the cache variable VAR accordingly
2180ac_fn_c_check_func ()
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002185if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002186 $as_echo_n "(cached) " >&6
2187else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2192#define $2 innocuous_$2
2193
2194/* System header to define __stub macros and hopefully few prototypes,
2195 which can conflict with char $2 (); below.
2196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2197 <limits.h> exists even on freestanding compilers. */
2198
2199#ifdef __STDC__
2200# include <limits.h>
2201#else
2202# include <assert.h>
2203#endif
2204
2205#undef $2
2206
2207/* Override any GCC internal prototype to avoid an error.
2208 Use char because int might match the return type of a GCC
2209 builtin and then its argument prototype would still apply. */
2210#ifdef __cplusplus
2211extern "C"
2212#endif
2213char $2 ();
2214/* The GNU C library defines this for functions which it implements
2215 to always fail with ENOSYS. Some functions are actually named
2216 something starting with __ and the normal name is an alias. */
2217#if defined __stub_$2 || defined __stub___$2
2218choke me
2219#endif
2220
2221int
2222main ()
2223{
2224return $2 ();
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_link "$LINENO"; then :
2230 eval "$3=yes"
2231else
2232 eval "$3=no"
2233fi
2234rm -f core conftest.err conftest.$ac_objext \
2235 conftest$ac_exeext conftest.$ac_ext
2236fi
2237eval ac_res=\$$3
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002241
2242} # ac_fn_c_check_func
2243
2244# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2245# ----------------------------------------------------
2246# Tries to find if the field MEMBER exists in type AGGR, after including
2247# INCLUDES, setting cache variable VAR accordingly.
2248ac_fn_c_check_member ()
2249{
2250 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2252$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002253if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002254 $as_echo_n "(cached) " >&6
2255else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$5
2259int
2260main ()
2261{
2262static $2 ac_aggr;
2263if (ac_aggr.$3)
2264return 0;
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$4=yes"
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274$5
2275int
2276main ()
2277{
2278static $2 ac_aggr;
2279if (sizeof ac_aggr.$3)
2280return 0;
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 eval "$4=yes"
2287else
2288 eval "$4=no"
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294eval ac_res=\$$4
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2296$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002297 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002298
2299} # ac_fn_c_check_member
2300
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002301# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2302# ---------------------------------------------
2303# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2304# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002305ac_fn_c_check_decl ()
2306{
2307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002308 as_decl_name=`echo $2|sed 's/ *(.*//'`
2309 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2311$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2312if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002313 $as_echo_n "(cached) " >&6
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$4
2318int
2319main ()
2320{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002321#ifndef $as_decl_name
2322#ifdef __cplusplus
2323 (void) $as_decl_use;
2324#else
2325 (void) $as_decl_name;
2326#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002327#endif
2328
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$3=yes"
2335else
2336 eval "$3=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$3
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002343 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002344
2345} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002347This file contains any messages produced by compilers while
2348running configure, to aid debugging if configure makes a mistake.
2349
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002350It was created by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002351generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002352
2353 $ $0 $@
2354
2355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002357{
2358cat <<_ASUNAME
2359## --------- ##
2360## Platform. ##
2361## --------- ##
2362
2363hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2364uname -m = `(uname -m) 2>/dev/null || echo unknown`
2365uname -r = `(uname -r) 2>/dev/null || echo unknown`
2366uname -s = `(uname -s) 2>/dev/null || echo unknown`
2367uname -v = `(uname -v) 2>/dev/null || echo unknown`
2368
2369/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2370/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2371
2372/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2373/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2374/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002376/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2377/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2378/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2379
2380_ASUNAME
2381
2382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2383for as_dir in $PATH
2384do
2385 IFS=$as_save_IFS
2386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002387 $as_echo "PATH: $as_dir"
2388 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002390
2391} >&5
2392
2393cat >&5 <<_ACEOF
2394
2395
2396## ----------- ##
2397## Core tests. ##
2398## ----------- ##
2399
2400_ACEOF
2401
2402
2403# Keep a trace of the command line.
2404# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_configure_args0=
2410ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_must_keep_next=false
2412for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002413do
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 for ac_arg
2415 do
2416 case $ac_arg in
2417 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2418 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2419 | -silent | --silent | --silen | --sile | --sil)
2420 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002421 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 esac
2424 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 case $ac_arg in
2432 *=* | --config-cache | -C | -disable-* | --disable-* \
2433 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2434 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2435 | -with-* | --with-* | -without-* | --without-* | --x)
2436 case "$ac_configure_args0 " in
2437 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2438 esac
2439 ;;
2440 -* ) ac_must_keep_next=true ;;
2441 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 ;;
2445 esac
2446 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002447done
Matthias Kloseb9621712010-04-24 17:59:49 +00002448{ ac_configure_args0=; unset ac_configure_args0;}
2449{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451# When interrupted or exit'd, cleanup temporary files, and complete
2452# config.log. We remove comments because anyway the quotes in there
2453# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454# WARNING: Use '\'' to represent an apostrophe within the trap.
2455# 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 +00002456trap 'exit_status=$?
2457 # Save into config.log some information that might help in debugging.
2458 {
2459 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002460
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002461 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002462## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002463## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 echo
2465 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466(
2467 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2468 eval ac_val=\$$ac_var
2469 case $ac_val in #(
2470 *${as_nl}*)
2471 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2473$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac
2475 case $ac_var in #(
2476 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2478 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 esac ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2484 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 "s/'\''/'\''\\\\'\'''\''/g;
2487 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2488 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002489 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac |
2493 sort
2494)
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002496
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002497 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002498## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002499## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 echo
2501 for ac_var in $ac_subst_vars
2502 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 eval ac_val=\$$ac_var
2504 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 done | sort
2509 echo
2510
2511 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002512 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002514## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 echo
2516 for ac_var in $ac_subst_files
2517 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 eval ac_val=\$$ac_var
2519 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 done | sort
2524 echo
2525 fi
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002528 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002529## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002530## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
2534 fi
2535 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$as_me: caught signal $ac_signal"
2537 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 rm -f core *.core core.conftest.* &&
2540 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002543for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
2546ac_signal=0
2547
2548# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551$as_echo "/* confdefs.h */" > confdefs.h
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553# Predefined preprocessor variables.
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_NAME "$PACKAGE_NAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_STRING "$PACKAGE_STRING"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573_ACEOF
2574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_URL "$PACKAGE_URL"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002581# Prefer an explicitly selected file to automatically selected ones.
2582ac_site_file1=NONE
2583ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002585 # We do not want a PATH search for config.site.
2586 case $CONFIG_SITE in #((
2587 -*) ac_site_file1=./$CONFIG_SITE;;
2588 */*) ac_site_file1=$CONFIG_SITE;;
2589 *) ac_site_file1=./$CONFIG_SITE;;
2590 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 ac_site_file1=$prefix/share/config.site
2593 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594else
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$ac_default_prefix/share/config.site
2596 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002598for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599do
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 test "x$ac_site_file" = xNONE && continue
2601 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2603$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002605 . "$ac_site_file" \
2606 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2608as_fn_error $? "failed to load site script $ac_site_file
2609See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610 fi
2611done
2612
2613if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 # Some versions of bash will fail to source /dev/null (special files
2615 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2616 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2618$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2621 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 esac
2623 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624else
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2626$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 >$cache_file
2628fi
2629
2630# Check that the precious variables saved in the cache have kept the same
2631# value.
2632ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2635 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2637 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 case $ac_old_set,$ac_new_set in
2639 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2641$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 +00002642 ac_cache_corrupted=: ;;
2643 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_cache_corrupted=: ;;
2647 ,);;
2648 *)
2649 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 # differences in whitespace do not lead to failure.
2651 ac_old_val_w=`echo x $ac_old_val`
2652 ac_new_val_w=`echo x $ac_new_val`
2653 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2655$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2656 ac_cache_corrupted=:
2657 else
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2659$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2660 eval $ac_var=\$ac_old_val
2661 fi
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2663$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2665$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 fi;;
2667 esac
2668 # Pass precious variables to config.status.
2669 if test "$ac_new_set" = set; then
2670 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 *) ac_arg=$ac_var=$ac_new_val ;;
2673 esac
2674 case " $ac_configure_args " in
2675 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
2679done
2680if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2684$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002685 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687## -------------------- ##
2688## Main body of script. ##
2689## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690
Guido van Rossum7f43da71994-08-01 12:15:30 +00002691ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696
Guido van Rossum627b2d71993-12-24 10:39:16 +00002697
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
Benjamin Petersond23f8222009-04-05 19:13:16 +00002703if test "$prefix" != "/"; then
2704 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2705fi
2706
2707
Martin v. Löwis11437992002-04-12 09:54:03 +00002708
2709
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002710# We don't use PACKAGE_ variables, and they cause conflicts
2711# with other autoconf-based packages that include Python.h
2712grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2713rm confdefs.h
2714mv confdefs.h.new confdefs.h
2715
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002716
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002717VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002718
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002719# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002720
2721SOVERSION=1.0
2722
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002723# The later defininition of _XOPEN_SOURCE disables certain features
2724# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2725
Matthias Kloseb9621712010-04-24 17:59:49 +00002726$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002727
2728
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2731# them.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002734
2735
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002741
2742
Martin v. Löwisd6320502004-08-12 13:45:08 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2745
Matthias Kloseb9621712010-04-24 17:59:49 +00002746$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002747
2748
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002749# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2750# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2751# them.
2752
Matthias Kloseb9621712010-04-24 17:59:49 +00002753$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002754
2755
2756
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002757define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002758
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002759# Arguments passed to configure.
2760
2761CONFIG_ARGS="$ac_configure_args"
2762
Matthias Kloseb9621712010-04-24 17:59:49 +00002763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2764$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002766if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002768 case $enableval in
2769 yes)
2770 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771 if test ! -d "${enableval}"
2772 then
2773 enableval=/
2774 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 ;;
2776 esac
2777 case $enableval in
2778 no)
2779 UNIVERSALSDK=
2780 enable_universalsdk=
2781 ;;
2782 *)
2783 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784 if test ! -d "${UNIVERSALSDK}"
2785 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002786 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788 ;;
2789 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002790
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792else
2793
2794 UNIVERSALSDK=
2795 enable_universalsdk=
2796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002797fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002799if test -n "${UNIVERSALSDK}"
2800then
Matthias Kloseb9621712010-04-24 17:59:49 +00002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2802$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002803else
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002809
2810
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002811UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2814$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002817if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2820$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821 UNIVERSAL_ARCHS="$withval"
2822
2823else
2824
Matthias Kloseb9621712010-04-24 17:59:49 +00002825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2826$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002827
2828fi
2829
2830
2831
2832
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002833
2834# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002835if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002836 withval=$with_framework_name;
2837 PYTHONFRAMEWORK=${withval}
2838 PYTHONFRAMEWORKDIR=${withval}.framework
2839 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2840
2841else
2842
2843 PYTHONFRAMEWORK=Python
2844 PYTHONFRAMEWORKDIR=Python.framework
2845 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2846
2847fi
2848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002849# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002850if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002852 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002853 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002854 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002855 esac
2856 case $enableval in
2857 no)
2858 PYTHONFRAMEWORK=
2859 PYTHONFRAMEWORKDIR=no-framework
2860 PYTHONFRAMEWORKPREFIX=
2861 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002862 FRAMEWORKINSTALLFIRST=
2863 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 FRAMEWORKALTINSTALLFIRST=
2865 FRAMEWORKALTINSTALLLAST=
2866 if test "x${prefix}" = "xNONE"; then
2867 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2868 else
2869 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2870 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002871 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002872 ;;
2873 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002875 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002876 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002877 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002878 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2879 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002881
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002882 if test "x${prefix}" = "xNONE" ; then
2883 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002884
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002885 else
2886 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2887 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002888
2889 case "${enableval}" in
2890 /System*)
2891 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2892 if test "${prefix}" = "NONE" ; then
2893 # See below
2894 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2895 fi
2896 ;;
2897
2898 /Library*)
2899 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2900 ;;
2901
2902 */Library/Frameworks)
2903 MDIR="`dirname "${enableval}"`"
2904 MDIR="`dirname "${MDIR}"`"
2905 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2906
2907 if test "${prefix}" = "NONE"; then
2908 # User hasn't specified the
2909 # --prefix option, but wants to install
2910 # the framework in a non-default location,
2911 # ensure that the compatibility links get
2912 # installed relative to that prefix as well
2913 # instead of in /usr/local.
2914 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2915 fi
2916 ;;
2917
2918 *)
2919 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2920 ;;
2921 esac
2922
Jack Jansen127e56e2001-09-11 14:41:54 +00002923 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002925 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002926 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002929 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002931 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2932
2933 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2934
Jack Jansene578a632001-08-15 01:27:14 +00002935 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Guido van Rossum563e7081996-09-10 18:20:48 +00002937else
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Jack Jansene578a632001-08-15 01:27:14 +00002939 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002940 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002941 PYTHONFRAMEWORKPREFIX=
2942 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002943 FRAMEWORKINSTALLFIRST=
2944 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945 FRAMEWORKALTINSTALLFIRST=
2946 FRAMEWORKALTINSTALLLAST=
2947 if test "x${prefix}" = "xNONE" ; then
2948 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2949 else
2950 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2951 fi
Jack Jansene578a632001-08-15 01:27:14 +00002952 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002953
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002955fi
2956
Thomas Wouters477c8d52006-05-27 19:21:47 +00002957
2958
Michael W. Hudson54241132001-12-07 15:38:26 +00002959
2960
2961
2962
Jack Jansene578a632001-08-15 01:27:14 +00002963
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002964
2965
2966
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002967
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002968
Jack Jansene578a632001-08-15 01:27:14 +00002969##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002970## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002971## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002972##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973# Set name for machine-dependent library files
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2976$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977if test -z "$MACHDEP"
2978then
Guido van Rossum563e7081996-09-10 18:20:48 +00002979 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002980 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002981 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002982 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002983 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_md_system=`echo $ac_sys_system |
2987 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2988 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002989 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002990 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002991
Guido van Rossum07397971997-04-29 21:49:50 +00002992 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002993 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002994 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002995 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002996 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002997 esac
2998fi
Guido van Rossum91922671997-10-09 20:24:13 +00002999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3001# disable features if it is defined, without any means to access these
3002# features as extensions. For these systems, we skip the definition of
3003# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3004# some feature, make sure there is no alternative way to access this
3005# feature. Also, when using wildcards, make sure you have verified the
3006# need for not defining _XOPEN_SOURCE on all systems matching the
3007# wildcard, and that the wildcard does not include future systems
3008# (which may remove their limitations).
3009case $ac_sys_system/$ac_sys_release in
3010 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3011 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003012 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003013 # In addition, Stefan Krah confirms that issue #1244610 exists through
3014 # OpenBSD 4.6, but is fixed in 4.7.
3015 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003016 define_xopen_source=no
3017 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3018 # also defined. This can be overridden by defining _BSD_SOURCE
3019 # As this has a different meaning on Linux, only define it on OpenBSD
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003022
3023 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003024 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003025 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3026 # also defined. This can be overridden by defining _BSD_SOURCE
3027 # As this has a different meaning on Linux, only define it on OpenBSD
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003030
3031 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003032 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3033 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3034 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003035 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 +00003036 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003037 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3038 # request to enable features supported by the standard as a request
3039 # to disable features not supported by the standard. The best way
3040 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3041 # entirely and define __EXTENSIONS__ instead.
3042 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003043 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003044 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3045 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003046 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003047 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 define_xopen_source=no;;
3049 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003050 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003052 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003053 # On FreeBSD 4, the math functions C89 does not cover are never defined
3054 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3055 FreeBSD/4.*)
3056 define_xopen_source=no;;
3057 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3058 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3059 # identifies itself as Darwin/7.*
3060 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3061 # disables platform specific features beyond repair.
3062 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3063 # has no effect, don't bother defining them
3064 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003065 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003066 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003067 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003068 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3069 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3070 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003071 AIX/4)
3072 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003073 AIX/5)
3074 if test `uname -r` -eq 1; then
3075 define_xopen_source=no
3076 fi
3077 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003078 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3079 # defining NI_NUMERICHOST.
3080 QNX/6.3.2)
3081 define_xopen_source=no
3082 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003083
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084esac
3085
3086if test $define_xopen_source = yes
3087then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
3092 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3093 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3094 # several APIs are not declared. Since this is also needed in some
3095 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003104fi
3105
Guido van Rossum91922671997-10-09 20:24:13 +00003106#
3107# SGI compilers allow the specification of the both the ABI and the
3108# ISA on the command line. Depending on the values of these switches,
3109# different and often incompatable code will be generated.
3110#
3111# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3112# thus supply support for various ABI/ISA combinations. The MACHDEP
3113# variable is also adjusted.
3114#
3115
3116if test ! -z "$SGI_ABI"
3117then
3118 CC="cc $SGI_ABI"
3119 LDFLAGS="$SGI_ABI $LDFLAGS"
3120 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3123$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003124
Jack Jansen6b08a402004-06-03 12:41:45 +00003125# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3126# it may influence the way we can build extensions, so distutils
3127# needs to check it
3128
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129
Jack Jansen6b08a402004-06-03 12:41:45 +00003130CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003132
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3134$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003135ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3137$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003138
Guido van Rossum627b2d71993-12-24 10:39:16 +00003139# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003140
3141# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3142# for debug/optimization stuff. BASECFLAGS is for flags that are required
3143# just to get things to compile and link. Users are free to override OPT
3144# when running configure or make. The build should not break if they do.
3145# BASECFLAGS should generally not be messed with, however.
3146
3147# XXX shouldn't some/most/all of this code be merged with the stuff later
3148# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3150$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003153if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003155 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003156 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003157 without_gcc=yes;;
3158 yes) CC=gcc
3159 without_gcc=no;;
3160 *) CC=$withval
3161 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003165 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003166 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003167 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003168 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170fi
3171
Matthias Kloseb9621712010-04-24 17:59:49 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3173$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003174
Guido van Rossum8b131c51995-03-09 14:10:13 +00003175# If the user switches compilers, we can't believe the cache
3176if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3177then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003178 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003179(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003180fi
3181
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003182# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3183# when the compiler supports them, but we don't always want -O2, and
3184# we set -g later.
3185if test -z "$CFLAGS"; then
3186 CFLAGS=
3187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
3193if test -n "$ac_tool_prefix"; then
3194 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3195set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003198if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003200else
3201 if test -n "$CC"; then
3202 ac_cv_prog_CC="$CC" # Let the user override the test.
3203else
Martin v. Löwis11437992002-04-12 09:54:03 +00003204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205for as_dir in $PATH
3206do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 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 +00003211 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 $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 +00003213 break 2
3214 fi
3215done
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
Jack Jansendd19cf82001-12-06 22:36:17 +00003219fi
3220fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003221CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003222if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003225else
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003228fi
3229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230
Martin v. Löwis11437992002-04-12 09:54:03 +00003231fi
3232if test -z "$ac_cv_prog_CC"; then
3233 ac_ct_CC=$CC
3234 # Extract the first word of "gcc", so it can be a program name with args.
3235set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3237$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003238if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003240else
3241 if test -n "$ac_ct_CC"; then
3242 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3243else
3244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in $PATH
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003250 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 +00003251 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 $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 +00003253 break 2
3254 fi
3255done
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003258
3259fi
3260fi
3261ac_ct_CC=$ac_cv_prog_ac_ct_CC
3262if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3264$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003265else
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3267$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003268fi
3269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003270 if test "x$ac_ct_CC" = x; then
3271 CC=""
3272 else
3273 case $cross_compiling:$ac_tool_warned in
3274yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277ac_tool_warned=yes ;;
3278esac
3279 CC=$ac_ct_CC
3280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281else
3282 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003283fi
3284
Jack Jansendd19cf82001-12-06 22:36:17 +00003285if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286 if test -n "$ac_tool_prefix"; then
3287 # 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 +00003288set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003291if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003293else
3294 if test -n "$CC"; then
3295 ac_cv_prog_CC="$CC" # Let the user override the test.
3296else
Martin v. Löwis11437992002-04-12 09:54:03 +00003297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3298for as_dir in $PATH
3299do
3300 IFS=$as_save_IFS
3301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303 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 +00003304 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 $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 +00003306 break 2
3307 fi
3308done
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003311
3312fi
3313fi
3314CC=$ac_cv_prog_CC
3315if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3317$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003318else
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3320$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321fi
3322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323
Martin v. Löwis11437992002-04-12 09:54:03 +00003324 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326if test -z "$CC"; then
3327 # Extract the first word of "cc", so it can be a program name with args.
3328set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3330$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003331if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003333else
3334 if test -n "$CC"; then
3335 ac_cv_prog_CC="$CC" # Let the user override the test.
3336else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3339for as_dir in $PATH
3340do
3341 IFS=$as_save_IFS
3342 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003343 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344 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 +00003345 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3346 ac_prog_rejected=yes
3347 continue
3348 fi
3349 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003350 $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 +00003351 break 2
3352 fi
3353done
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003356
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003357if test $ac_prog_rejected = yes; then
3358 # We found a bogon in the path, so make sure we never use it.
3359 set dummy $ac_cv_prog_CC
3360 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362 # We chose a different compiler from the bogus one.
3363 # However, it has the same basename, so the bogon will be chosen
3364 # first if we set CC to just the basename; use the full file name.
3365 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003366 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367 fi
3368fi
3369fi
3370fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003371CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3374$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375else
Matthias Kloseb9621712010-04-24 17:59:49 +00003376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3377$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378fi
3379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381fi
3382if test -z "$CC"; then
3383 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 do
3386 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3389$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003390if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003392else
3393 if test -n "$CC"; then
3394 ac_cv_prog_CC="$CC" # Let the user override the test.
3395else
Martin v. Löwis11437992002-04-12 09:54:03 +00003396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003402 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 +00003403 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 $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 +00003405 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003407done
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
3411fi
3412fi
3413CC=$ac_cv_prog_CC
3414if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3416$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003420fi
3421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 test -n "$CC" && break
3424 done
3425fi
3426if test -z "$CC"; then
3427 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003428 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003429do
3430 # Extract the first word of "$ac_prog", so it can be a program name with args.
3431set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3433$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003434if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003436else
3437 if test -n "$ac_ct_CC"; then
3438 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3439else
3440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441for as_dir in $PATH
3442do
3443 IFS=$as_save_IFS
3444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 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 +00003447 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 $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 +00003449 break 2
3450 fi
3451done
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455fi
3456fi
3457ac_ct_CC=$ac_cv_prog_ac_ct_CC
3458if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3460$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003461else
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3463$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 test -n "$ac_ct_CC" && break
3468done
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 if test "x$ac_ct_CC" = x; then
3471 CC=""
3472 else
3473 case $cross_compiling:$ac_tool_warned in
3474yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477ac_tool_warned=yes ;;
3478esac
3479 CC=$ac_ct_CC
3480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003481fi
3482
3483fi
3484
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003488as_fn_error $? "no acceptable C compiler found in \$PATH
3489See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490
3491# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003492$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3493set X $ac_compile
3494ac_compiler=$2
3495for ac_option in --version -v -V -qversion; do
3496 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003497case "(($ac_try" in
3498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3499 *) ac_try_echo=$ac_try;;
3500esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003501eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3502$as_echo "$ac_try_echo"; } >&5
3503 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003505 if test -s conftest.err; then
3506 sed '10a\
3507... rest of stderr output deleted ...
3508 10q' conftest.err >conftest.er1
3509 cat conftest.er1 >&5
3510 fi
3511 rm -f conftest.er1 conftest.err
3512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3513 test $ac_status = 0; }
3514done
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Matthias Kloseb9621712010-04-24 17:59:49 +00003516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519int
3520main ()
3521{
3522
3523 ;
3524 return 0;
3525}
3526_ACEOF
3527ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003528ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003529# Try to create an executable without -o first, disregard a.out.
3530# It will help us diagnose broken compilers, and finding out an intuition
3531# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3533$as_echo_n "checking whether the C compiler works... " >&6; }
3534ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3535
3536# The possible output files:
3537ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_rmfiles=
3540for ac_file in $ac_files
3541do
3542 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3545 esac
3546done
3547rm -f $ac_rmfiles
3548
Matthias Kloseb9621712010-04-24 17:59:49 +00003549if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3555$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3561# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3562# in a Makefile. We should not override ac_cv_exeext if it was cached,
3563# so that the user can short-circuit this test for compilers unknown to
3564# Autoconf.
3565for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003566do
3567 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003570 ;;
3571 [ab].out )
3572 # We found the default executable, but exeext='' is most
3573 # certainly right.
3574 break;;
3575 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 then :; else
3578 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3579 fi
3580 # We set ac_cv_exeext here because the later test for it is not
3581 # safe: cross compilers may not add the suffix if given an `-o'
3582 # argument, so we may need to know it at that point already.
3583 # Even if this section looks crufty: it has the advantage of
3584 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003585 break;;
3586 * )
3587 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 esac
3589done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590test "$ac_cv_exeext" = no && ac_cv_exeext=
3591
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003592else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 ac_file=''
3594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003595if test -z "$ac_file"; then :
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3597$as_echo "no" >&6; }
3598$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003603as_fn_error 77 "C compiler cannot create executables
3604See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003605else
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3607$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3610$as_echo_n "checking for C compiler default output file name... " >&6; }
3611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3612$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003613ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614
Matthias Kloseb9621712010-04-24 17:59:49 +00003615rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3618$as_echo_n "checking for suffix of executables... " >&6; }
3619if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620case "(($ac_try" in
3621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622 *) ac_try_echo=$ac_try;;
3623esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003624eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3625$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3629 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003630 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3631# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3632# work properly (i.e., refer to `conftest.exe'), while it won't with
3633# `rm'.
3634for ac_file in conftest.exe conftest conftest.*; do
3635 test -f "$ac_file" || continue
3636 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3639 break;;
3640 * ) break;;
3641 esac
3642done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003643else
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003646as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3647See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003649rm -f conftest conftest$ac_cv_exeext
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3651$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652
3653rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003654EXEEXT=$ac_cv_exeext
3655ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3657/* end confdefs.h. */
3658#include <stdio.h>
3659int
3660main ()
3661{
3662FILE *f = fopen ("conftest.out", "w");
3663 return ferror (f) || fclose (f) != 0;
3664
3665 ;
3666 return 0;
3667}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003669ac_clean_files="$ac_clean_files conftest.out"
3670# Check that the compiler produces executables we can run. If not, either
3671# the compiler is broken, or we cross compile.
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3673$as_echo_n "checking whether we are cross compiling... " >&6; }
3674if test "$cross_compiling" != yes; then
3675 { { ac_try="$ac_link"
3676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
3680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
3682 (eval "$ac_link") 2>&5
3683 ac_status=$?
3684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }
3686 if { ac_try='./conftest$ac_cv_exeext'
3687 { { case "(($ac_try" in
3688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3689 *) ac_try_echo=$ac_try;;
3690esac
3691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3692$as_echo "$ac_try_echo"; } >&5
3693 (eval "$ac_try") 2>&5
3694 ac_status=$?
3695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3696 test $ac_status = 0; }; }; then
3697 cross_compiling=no
3698 else
3699 if test "$cross_compiling" = maybe; then
3700 cross_compiling=yes
3701 else
3702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003704as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003705If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003706See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 fi
3708 fi
3709fi
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3711$as_echo "$cross_compiling" >&6; }
3712
3713rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3714ac_clean_files=$ac_clean_files_save
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3716$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003717if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
3719else
3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003721/* end confdefs.h. */
3722
3723int
3724main ()
3725{
3726
3727 ;
3728 return 0;
3729}
3730_ACEOF
3731rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003732if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 for ac_file in conftest.o conftest.obj conftest.*; do
3744 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3748 break;;
3749 esac
3750done
3751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003753sed 's/^/| /' conftest.$ac_ext >&5
3754
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003757as_fn_error $? "cannot compute suffix of object files: cannot compile
3758See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003760rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3763$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003764OBJEXT=$ac_cv_objext
3765ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3767$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003768if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774int
3775main ()
3776{
3777#ifndef __GNUC__
3778 choke me
3779#endif
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_compiler_gnu=yes
3787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003791ac_cv_c_compiler_gnu=$ac_compiler_gnu
3792
3793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3795$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3796if test $ac_compiler_gnu = yes; then
3797 GCC=yes
3798else
3799 GCC=
3800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801ac_test_CFLAGS=${CFLAGS+set}
3802ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3804$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003805if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 ac_save_c_werror_flag=$ac_c_werror_flag
3809 ac_c_werror_flag=yes
3810 ac_cv_prog_cc_g=no
3811 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
Martin v. Löwis11437992002-04-12 09:54:03 +00003815int
3816main ()
3817{
3818
3819 ;
3820 return 0;
3821}
3822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003823if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003824 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003825else
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 CFLAGS=""
3827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828/* end confdefs.h. */
3829
3830int
3831main ()
3832{
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Matthias Kloseb9621712010-04-24 17:59:49 +00003840else
3841 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844/* end confdefs.h. */
3845
3846int
3847main ()
3848{
3849
3850 ;
3851 return 0;
3852}
3853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003854if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862 ac_c_werror_flag=$ac_save_c_werror_flag
3863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3865$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003867 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003868elif test $ac_cv_prog_cc_g = yes; then
3869 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 CFLAGS="-g -O2"
3871 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873 fi
3874else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875 if test "$GCC" = yes; then
3876 CFLAGS="-O2"
3877 else
3878 CFLAGS=
3879 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3882$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003883if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003885else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003887ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003889/* end confdefs.h. */
3890#include <stdarg.h>
3891#include <stdio.h>
3892#include <sys/types.h>
3893#include <sys/stat.h>
3894/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3895struct buf { int x; };
3896FILE * (*rcsopen) (struct buf *, struct stat *, int);
3897static char *e (p, i)
3898 char **p;
3899 int i;
3900{
3901 return p[i];
3902}
3903static char *f (char * (*g) (char **, int), char **p, ...)
3904{
3905 char *s;
3906 va_list v;
3907 va_start (v,p);
3908 s = g (p, va_arg (v,int));
3909 va_end (v);
3910 return s;
3911}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912
3913/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3914 function prototypes and stuff, but not '\xHH' hex character constants.
3915 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003917 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3918 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3923 inside strings and character constants. */
3924#define FOO(x) 'x'
3925int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3926
Skip Montanaro6dead952003-09-25 14:50:04 +00003927int test (int i, double x);
3928struct s1 {int (*f) (int a);};
3929struct s2 {int (*f) (double a);};
3930int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3931int argc;
3932char **argv;
3933int
3934main ()
3935{
3936return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3937 ;
3938 return 0;
3939}
3940_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3942 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003943do
3944 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948rm -f core conftest.err conftest.$ac_objext
3949 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003950done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003952CC=$ac_save_CC
3953
3954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955# AC_CACHE_VAL
3956case "x$ac_cv_prog_cc_c89" in
3957 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3959$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3962$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003963 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3966$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003969
Matthias Kloseb9621712010-04-24 17:59:49 +00003970fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003971
Martin v. Löwis11437992002-04-12 09:54:03 +00003972ac_ext=c
3973ac_cpp='$CPP $CPPFLAGS'
3974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3976ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003978
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003979
3980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3982$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
3988 case $withval in
3989 no) with_cxx_main=no
3990 MAINCC='$(CC)';;
3991 yes) with_cxx_main=yes
3992 MAINCC='$(CXX)';;
3993 *) with_cxx_main=yes
3994 MAINCC=$withval
3995 if test -z "$CXX"
3996 then
3997 CXX=$withval
3998 fi;;
3999 esac
4000else
4001
4002 with_cxx_main=no
4003 MAINCC='$(CC)'
4004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005fi
4006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4008$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004009
4010preset_cxx="$CXX"
4011if test -z "$CXX"
4012then
4013 case "$CC" in
4014 gcc) # Extract the first word of "g++", so it can be a program name with args.
4015set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004018if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004020else
4021 case $CXX in
4022 [\\/]* | ?:[\\/]*)
4023 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4024 ;;
4025 *)
4026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4027for as_dir in notfound
4028do
4029 IFS=$as_save_IFS
4030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032 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 +00004033 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 break 2
4036 fi
4037done
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004040
4041 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4042 ;;
4043esac
4044fi
4045CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4048$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004049else
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004054 ;;
4055 cc) # Extract the first word of "c++", so it can be a program name with args.
4056set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4058$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004059if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061else
4062 case $CXX in
4063 [\\/]* | ?:[\\/]*)
4064 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4065 ;;
4066 *)
4067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4068for as_dir in notfound
4069do
4070 IFS=$as_save_IFS
4071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 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 +00004074 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 break 2
4077 fi
4078done
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004081
4082 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4083 ;;
4084esac
4085fi
4086CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4089$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004090else
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004095 ;;
4096 esac
4097 if test "$CXX" = "notfound"
4098 then
4099 CXX=""
4100 fi
4101fi
4102if test -z "$CXX"
4103then
4104 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4105do
4106 # Extract the first word of "$ac_prog", so it can be a program name with args.
4107set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4109$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004110if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112else
4113 if test -n "$CXX"; then
4114 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4115else
4116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 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 +00004123 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 break 2
4126 fi
4127done
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130
4131fi
4132fi
4133CXX=$ac_cv_prog_CXX
4134if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4136$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4139$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140fi
4141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143 test -n "$CXX" && break
4144done
4145test -n "$CXX" || CXX="notfound"
4146
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test "$preset_cxx" != "$CXX"
4153then
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004155
4156 By default, distutils will build C++ extension modules with \"$CXX\".
4157 If this is not intended, then set CXX on the configure command line.
4158 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004159$as_echo "$as_me: 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 " >&2;}
4164fi
4165
4166
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
4169ac_ext=c
4170ac_cpp='$CPP $CPPFLAGS'
4171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4175$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176# On Suns, sometimes $CPP names a directory.
4177if test -n "$CPP" && test -d "$CPP"; then
4178 CPP=
4179fi
4180if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004181 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004183else
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 # Double quotes because CPP needs to be expanded
4185 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4186 do
4187 ac_preproc_ok=false
4188for ac_c_preproc_warn_flag in '' yes
4189do
4190 # Use a header file that comes with gcc, so configuring glibc
4191 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004192 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4193 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004194 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
4198#ifdef __STDC__
4199# include <limits.h>
4200#else
4201# include <assert.h>
4202#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004203 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004206
Matthias Kloseb9621712010-04-24 17:59:49 +00004207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: fails on valid input.
4209continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004210fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004211rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004217#include <ac_nonexistent.h>
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 # Broken: success on invalid input.
4221continue
4222else
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 # Passes both tests.
4224ac_preproc_ok=:
4225break
4226fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004227rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
4229done
4230# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004231rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004232if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 break
4234fi
4235
4236 done
4237 ac_cv_prog_CPP=$CPP
4238
4239fi
4240 CPP=$ac_cv_prog_CPP
4241else
4242 ac_cv_prog_CPP=$CPP
4243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4245$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004246ac_preproc_ok=false
4247for ac_c_preproc_warn_flag in '' yes
4248do
4249 # Use a header file that comes with gcc, so configuring glibc
4250 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004251 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4252 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 # On the NeXT, cc -E runs the code through the compiler's parser,
4254 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
4257#ifdef __STDC__
4258# include <limits.h>
4259#else
4260# include <assert.h>
4261#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Kloseb9621712010-04-24 17:59:49 +00004266else
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: fails on valid input.
4268continue
4269fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004270rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004276#include <ac_nonexistent.h>
4277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004278if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # Broken: success on invalid input.
4280continue
4281else
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # Passes both tests.
4283ac_preproc_ok=:
4284break
4285fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004286rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004287
4288done
4289# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004290rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if $ac_preproc_ok; then :
4292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004296as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4297See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004298fi
4299
4300ac_ext=c
4301ac_cpp='$CPP $CPPFLAGS'
4302ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4303ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4304ac_compiler_gnu=$ac_cv_c_compiler_gnu
4305
4306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4308$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004309if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004311else
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 # Loop through the user's path and test for each of PROGNAME-LIST
4315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4317do
4318 IFS=$as_save_IFS
4319 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 for ac_prog in grep ggrep; do
4321 for ac_exec_ext in '' $ac_executable_extensions; do
4322 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4323 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4324# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 # Check for GNU $ac_path_GREP
4326case `"$ac_path_GREP" --version 2>&1` in
4327*GNU*)
4328 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4329*)
4330 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 while :
4333 do
4334 cat "conftest.in" "conftest.in" >"conftest.tmp"
4335 mv "conftest.tmp" "conftest.in"
4336 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4339 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4342 # Best one so far, save it but keep looking for a better one
4343 ac_cv_path_GREP="$ac_path_GREP"
4344 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 # 10*(2^10) chars as input seems more than enough
4347 test $ac_count -gt 10 && break
4348 done
4349 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4350esac
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 $ac_path_GREP_found && break 3
4353 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004358 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 +00004359 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360else
4361 ac_cv_path_GREP=$GREP
4362fi
4363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4366$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 GREP="$ac_cv_path_GREP"
4368
4369
Matthias Kloseb9621712010-04-24 17:59:49 +00004370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4371$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004372if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374else
4375 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4376 then ac_cv_path_EGREP="$GREP -E"
4377 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 # Loop through the user's path and test for each of PROGNAME-LIST
4381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4383do
4384 IFS=$as_save_IFS
4385 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 for ac_prog in egrep; do
4387 for ac_exec_ext in '' $ac_executable_extensions; do
4388 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4389 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4390# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 # Check for GNU $ac_path_EGREP
4392case `"$ac_path_EGREP" --version 2>&1` in
4393*GNU*)
4394 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4395*)
4396 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 while :
4399 do
4400 cat "conftest.in" "conftest.in" >"conftest.tmp"
4401 mv "conftest.tmp" "conftest.in"
4402 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4405 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4408 # Best one so far, save it but keep looking for a better one
4409 ac_cv_path_EGREP="$ac_path_EGREP"
4410 ac_path_EGREP_max=$ac_count
4411 fi
4412 # 10*(2^10) chars as input seems more than enough
4413 test $ac_count -gt 10 && break
4414 done
4415 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4416esac
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 $ac_path_EGREP_found && break 3
4419 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004424 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 +00004425 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426else
4427 ac_cv_path_EGREP=$EGREP
4428fi
4429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 fi
4431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4433$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004435
4436
Matthias Kloseb9621712010-04-24 17:59:49 +00004437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4438$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004439if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 $as_echo_n "(cached) " >&6
4441else
4442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004443/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004444#include <stdlib.h>
4445#include <stdarg.h>
4446#include <string.h>
4447#include <float.h>
4448
4449int
4450main ()
4451{
4452
4453 ;
4454 return 0;
4455}
4456_ACEOF
4457if ac_fn_c_try_compile "$LINENO"; then :
4458 ac_cv_header_stdc=yes
4459else
4460 ac_cv_header_stdc=no
4461fi
4462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4463
4464if test $ac_cv_header_stdc = yes; then
4465 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4467/* end confdefs.h. */
4468#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004469
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004470_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004473
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004474else
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004477rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004478
Matthias Kloseb9621712010-04-24 17:59:49 +00004479fi
4480
4481if test $ac_cv_header_stdc = yes; then
4482 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <stdlib.h>
4486
4487_ACEOF
4488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4489 $EGREP "free" >/dev/null 2>&1; then :
4490
4491else
4492 ac_cv_header_stdc=no
4493fi
4494rm -f conftest*
4495
4496fi
4497
4498if test $ac_cv_header_stdc = yes; then
4499 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4500 if test "$cross_compiling" = yes; then :
4501 :
4502else
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504/* end confdefs.h. */
4505#include <ctype.h>
4506#include <stdlib.h>
4507#if ((' ' & 0x0FF) == 0x020)
4508# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4509# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4510#else
4511# define ISLOWER(c) \
4512 (('a' <= (c) && (c) <= 'i') \
4513 || ('j' <= (c) && (c) <= 'r') \
4514 || ('s' <= (c) && (c) <= 'z'))
4515# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4516#endif
4517
4518#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4519int
4520main ()
4521{
4522 int i;
4523 for (i = 0; i < 256; i++)
4524 if (XOR (islower (i), ISLOWER (i))
4525 || toupper (i) != TOUPPER (i))
4526 return 2;
4527 return 0;
4528}
4529_ACEOF
4530if ac_fn_c_try_run "$LINENO"; then :
4531
4532else
4533 ac_cv_header_stdc=no
4534fi
4535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4536 conftest.$ac_objext conftest.beam conftest.$ac_ext
4537fi
4538
4539fi
4540fi
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4542$as_echo "$ac_cv_header_stdc" >&6; }
4543if test $ac_cv_header_stdc = yes; then
4544
4545$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4546
4547fi
4548
4549# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4550for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4551 inttypes.h stdint.h unistd.h
4552do :
4553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4554ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4555"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004556if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 cat >>confdefs.h <<_ACEOF
4558#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4559_ACEOF
4560
4561fi
4562
4563done
4564
4565
4566
4567 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 +00004568if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 MINIX=yes
4570else
4571 MINIX=
4572fi
4573
4574
4575 if test "$MINIX" = yes; then
4576
4577$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4578
4579
4580$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4581
4582
4583$as_echo "#define _MINIX 1" >>confdefs.h
4584
4585 fi
4586
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4589$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004590if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 $as_echo_n "(cached) " >&6
4592else
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594/* end confdefs.h. */
4595
4596# define __EXTENSIONS__ 1
4597 $ac_includes_default
4598int
4599main ()
4600{
4601
4602 ;
4603 return 0;
4604}
4605_ACEOF
4606if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_safe_to_define___extensions__=yes
4608else
4609 ac_cv_safe_to_define___extensions__=no
4610fi
4611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4612fi
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4614$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4615 test $ac_cv_safe_to_define___extensions__ = yes &&
4616 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4617
4618 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4619
4620 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4621
4622 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4623
4624 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4625
4626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628# Check for unsupported systems
4629case $ac_sys_system/$ac_sys_release in
4630atheos*|Linux*/1*)
4631 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4632 echo See README for details.
4633 exit 1;;
4634esac
4635
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4638$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004639
4640# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642 withval=$with_suffix;
4643 case $withval in
4644 no) EXEEXT=;;
4645 yes) EXEEXT=.exe;;
4646 *) EXEEXT=$withval;;
4647 esac
4648fi
4649
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4651$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652
4653# Test whether we're running on a non-case-sensitive system, in which
4654# case we give a warning if no ext is given
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4657$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658if test ! -d CaseSensitiveTestDir; then
4659mkdir CaseSensitiveTestDir
4660fi
4661
4662if test -d casesensitivetestdir
4663then
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4665$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666 BUILDEXEEXT=.exe
4667else
Matthias Kloseb9621712010-04-24 17:59:49 +00004668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4669$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 BUILDEXEEXT=$EXEEXT
4671fi
4672rmdir CaseSensitiveTestDir
4673
4674case $MACHDEP in
4675bsdos*)
4676 case $CC in
4677 gcc) CC="$CC -D_HAVE_BSDI";;
4678 esac;;
4679esac
4680
4681case $ac_sys_system in
4682hp*|HP*)
4683 case $CC in
4684 cc|*/cc) CC="$CC -Ae";;
4685 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686esac
4687
4688
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004692if test -z "$LIBRARY"
4693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698
4699# LDLIBRARY is the name of the library to link against (as opposed to the
4700# name of the library into which to insert object files). BLDLIBRARY is also
4701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4702# is blank as the main program is not linked directly against LDLIBRARY.
4703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4706# DLLLIBRARY is the shared (i.e., DLL) library.
4707#
4708# RUNSHARED is used to run shared python without installed libraries
4709#
4710# INSTSONAME is the name of the shared library that will be use to install
4711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004712#
4713# LDVERSION is the shared library version number, normally the Python version
4714# with the ABI build flags appended.
4715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716
4717
4718
4719
4720
4721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723LDLIBRARY="$LIBRARY"
4724BLDLIBRARY='$(LDLIBRARY)'
4725INSTSONAME='$(LDLIBRARY)'
4726DLLLIBRARY=''
4727LDLIBRARYDIR=''
4728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
4731# LINKCC is the command that links the python executable -- default is $(CC).
4732# If CXX is set, and if it is needed to link a main function that was
4733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4734# python might then depend on the C++ runtime
4735# This is altered for AIX in order to build the export list before
4736# linking.
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740if test -z "$LINKCC"
4741then
4742 LINKCC='$(PURIFY) $(MAINCC)'
4743 case $ac_sys_system in
4744 AIX*)
4745 exp_extra="\"\""
4746 if test $ac_sys_release -ge 5 -o \
4747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4748 exp_extra="."
4749 fi
4750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004751 QNX*)
4752 # qcc must be used because the other compilers do not
4753 # support -N.
4754 LINKCC=qcc;;
4755 esac
4756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759
4760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4761# make sure we default having it set to "no": this is used by
4762# distutils.unixccompiler to know if it should add --enable-new-dtags
4763# to linker command lines, and failing to detect GNU ld simply results
4764# in the same bahaviour as before.
4765
Matthias Kloseb9621712010-04-24 17:59:49 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768ac_prog=ld
4769if test "$GCC" = yes; then
4770 ac_prog=`$CC -print-prog-name=ld`
4771fi
4772case `"$ac_prog" -V 2>&1 < /dev/null` in
4773 *GNU*)
4774 GNULD=yes;;
4775 *)
4776 GNULD=no;;
4777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4782$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004784 $as_echo_n "(cached) " >&6
4785else
4786 ac_cv_c_inline=no
4787for ac_kw in inline __inline__ __inline; do
4788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789/* end confdefs.h. */
4790#ifndef __cplusplus
4791typedef int foo_t;
4792static $ac_kw foo_t static_foo () {return 0; }
4793$ac_kw foo_t foo () {return 0; }
4794#endif
4795
4796_ACEOF
4797if ac_fn_c_try_compile "$LINENO"; then :
4798 ac_cv_c_inline=$ac_kw
4799fi
4800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4801 test "$ac_cv_c_inline" != no && break
4802done
4803
4804fi
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4806$as_echo "$ac_cv_c_inline" >&6; }
4807
4808case $ac_cv_c_inline in
4809 inline | yes) ;;
4810 *)
4811 case $ac_cv_c_inline in
4812 no) ac_val=;;
4813 *) ac_val=$ac_cv_c_inline;;
4814 esac
4815 cat >>confdefs.h <<_ACEOF
4816#ifndef __cplusplus
4817#define inline $ac_val
4818#endif
4819_ACEOF
4820 ;;
4821esac
4822
4823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004824
4825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004826
4827
4828fi
4829
4830
Matthias Kloseb9621712010-04-24 17:59:49 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 enableval=$enable_shared;
4836fi
4837
4838
4839if test -z "$enable_shared"
4840then
4841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 enable_shared="yes";;
4844 *)
4845 enable_shared="no";;
4846 esac
4847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850
Matthias Kloseb9621712010-04-24 17:59:49 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855 enableval=$enable_profiling; ac_save_cc="$CC"
4856 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 ac_enable_profiling="no"
4859else
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861/* end confdefs.h. */
4862int main() { return 0; }
4863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865 ac_enable_profiling="yes"
4866else
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871fi
4872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 CC="$ac_save_cc"
4874fi
4875
Matthias Kloseb9621712010-04-24 17:59:49 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4877$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878
4879case "$ac_enable_profiling" in
4880 "yes")
4881 BASECFLAGS="-pg $BASECFLAGS"
4882 LDFLAGS="-pg $LDFLAGS"
4883 ;;
4884esac
4885
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4887$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888
4889# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4890# library that we build, but we do not want to link against it (we
4891# will find it with a -framework option). For this reason there is an
4892# extra variable BLDLIBRARY against which Python and the extension
4893# modules are linked, BLDLIBRARY. This is normally the same as
4894# LDLIBRARY, but empty for MacOSX framework builds.
4895if test "$enable_framework"
4896then
4897 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4898 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4899 BLDLIBRARY=''
4900else
4901 BLDLIBRARY='$(LDLIBRARY)'
4902fi
4903
4904# Other platforms follow
4905if test $enable_shared = "yes"; then
4906
Matthias Kloseb9621712010-04-24 17:59:49 +00004907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908
4909 case $ac_sys_system in
4910 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004911 LDLIBRARY='libpython$(LDVERSION).dll.a'
4912 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 ;;
4914 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004915 LDLIBRARY='libpython$(LDVERSION).so'
4916 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004920 then
4921 PY3LIBRARY=libpython3.so
4922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 ;;
4924 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004925 LDLIBRARY='libpython$(LDVERSION).so'
4926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4928 case $ac_sys_system in
4929 FreeBSD*)
4930 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4931 ;;
4932 esac
4933 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004934 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004935 then
4936 PY3LIBRARY=libpython3.so
4937 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 ;;
4939 hp*|HP*)
4940 case `uname -m` in
4941 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004942 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 ;;
4944 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004945 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ;;
4947 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4950 ;;
4951 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 LDLIBRARY='libpython$(LDVERSION).so'
4953 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004957 LDLIBRARY='libpython$(LDVERSION).dylib'
4958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004962 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004963 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965
4966 esac
4967else # shared is disabled
4968 case $ac_sys_system in
4969 CYGWIN*)
4970 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004971 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 ;;
4973 esac
4974fi
4975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4977$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978
4979if test -n "$ac_tool_prefix"; then
4980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004984if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986else
4987 if test -n "$RANLIB"; then
4988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4989else
4990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 break 2
5000 fi
5001done
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003IFS=$as_save_IFS
5004
5005fi
5006fi
5007RANLIB=$ac_cv_prog_RANLIB
5008if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5010$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011else
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014fi
5015
5016
5017fi
5018if test -z "$ac_cv_prog_RANLIB"; then
5019 ac_ct_RANLIB=$RANLIB
5020 # Extract the first word of "ranlib", so it can be a program name with args.
5021set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005024if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026else
5027 if test -n "$ac_ct_RANLIB"; then
5028 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 break 2
5040 fi
5041done
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043IFS=$as_save_IFS
5044
5045fi
5046fi
5047ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5048if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5050$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051else
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054fi
5055
5056 if test "x$ac_ct_RANLIB" = x; then
5057 RANLIB=":"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063ac_tool_warned=yes ;;
5064esac
5065 RANLIB=$ac_ct_RANLIB
5066 fi
5067else
5068 RANLIB="$ac_cv_prog_RANLIB"
5069fi
5070
5071
5072for ac_prog in ar aal
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005078if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080else
5081 if test -n "$AR"; then
5082 ac_cv_prog_AR="$AR" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093 break 2
5094 fi
5095done
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097IFS=$as_save_IFS
5098
5099fi
5100fi
5101AR=$ac_cv_prog_AR
5102if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5104$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105else
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108fi
5109
5110
5111 test -n "$AR" && break
5112done
5113test -n "$AR" || AR="ar"
5114
5115
5116# tweak ARFLAGS only if the user didn't set it on the command line
5117
5118if test -z "$ARFLAGS"
5119then
5120 ARFLAGS="rc"
5121fi
5122
5123
5124# Extract the first word of "svnversion", so it can be a program name with args.
5125set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005128if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130else
5131 if test -n "$SVNVERSION"; then
5132 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143 break 2
5144 fi
5145done
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147IFS=$as_save_IFS
5148
5149 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5150fi
5151fi
5152SVNVERSION=$ac_cv_prog_SVNVERSION
5153if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5155$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156else
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159fi
5160
5161
5162if test $SVNVERSION = found
5163then
5164 SVNVERSION="svnversion \$(srcdir)"
5165else
5166 SVNVERSION="echo Unversioned directory"
5167fi
5168
5169case $MACHDEP in
5170bsdos*|hp*|HP*)
5171 # install -d does not work on BSDI or HP-UX
5172 if test -z "$INSTALL"
5173 then
5174 INSTALL="${srcdir}/install-sh -c"
5175 fi
5176esac
5177ac_aux_dir=
5178for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005179 if test -f "$ac_dir/install-sh"; then
5180 ac_aux_dir=$ac_dir
5181 ac_install_sh="$ac_aux_dir/install-sh -c"
5182 break
5183 elif test -f "$ac_dir/install.sh"; then
5184 ac_aux_dir=$ac_dir
5185 ac_install_sh="$ac_aux_dir/install.sh -c"
5186 break
5187 elif test -f "$ac_dir/shtool"; then
5188 ac_aux_dir=$ac_dir
5189 ac_install_sh="$ac_aux_dir/shtool install -c"
5190 break
5191 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192done
5193if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005194 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197# These three variables are undocumented and unsupported,
5198# and are intended to be withdrawn in a future Autoconf release.
5199# They can cause serious problems if a builder's source tree is in a directory
5200# whose full name contains unusual characters.
5201ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5202ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5203ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5204
5205
5206# Find a good install program. We prefer a C program (faster),
5207# so one script is as good as another. But avoid the broken or
5208# incompatible versions:
5209# SysV /etc/install, /usr/sbin/install
5210# SunOS /usr/etc/install
5211# IRIX /sbin/install
5212# AIX /bin/install
5213# AmigaOS /C/install, which installs bootblocks on floppy discs
5214# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5215# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5216# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5217# OS/2's system install, which has a completely different semantic
5218# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005219# Reject install programs that cannot install multiple files.
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5221$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005223if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225else
5226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229 IFS=$as_save_IFS
5230 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005231 # Account for people who put trailing slashes in PATH elements.
5232case $as_dir/ in #((
5233 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236 /usr/ucb/* ) ;;
5237 *)
5238 # OSF1 and SCO ODT 3.0 have their own names for install.
5239 # Don't use installbsd from OSF since it installs stuff as root
5240 # by default.
5241 for ac_prog in ginstall scoinst install; do
5242 for ac_exec_ext in '' $ac_executable_extensions; do
5243 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5244 if test $ac_prog = install &&
5245 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5246 # AIX install. It has an incompatible calling convention.
5247 :
5248 elif test $ac_prog = install &&
5249 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5250 # program-specific install script used by HP pwplus--don't use.
5251 :
5252 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005253 rm -rf conftest.one conftest.two conftest.dir
5254 echo one > conftest.one
5255 echo two > conftest.two
5256 mkdir conftest.dir
5257 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5258 test -s conftest.one && test -s conftest.two &&
5259 test -s conftest.dir/conftest.one &&
5260 test -s conftest.dir/conftest.two
5261 then
5262 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5263 break 3
5264 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265 fi
5266 fi
5267 done
5268 done
5269 ;;
5270esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005271
5272 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273IFS=$as_save_IFS
5274
Matthias Kloseb9621712010-04-24 17:59:49 +00005275rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276
5277fi
5278 if test "${ac_cv_path_install+set}" = set; then
5279 INSTALL=$ac_cv_path_install
5280 else
5281 # As a last resort, use the slow shell script. Don't cache a
5282 # value for INSTALL within a source directory, because that will
5283 # break other packages using the cache if that directory is
5284 # removed, or if the value is a relative name.
5285 INSTALL=$ac_install_sh
5286 fi
5287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5289$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290
5291# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5292# It thinks the first close brace ends the variable substitution.
5293test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5294
5295test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5296
5297test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5298
5299
5300# Not every filesystem supports hard links
5301
5302if test -z "$LN" ; then
5303 case $ac_sys_system in
5304 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 *) LN=ln;;
5306 esac
5307fi
5308
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005309# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005310
5311ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5315$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316
5317# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319 withval=$with_pydebug;
5320if test "$withval" != no
5321then
5322
Matthias Kloseb9621712010-04-24 17:59:49 +00005323$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324
Matthias Kloseb9621712010-04-24 17:59:49 +00005325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005328 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331fi
5332else
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335fi
5336
5337
5338# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5339# merged with this chunk of code?
5340
5341# Optimizer/debugger flags
5342# ------------------------
5343# (The following bit of code is complicated enough - please keep things
5344# indented properly. Just pretend you're editing Python code. ;-)
5345
5346# There are two parallel sets of case statements below, one that checks to
5347# see if OPT was set and one that does BASECFLAGS setting based upon
5348# compiler and platform. BASECFLAGS tweaks need to be made even if the
5349# user set OPT.
5350
5351# tweak OPT based on compiler and platform, only if the user didn't set
5352# it on the command line
5353
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005354if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355then
5356 case $GCC in
5357 yes)
5358 if test "$CC" != 'g++' ; then
5359 STRICT_PROTO="-Wstrict-prototypes"
5360 fi
5361 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5362 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5363 WRAP="-fwrapv"
5364 fi
5365 case $ac_cv_prog_cc_g in
5366 yes)
5367 if test "$Py_DEBUG" = 'true' ; then
5368 # Optimization messes up debuggers, so turn it off for
5369 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005370 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371 else
5372 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5373 fi
5374 ;;
5375 *)
5376 OPT="-O3 -Wall $STRICT_PROTO"
5377 ;;
5378 esac
5379 case $ac_sys_system in
5380 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5381 ;;
5382 esac
5383 ;;
5384
5385 *)
5386 OPT="-O"
5387 ;;
5388 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389fi
5390
5391
5392
5393# The -arch flags for universal builds on OSX
5394UNIVERSAL_ARCH_FLAGS=
5395
5396
5397# tweak BASECFLAGS based on compiler and platform
5398case $GCC in
5399yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005400 # Python doesn't violate C99 aliasing rules, but older versions of
5401 # GCC produce warnings for legal Python code. Enable
5402 # -fno-strict-aliasing on versions of GCC that support but produce
5403 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5405$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 ac_save_cc="$CC"
5407 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005408 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005409 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005411else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005414
Matthias Kloseb159a552010-04-25 21:00:44 +00005415
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005416int
5417main ()
5418{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005419
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005420 ;
5421 return 0;
5422}
Matthias Kloseb159a552010-04-25 21:00:44 +00005423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005425if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 CC="$ac_save_cc -fstrict-aliasing"
5428 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005430/* end confdefs.h. */
5431
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005432 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433int
5434main ()
5435{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005436double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005437 ;
5438 return 0;
5439}
Matthias Kloseb159a552010-04-25 21:00:44 +00005440
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005442if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005443
5444 ac_cv_no_strict_aliasing=no
5445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446else
Matthias Kloseb159a552010-04-25 21:00:44 +00005447
5448 ac_cv_no_strict_aliasing=yes
5449
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005450fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005452
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005453else
Matthias Kloseb159a552010-04-25 21:00:44 +00005454
5455 ac_cv_no_strict_aliasing=no
5456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005459fi
5460
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005461 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5464$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005465 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466 then
5467 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5468 fi
5469
5470 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5471 # support. Without this, treatment of subnormals doesn't follow
5472 # the standard.
5473 case $ac_sys_machine in
5474 alpha*)
5475 BASECFLAGS="$BASECFLAGS -mieee"
5476 ;;
5477 esac
5478
5479 case $ac_sys_system in
5480 SCO_SV*)
5481 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5482 ;;
5483 # is there any other compiler on Darwin besides gcc?
5484 Darwin*)
5485 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5486 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005487 if test "${CC}" = gcc
5488 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5490$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005491 case "${UNIVERSALSDK}" in
5492 */MacOSX10.4u.sdk)
5493 # Build using 10.4 SDK, force usage of gcc when the
5494 # compiler is gcc, otherwise the user will get very
5495 # confusing error messages when building on OSX 10.6
5496 CC=gcc-4.0
5497 CPP=cpp-4.0
5498 ;;
5499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5501$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005502 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
5504
5505 if test "${enable_universalsdk}"; then
5506 UNIVERSAL_ARCH_FLAGS=""
5507 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5508 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5509 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005510 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5512 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005513 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005514 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
5516 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5517 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005518 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005519 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005521 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005523 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005524 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005525
5526 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005528 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005529 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005532 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 +00005533
5534 fi
5535
5536
Ronald Oussoren666028b2010-04-18 19:07:43 +00005537 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5538 if test "${UNIVERSALSDK}" != "/"
5539 then
5540 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5541 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005542 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543 fi
5544 fi
5545
5546 # Calculate the right deployment target for this build.
5547 #
5548 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5549 if test ${cur_target} '>' 10.2; then
5550 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005551 if test ${enable_universalsdk}; then
5552 if test "${UNIVERSAL_ARCHS}" = "all"; then
5553 # Ensure that the default platform for a
5554 # 4-way universal build is OSX 10.5,
5555 # that's the first OS release where
5556 # 4-way builds make sense.
5557 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005558
5559 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5560 cur_target='10.5'
5561
5562 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5563 cur_target='10.5'
5564
5565 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5566 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005567 fi
5568 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005569 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005570 # On Intel macs default to a deployment
5571 # target of 10.4, that's the first OSX
5572 # release with Intel support.
5573 cur_target="10.4"
5574 fi
5575 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576 fi
5577 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5578
5579 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5580 # environment with a value that is the same as what we'll use
5581 # in the Makefile to ensure that we'll get the same compiler
5582 # environment during configure and build time.
5583 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5584 export MACOSX_DEPLOYMENT_TARGET
5585 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5586
5587 ;;
5588 OSF*)
5589 BASECFLAGS="$BASECFLAGS -mieee"
5590 ;;
5591 esac
5592 ;;
5593
5594*)
5595 case $ac_sys_system in
5596 OpenUNIX*|UnixWare*)
5597 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5598 ;;
5599 OSF*)
5600 BASECFLAGS="$BASECFLAGS -ieee -std"
5601 ;;
5602 SCO_SV*)
5603 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5604 ;;
5605 esac
5606 ;;
5607esac
5608
5609if test "$Py_DEBUG" = 'true'; then
5610 :
5611else
5612 OPT="-DNDEBUG $OPT"
5613fi
5614
5615if test "$ac_arch_flags"
5616then
5617 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5618fi
5619
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620# Check whether GCC supports PyArg_ParseTuple format
5621if test "$GCC" = "yes"
5622then
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5624$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 save_CFLAGS=$CFLAGS
5626 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628/* end confdefs.h. */
5629
5630 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631int
5632main ()
5633{
5634
5635 ;
5636 return 0;
5637}
Matthias Kloseb159a552010-04-25 21:00:44 +00005638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005640if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
Matthias Kloseb159a552010-04-25 21:00:44 +00005642
Matthias Kloseb9621712010-04-24 17:59:49 +00005643$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
Matthias Kloseb159a552010-04-25 21:00:44 +00005645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005646$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648else
Matthias Kloseb159a552010-04-25 21:00:44 +00005649
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005651$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
5653fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5655 CFLAGS=$save_CFLAGS
5656fi
5657
5658# On some compilers, pthreads are available without further options
5659# (e.g. MacOS X). On some of these systems, the compiler will not
5660# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5661# So we have to see first whether pthreads are available without
5662# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5664$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005665if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667else
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ac_cv_pthread_is_default=no
5670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672/* end confdefs.h. */
5673
5674#include <pthread.h>
5675
5676void* routine(void* p){return NULL;}
5677
5678int main(){
5679 pthread_t p;
5680 if(pthread_create(&p,NULL,routine,NULL)!=0)
5681 return 1;
5682 (void)pthread_detach(p);
5683 return 0;
5684}
5685
5686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689 ac_cv_pthread_is_default=yes
5690 ac_cv_kthread=no
5691 ac_cv_pthread=no
5692
5693else
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701fi
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5704$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
5706
5707if test $ac_cv_pthread_is_default = yes
5708then
5709 ac_cv_kpthread=no
5710else
5711# -Kpthread, if available, provides the right #defines
5712# and linker options to make pthread_create available
5713# Some compilers won't report that they do not support -Kpthread,
5714# so we need to run a program to see whether it really made the
5715# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5717$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005718if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720else
5721 ac_save_cc="$CC"
5722CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005723if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 ac_cv_kpthread=no
5725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727/* end confdefs.h. */
5728
5729#include <pthread.h>
5730
5731void* routine(void* p){return NULL;}
5732
5733int main(){
5734 pthread_t p;
5735 if(pthread_create(&p,NULL,routine,NULL)!=0)
5736 return 1;
5737 (void)pthread_detach(p);
5738 return 0;
5739}
5740
5741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005742if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_kpthread=yes
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751CC="$ac_save_cc"
5752fi
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5755$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
5757
5758if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5759then
5760# -Kthread, if available, provides the right #defines
5761# and linker options to make pthread_create available
5762# Some compilers won't report that they do not support -Kthread,
5763# so we need to run a program to see whether it really made the
5764# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5766$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005767if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
5770 ac_save_cc="$CC"
5771CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005772if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 ac_cv_kthread=no
5774else
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776/* end confdefs.h. */
5777
5778#include <pthread.h>
5779
5780void* routine(void* p){return NULL;}
5781
5782int main(){
5783 pthread_t p;
5784 if(pthread_create(&p,NULL,routine,NULL)!=0)
5785 return 1;
5786 (void)pthread_detach(p);
5787 return 0;
5788}
5789
5790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005791if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ac_cv_kthread=yes
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798fi
5799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800CC="$ac_save_cc"
5801fi
5802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5804$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805fi
5806
5807if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5808then
5809# -pthread, if available, provides the right #defines
5810# and linker options to make pthread_create available
5811# Some compilers won't report that they do not support -pthread,
5812# so we need to run a program to see whether it really made the
5813# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5815$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005816if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005817 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
5819 ac_save_cc="$CC"
5820CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 ac_cv_pthread=no
5823else
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825/* end confdefs.h. */
5826
5827#include <pthread.h>
5828
5829void* routine(void* p){return NULL;}
5830
5831int main(){
5832 pthread_t p;
5833 if(pthread_create(&p,NULL,routine,NULL)!=0)
5834 return 1;
5835 (void)pthread_detach(p);
5836 return 0;
5837}
5838
5839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 ac_cv_pthread=yes
5842else
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849CC="$ac_save_cc"
5850fi
5851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5853$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
5856# If we have set a CC compiler flag for thread support then
5857# check if it works for CXX, too.
5858ac_cv_cxx_thread=no
5859if test ! -z "$CXX"
5860then
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5862$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863ac_save_cxx="$CXX"
5864
5865if test "$ac_cv_kpthread" = "yes"
5866then
5867 CXX="$CXX -Kpthread"
5868 ac_cv_cxx_thread=yes
5869elif test "$ac_cv_kthread" = "yes"
5870then
5871 CXX="$CXX -Kthread"
5872 ac_cv_cxx_thread=yes
5873elif test "$ac_cv_pthread" = "yes"
5874then
5875 CXX="$CXX -pthread"
5876 ac_cv_cxx_thread=yes
5877fi
5878
5879if test $ac_cv_cxx_thread = yes
5880then
5881 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5882 $CXX -c conftest.$ac_ext 2>&5
5883 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5884 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5885 then
5886 ac_cv_cxx_thread=yes
5887 else
5888 ac_cv_cxx_thread=no
5889 fi
5890 rm -fr conftest*
5891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5893$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894fi
5895CXX="$ac_save_cxx"
5896
5897
5898# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5900$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005901if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005902 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903else
Matthias Kloseb9621712010-04-24 17:59:49 +00005904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905/* end confdefs.h. */
5906#include <stdlib.h>
5907#include <stdarg.h>
5908#include <string.h>
5909#include <float.h>
5910
5911int
5912main ()
5913{
5914
5915 ;
5916 return 0;
5917}
5918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005919if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ac_cv_header_stdc=yes
5921else
Matthias Kloseb9621712010-04-24 17:59:49 +00005922 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5925
5926if test $ac_cv_header_stdc = yes; then
5927 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929/* end confdefs.h. */
5930#include <string.h>
5931
5932_ACEOF
5933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $EGREP "memchr" >/dev/null 2>&1; then :
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 ac_cv_header_stdc=no
5938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005939rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941fi
5942
5943if test $ac_cv_header_stdc = yes; then
5944 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946/* end confdefs.h. */
5947#include <stdlib.h>
5948
5949_ACEOF
5950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 $EGREP "free" >/dev/null 2>&1; then :
5952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953else
5954 ac_cv_header_stdc=no
5955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005956rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958fi
5959
5960if test $ac_cv_header_stdc = yes; then
5961 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 :
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967#include <ctype.h>
5968#include <stdlib.h>
5969#if ((' ' & 0x0FF) == 0x020)
5970# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5971# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5972#else
5973# define ISLOWER(c) \
5974 (('a' <= (c) && (c) <= 'i') \
5975 || ('j' <= (c) && (c) <= 'r') \
5976 || ('s' <= (c) && (c) <= 'z'))
5977# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5978#endif
5979
5980#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5981int
5982main ()
5983{
5984 int i;
5985 for (i = 0; i < 256; i++)
5986 if (XOR (islower (i), ISLOWER (i))
5987 || toupper (i) != TOUPPER (i))
5988 return 2;
5989 return 0;
5990}
5991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005992if ac_fn_c_try_run "$LINENO"; then :
5993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999fi
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001fi
6002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6004$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005if test $ac_cv_header_stdc = yes; then
6006
Matthias Kloseb9621712010-04-24 17:59:49 +00006007$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009fi
6010
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006011for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6012fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006013ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006014shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006015unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006016sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6017sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006018sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006019sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006020sys/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 +00006021sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006022bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006023do :
6024 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6025ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006026if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006027 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006029_ACEOF
6030
6031fi
6032
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033done
6034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006036for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6039$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006040if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006044/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045#include <sys/types.h>
6046#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006047
Martin v. Löwis11437992002-04-12 09:54:03 +00006048int
6049main ()
6050{
6051if ((DIR *) 0)
6052return 0;
6053 ;
6054 return 0;
6055}
6056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006059else
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006064eval ac_res=\$$as_ac_Header
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6066$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006067if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006068 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006069#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006070_ACEOF
6071
6072ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006075done
6076# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6077if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6079$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006080if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082else
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087/* Override any GCC internal prototype to avoid an error.
6088 Use char because int might match the return type of a GCC
6089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006090#ifdef __cplusplus
6091extern "C"
6092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006093char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006094int
6095main ()
6096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006098 ;
6099 return 0;
6100}
6101_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102for ac_lib in '' dir; do
6103 if test -z "$ac_lib"; then
6104 ac_res="none required"
6105 else
6106 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006110 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006112rm -f core conftest.err conftest.$ac_objext \
6113 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006114 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006118if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120else
6121 ac_cv_search_opendir=no
6122fi
6123rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006124LIBS=$ac_func_search_save_LIBS
6125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6127$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006128ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006129if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Michael W. Hudson54241132001-12-07 15:38:26 +00006134else
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6136$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006137if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006139else
6140 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144/* Override any GCC internal prototype to avoid an error.
6145 Use char because int might match the return type of a GCC
6146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006147#ifdef __cplusplus
6148extern "C"
6149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006150char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006151int
6152main ()
6153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006154return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 ;
6156 return 0;
6157}
6158_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159for ac_lib in '' x; do
6160 if test -z "$ac_lib"; then
6161 ac_res="none required"
6162 else
6163 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006164 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006169rm -f core conftest.err conftest.$ac_objext \
6170 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006171 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006175if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177else
6178 ac_cv_search_opendir=no
6179fi
6180rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006181LIBS=$ac_func_search_save_LIBS
6182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6184$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006185ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006186if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006187 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189fi
6190
6191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006192
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6194$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006195if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197else
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006199/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201int
6202main ()
6203{
6204return makedev(0, 0);
6205 ;
6206 return 0;
6207}
6208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210 ac_cv_header_sys_types_h_makedev=yes
6211else
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006214rm -f core conftest.err conftest.$ac_objext \
6215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216
6217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6219$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220
6221if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006222ac_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 +00006223if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006224
Matthias Kloseb9621712010-04-24 17:59:49 +00006225$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227fi
6228
6229
6230
6231 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 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 +00006233if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006234
Matthias Kloseb9621712010-04-24 17:59:49 +00006235$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236
6237fi
6238
6239
6240 fi
6241fi
6242
Michael W. Hudson54241132001-12-07 15:38:26 +00006243
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006244# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006245for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006246do :
6247 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006248#ifdef HAVE_CURSES_H
6249#include <curses.h>
6250#endif
6251
Matthias Kloseb9621712010-04-24 17:59:49 +00006252"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006253if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006255#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006256_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006257
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006258fi
6259
6260done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006261
6262
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006265do :
6266 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 +00006267#ifdef HAVE_ASM_TYPES_H
6268#include <asm/types.h>
6269#endif
6270#ifdef HAVE_SYS_SOCKET_H
6271#include <sys/socket.h>
6272#endif
6273
Matthias Kloseb9621712010-04-24 17:59:49 +00006274"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006275if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006277#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006278_ACEOF
6279
6280fi
6281
6282done
6283
6284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006286was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6288$as_echo_n "checking for clock_t in time.h... " >&6; }
6289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006292
6293_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006294if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006295 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006296 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006297else
Martin v. Löwis11437992002-04-12 09:54:03 +00006298
6299
Matthias Kloseb9621712010-04-24 17:59:49 +00006300$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006301
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006302
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006304rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6307$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006308
Neal Norwitz11690112002-07-30 01:08:28 +00006309# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6311$as_echo_n "checking for makedev... " >&6; }
6312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006313/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
Jesus Cea740f53a2010-04-28 11:35:30 +00006315#if defined(MAJOR_IN_MKDEV)
6316#include <sys/mkdev.h>
6317#elif defined(MAJOR_IN_SYSMACROS)
6318#include <sys/sysmacros.h>
6319#else
6320#include <sys/types.h>
6321#endif
6322
Neal Norwitz11690112002-07-30 01:08:28 +00006323int
6324main ()
6325{
Jesus Cea740f53a2010-04-28 11:35:30 +00006326
6327 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006328 ;
6329 return 0;
6330}
Matthias Kloseb159a552010-04-25 21:00:44 +00006331
Neal Norwitz11690112002-07-30 01:08:28 +00006332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006334 ac_cv_has_makedev=yes
6335else
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006338rm -f core conftest.err conftest.$ac_objext \
6339 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006340if test "$ac_cv_has_makedev" = "no"; then
6341 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006343/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006344
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006345#define _OSF_SOURCE 1
6346#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006347
Neal Norwitz11690112002-07-30 01:08:28 +00006348int
6349main ()
6350{
6351 makedev(0, 0)
6352 ;
6353 return 0;
6354}
6355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006356if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006357 ac_cv_has_makedev=yes
6358else
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -f core conftest.err conftest.$ac_objext \
6362 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006363 if test "$ac_cv_has_makedev" = "yes"; then
6364
Matthias Kloseb9621712010-04-24 17:59:49 +00006365$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006366
6367 fi
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6370$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006371if test "$ac_cv_has_makedev" = "yes"; then
6372
Matthias Kloseb9621712010-04-24 17:59:49 +00006373$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006374
6375fi
6376
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6378# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6379# defined, but the compiler does not support pragma redefine_extname,
6380# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6381# structures (such as rlimit64) without declaring them. As a
6382# work-around, disable LFS on such configurations
6383
6384use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6386$as_echo_n "checking Solaris LFS bug... " >&6; }
6387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006388/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006389
6390#define _LARGEFILE_SOURCE 1
6391#define _FILE_OFFSET_BITS 64
6392#include <sys/resource.h>
6393
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394int
6395main ()
6396{
6397struct rlimit foo;
6398 ;
6399 return 0;
6400}
6401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006403 sol_lfs_bug=no
6404else
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6409$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006410if test "$sol_lfs_bug" = "yes"; then
6411 use_lfs=no
6412fi
6413
6414if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006415# Two defines needed to enable largefile support on various platforms
6416# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006419
6420
Matthias Kloseb9621712010-04-24 17:59:49 +00006421$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006422
Martin v. Löwis399a6892002-10-04 10:22:02 +00006423fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006424
Guido van Rossum84e7b241996-08-19 21:59:00 +00006425# Add some code to confdefs.h so that the test for off_t works on SCO
6426cat >> confdefs.h <<\EOF
6427#if defined(SCO_DS)
6428#undef _OFF_T
6429#endif
6430EOF
6431
Guido van Rossumef2255b2000-03-10 22:30:29 +00006432# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006433ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006434if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006436else
Martin v. Löwis11437992002-04-12 09:54:03 +00006437
6438cat >>confdefs.h <<_ACEOF
6439#define mode_t int
6440_ACEOF
6441
6442fi
6443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006445if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447else
Martin v. Löwis11437992002-04-12 09:54:03 +00006448
6449cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006450#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006451_ACEOF
6452
6453fi
6454
Matthias Kloseb9621712010-04-24 17:59:49 +00006455ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006456if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458else
Martin v. Löwis11437992002-04-12 09:54:03 +00006459
6460cat >>confdefs.h <<_ACEOF
6461#define pid_t int
6462_ACEOF
6463
6464fi
6465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006466
Martin v. Löwis11437992002-04-12 09:54:03 +00006467cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006468#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006469_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006470
Matthias Kloseb9621712010-04-24 17:59:49 +00006471ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006472if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474else
Martin v. Löwis11437992002-04-12 09:54:03 +00006475
6476cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006477#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006478_ACEOF
6479
6480fi
6481
Matthias Kloseb9621712010-04-24 17:59:49 +00006482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6483$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006484if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006486else
Matthias Kloseb9621712010-04-24 17:59:49 +00006487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006488/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006489#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006490
6491_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006493 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494 ac_cv_type_uid_t=yes
6495else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496 ac_cv_type_uid_t=no
6497fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006498rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6502$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006503if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507
Matthias Kloseb9621712010-04-24 17:59:49 +00006508$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509
6510fi
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6513case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006514 no|yes) ;; #(
6515 *)
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006518
6519
6520cat >>confdefs.h <<_ACEOF
6521#define uint32_t $ac_cv_c_uint32_t
6522_ACEOF
6523;;
6524 esac
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6527case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528 no|yes) ;; #(
6529 *)
6530
Matthias Kloseb9621712010-04-24 17:59:49 +00006531$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006532
6533
6534cat >>confdefs.h <<_ACEOF
6535#define uint64_t $ac_cv_c_uint64_t
6536_ACEOF
6537;;
6538 esac
6539
Matthias Kloseb9621712010-04-24 17:59:49 +00006540ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6541case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006542 no|yes) ;; #(
6543 *)
6544
6545cat >>confdefs.h <<_ACEOF
6546#define int32_t $ac_cv_c_int32_t
6547_ACEOF
6548;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006549esac
6550
Matthias Kloseb9621712010-04-24 17:59:49 +00006551ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6552case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006553 no|yes) ;; #(
6554 *)
6555
6556cat >>confdefs.h <<_ACEOF
6557#define int64_t $ac_cv_c_int64_t
6558_ACEOF
6559;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006560esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006561
Matthias Kloseb9621712010-04-24 17:59:49 +00006562ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006563if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564
Matthias Kloseb9621712010-04-24 17:59:49 +00006565$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006566
6567fi
6568
Jack Jansendd19cf82001-12-06 22:36:17 +00006569
Michael W. Hudson54241132001-12-07 15:38:26 +00006570# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006571# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006572# The cast to long int works around a bug in the HP C Compiler
6573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6575# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6577$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006578if ${ac_cv_sizeof_int+:} 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 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 +00006582
Martin v. Löwis11437992002-04-12 09:54:03 +00006583else
Matthias Kloseb9621712010-04-24 17:59:49 +00006584 if test "$ac_cv_type_int" = yes; then
6585 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006587as_fn_error 77 "cannot compute sizeof (int)
6588See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006589 else
6590 ac_cv_sizeof_int=0
6591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006593
Martin v. Löwis11437992002-04-12 09:54:03 +00006594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6596$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006597
6598
6599
Martin v. Löwis11437992002-04-12 09:54:03 +00006600cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006601#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006602_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006603
6604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006605# The cast to long int works around a bug in the HP C Compiler
6606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6608# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6610$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006611if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006613else
Matthias Kloseb9621712010-04-24 17:59:49 +00006614 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 +00006615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616else
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 if test "$ac_cv_type_long" = yes; then
6618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006620as_fn_error 77 "cannot compute sizeof (long)
6621See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 else
6623 ac_cv_sizeof_long=0
6624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006626
Martin v. Löwis11437992002-04-12 09:54:03 +00006627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6629$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631
6632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006634#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006635_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006636
6637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638# The cast to long int works around a bug in the HP C Compiler
6639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6641# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6643$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006644if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006646else
Matthias Kloseb9621712010-04-24 17:59:49 +00006647 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 +00006648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649else
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 if test "$ac_cv_type_void_p" = yes; then
6651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006653as_fn_error 77 "cannot compute sizeof (void *)
6654See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006655 else
6656 ac_cv_sizeof_void_p=0
6657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006659
Martin v. Löwis11437992002-04-12 09:54:03 +00006660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6662$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663
6664
6665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006667#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006668_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006669
6670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671# The cast to long int works around a bug in the HP C Compiler
6672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6676$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006677if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 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 +00006681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682else
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 if test "$ac_cv_type_short" = yes; then
6684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006686as_fn_error 77 "cannot compute sizeof (short)
6687See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006688 else
6689 ac_cv_sizeof_short=0
6690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006692
Martin v. Löwis11437992002-04-12 09:54:03 +00006693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6695$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696
6697
6698
Martin v. Löwis11437992002-04-12 09:54:03 +00006699cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006700#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006701_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702
6703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704# The cast to long int works around a bug in the HP C Compiler
6705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6707# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6709$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006710if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 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 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715else
Matthias Kloseb9621712010-04-24 17:59:49 +00006716 if test "$ac_cv_type_float" = yes; then
6717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006719as_fn_error 77 "cannot compute sizeof (float)
6720See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721 else
6722 ac_cv_sizeof_float=0
6723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6728$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729
6730
6731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006733#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006734_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735
6736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737# The cast to long int works around a bug in the HP C Compiler
6738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6740# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6742$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006743if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 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 +00006747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748else
Matthias Kloseb9621712010-04-24 17:59:49 +00006749 if test "$ac_cv_type_double" = yes; then
6750 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006752as_fn_error 77 "cannot compute sizeof (double)
6753See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006754 else
6755 ac_cv_sizeof_double=0
6756 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758
Martin v. Löwis11437992002-04-12 09:54:03 +00006759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6761$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006762
6763
6764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006767_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006768
6769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770# The cast to long int works around a bug in the HP C Compiler
6771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6773# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6775$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006776if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 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 +00006780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 if test "$ac_cv_type_fpos_t" = yes; then
6783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006785as_fn_error 77 "cannot compute sizeof (fpos_t)
6786See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006787 else
6788 ac_cv_sizeof_fpos_t=0
6789 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6794$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006795
6796
6797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006799#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006800_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006801
Michael W. Hudson54241132001-12-07 15:38:26 +00006802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803# The cast to long int works around a bug in the HP C Compiler
6804# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6805# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6806# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6808$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006809if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006811else
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 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 +00006813
Martin v. Löwis18e16552006-02-15 17:27:45 +00006814else
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 if test "$ac_cv_type_size_t" = yes; then
6816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006818as_fn_error 77 "cannot compute sizeof (size_t)
6819See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006820 else
6821 ac_cv_sizeof_size_t=0
6822 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006824
Martin v. Löwis18e16552006-02-15 17:27:45 +00006825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6827$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828
6829
6830
Martin v. Löwis18e16552006-02-15 17:27:45 +00006831cat >>confdefs.h <<_ACEOF
6832#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6833_ACEOF
6834
6835
Christian Heimes400adb02008-02-01 08:12:03 +00006836# The cast to long int works around a bug in the HP C Compiler
6837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6841$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006842if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 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 +00006846
Christian Heimes400adb02008-02-01 08:12:03 +00006847else
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if test "$ac_cv_type_pid_t" = yes; then
6849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006851as_fn_error 77 "cannot compute sizeof (pid_t)
6852See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006853 else
6854 ac_cv_sizeof_pid_t=0
6855 fi
6856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006857
Christian Heimes400adb02008-02-01 08:12:03 +00006858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6860$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006861
6862
6863
6864cat >>confdefs.h <<_ACEOF
6865#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6866_ACEOF
6867
6868
Michael W. Hudson54241132001-12-07 15:38:26 +00006869
Matthias Kloseb9621712010-04-24 17:59:49 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6871$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006872have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876int
6877main ()
6878{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006879long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ;
6881 return 0;
6882}
6883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006885
6886
Matthias Kloseb9621712010-04-24 17:59:49 +00006887$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006888
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006889 have_long_long=yes
6890
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6894$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006895if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896# The cast to long int works around a bug in the HP C Compiler
6897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6901$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006902if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 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 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 if test "$ac_cv_type_long_long" = yes; then
6909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006911as_fn_error 77 "cannot compute sizeof (long long)
6912See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913 else
6914 ac_cv_sizeof_long_long=0
6915 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917
Martin v. Löwis11437992002-04-12 09:54:03 +00006918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6920$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921
6922
6923
Martin v. Löwis11437992002-04-12 09:54:03 +00006924cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006925#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006926_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006927
Michael W. Hudson54241132001-12-07 15:38:26 +00006928
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929fi
6930
Matthias Kloseb9621712010-04-24 17:59:49 +00006931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6932$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006933have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935/* end confdefs.h. */
6936
6937int
6938main ()
6939{
6940long double x; x = (long double)0;
6941 ;
6942 return 0;
6943}
6944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006945if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006946
6947
Matthias Kloseb9621712010-04-24 17:59:49 +00006948$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949
6950 have_long_double=yes
6951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6955$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957# The cast to long int works around a bug in the HP C Compiler
6958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6962$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006963if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965else
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 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 +00006967
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968else
Matthias Kloseb9621712010-04-24 17:59:49 +00006969 if test "$ac_cv_type_long_double" = yes; then
6970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006972as_fn_error 77 "cannot compute sizeof (long double)
6973See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006974 else
6975 ac_cv_sizeof_long_double=0
6976 fi
6977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006978
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6981$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006982
6983
6984
6985cat >>confdefs.h <<_ACEOF
6986#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6987_ACEOF
6988
6989
6990fi
6991
6992
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6994$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006995have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006997/* end confdefs.h. */
6998
6999int
7000main ()
7001{
7002_Bool x; x = (_Bool)0;
7003 ;
7004 return 0;
7005}
7006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007008
7009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007011
7012 have_c99_bool=yes
7013
Thomas Woutersb2137042007-02-01 18:02:27 +00007014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7017$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007018if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019# The cast to long int works around a bug in the HP C Compiler
7020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7022# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7024$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007025if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 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 +00007029
Thomas Woutersb2137042007-02-01 18:02:27 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 if test "$ac_cv_type__Bool" = yes; then
7032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007034as_fn_error 77 "cannot compute sizeof (_Bool)
7035See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036 else
7037 ac_cv_sizeof__Bool=0
7038 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040
Thomas Woutersb2137042007-02-01 18:02:27 +00007041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7043$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044
7045
7046
Thomas Woutersb2137042007-02-01 18:02:27 +00007047cat >>confdefs.h <<_ACEOF
7048#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7049_ACEOF
7050
7051
7052fi
7053
Matthias Kloseb9621712010-04-24 17:59:49 +00007054ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007055 #include <stdint.h>
7056 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007057 #ifdef HAVE_INTTYPES_H
7058 #include <inttypes.h>
7059 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007060"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007061if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007062
7063cat >>confdefs.h <<_ACEOF
7064#define HAVE_UINTPTR_T 1
7065_ACEOF
7066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067# The cast to long int works around a bug in the HP C Compiler
7068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7070# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7072$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007073if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007075else
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 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 +00007077
Martin v. Löwis11437992002-04-12 09:54:03 +00007078else
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 if test "$ac_cv_type_uintptr_t" = yes; then
7080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007082as_fn_error 77 "cannot compute sizeof (uintptr_t)
7083See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084 else
7085 ac_cv_sizeof_uintptr_t=0
7086 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088
Martin v. Löwis11437992002-04-12 09:54:03 +00007089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7091$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092
7093
7094
Martin v. Löwis11437992002-04-12 09:54:03 +00007095cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007096#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007098
Michael W. Hudson54241132001-12-07 15:38:26 +00007099
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007100fi
7101
Thomas Wouters89f507f2006-12-13 04:49:30 +00007102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007103# The cast to long int works around a bug in the HP C Compiler
7104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7106# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7108$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007109if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007113#ifdef HAVE_SYS_TYPES_H
7114#include <sys/types.h>
7115#endif
7116
Matthias Kloseb9621712010-04-24 17:59:49 +00007117"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007119else
Matthias Kloseb9621712010-04-24 17:59:49 +00007120 if test "$ac_cv_type_off_t" = yes; then
7121 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007123as_fn_error 77 "cannot compute sizeof (off_t)
7124See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125 else
7126 ac_cv_sizeof_off_t=0
7127 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7132$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134
7135
Martin v. Löwis11437992002-04-12 09:54:03 +00007136cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007139
Michael W. Hudson54241132001-12-07 15:38:26 +00007140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7143$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007144if test "$have_long_long" = yes
7145then
7146if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007147 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007150
Matthias Kloseb9621712010-04-24 17:59:49 +00007151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7152$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007153else
Matthias Kloseb9621712010-04-24 17:59:49 +00007154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7155$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007156fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007160fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007162# The cast to long int works around a bug in the HP C Compiler
7163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7165# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7167$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007168if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007172#ifdef HAVE_SYS_TYPES_H
7173#include <sys/types.h>
7174#endif
7175#ifdef HAVE_TIME_H
7176#include <time.h>
7177#endif
7178
Matthias Kloseb9621712010-04-24 17:59:49 +00007179"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 if test "$ac_cv_type_time_t" = yes; then
7183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007185as_fn_error 77 "cannot compute sizeof (time_t)
7186See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187 else
7188 ac_cv_sizeof_time_t=0
7189 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7194$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007201
Michael W. Hudson54241132001-12-07 15:38:26 +00007202
7203
Trent Mick635f6fb2000-08-23 21:33:05 +00007204# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007205ac_save_cc="$CC"
7206if test "$ac_cv_kpthread" = "yes"
7207then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007208elif test "$ac_cv_kthread" = "yes"
7209then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007210elif test "$ac_cv_pthread" = "yes"
7211then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7215$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007216have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007219
7220 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007221int
7222main ()
7223{
Guido van Rossum12580492000-09-24 16:47:19 +00007224pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007225 ;
7226 return 0;
7227}
Matthias Kloseb159a552010-04-25 21:00:44 +00007228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007230if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007231 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7235$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007236if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007237 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7242$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007243if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245else
Matthias Kloseb9621712010-04-24 17:59:49 +00007246 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247#ifdef HAVE_PTHREAD_H
7248#include <pthread.h>
7249#endif
7250
Matthias Kloseb9621712010-04-24 17:59:49 +00007251"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253else
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 if test "$ac_cv_type_pthread_t" = yes; then
7255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007257as_fn_error 77 "cannot compute sizeof (pthread_t)
7258See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259 else
7260 ac_cv_sizeof_pthread_t=0
7261 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007263
Trent Mick635f6fb2000-08-23 21:33:05 +00007264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7266$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268
7269
Martin v. Löwis11437992002-04-12 09:54:03 +00007270cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007271#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007272_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007273
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274
Trent Mick635f6fb2000-08-23 21:33:05 +00007275fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007276CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007277
Michael W. Hudson54241132001-12-07 15:38:26 +00007278
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007279case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007280 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007281 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7282 ;;
7283 Darwin/*)
7284 OTHER_LIBTOOL_OPT=""
7285 ;;
7286esac
7287
7288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007289ARCH_RUN_32BIT=""
7290
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007291case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007292 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007293 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7294 if test "${enable_universalsdk}"; then
7295 :
7296 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007297 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007298 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007301 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007302 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007303 if test ${gcc_version} '<' 4.0
7304 then
7305 LIBTOOL_CRUFT="-lcc_dynamic"
7306 else
7307 LIBTOOL_CRUFT=""
7308 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007310 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315 #include <unistd.h>
7316 int main(int argc, char*argv[])
7317 {
7318 if (sizeof(long) == 4) {
7319 return 0;
7320 } else {
7321 return 1;
7322 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007323 }
7324
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007326if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327 ac_osx_32bit=yes
7328else
Matthias Kloseb9621712010-04-24 17:59:49 +00007329 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333fi
7334
7335
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007336 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007337 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338 i386)
7339 MACOSX_DEFAULT_ARCH="i386"
7340 ;;
7341 ppc)
7342 MACOSX_DEFAULT_ARCH="ppc"
7343 ;;
7344 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007345 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 ;;
7347 esac
7348 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007349 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007350 i386)
7351 MACOSX_DEFAULT_ARCH="x86_64"
7352 ;;
7353 ppc)
7354 MACOSX_DEFAULT_ARCH="ppc64"
7355 ;;
7356 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007357 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007358 ;;
7359 esac
7360
7361 #ARCH_RUN_32BIT="true"
7362 fi
7363
7364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007366 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367esac
7368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7370$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007371if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007372then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007373 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007375 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7380$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007381 if test $enable_shared = "yes"
7382 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007383 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 +00007384 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7387$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007388fi
7389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7391$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007392case $ac_sys_system/$ac_sys_release in
7393 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7398$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007399 ;;
7400 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7402$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007403 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007404esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007405
Guido van Rossum0a516c91994-09-12 10:58:40 +00007406# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007407
Michael W. Hudson54241132001-12-07 15:38:26 +00007408
7409
7410
7411
Benjamin Peterson99f03762010-04-11 22:15:28 +00007412
Thomas Wouters477c8d52006-05-27 19:21:47 +00007413
Georg Brandlb1441c72009-01-03 22:33:39 +00007414
Thomas Wouters477c8d52006-05-27 19:21:47 +00007415cat >>confdefs.h <<_ACEOF
7416#define SHLIB_EXT "$SO"
7417_ACEOF
7418
Guido van Rossum0a516c91994-09-12 10:58:40 +00007419# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007420# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007421# (Shared libraries in this instance are shared modules to be loaded into
7422# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7424$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007425if test -z "$LDSHARED"
7426then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007428 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007429 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007430 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007431 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007432 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007433 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007435 if test "$GCC" = "yes" ; then
7436 LDSHARED='$(CC) -shared'
7437 LDCXXSHARED='$(CXX) -shared'
7438 else
7439 LDSHARED='$(CC) -G'
7440 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007441 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007442 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 if test "$GCC" = "yes" ; then
7444 LDSHARED='$(CC) -shared'
7445 LDCXXSHARED='$(CXX) -shared'
7446 else
7447 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007448 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007449 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007450 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007451 LDSHARED='$(CC) -bundle'
7452 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007453 if test "$enable_framework" ; then
7454 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007455 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7456 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007457 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007458 else
7459 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007460 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007462 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007463 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007464 LDSHARED='$(CC) -bundle'
7465 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007466 if test "$enable_framework" ; then
7467 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007468 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7469 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007470 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007471 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007472 # No framework, use the Python app as bundle-loader
7473 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007474 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007476 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007477 Darwin/*)
7478 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7479 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007480
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007481 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007482 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007483 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007484 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007485 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007486 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7487 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007488 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007489 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007490 LDSHARED='$(CC) -bundle'
7491 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007492 if test "$enable_framework" ; then
7493 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007494 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7495 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007497 else
7498 # No framework, use the Python app as bundle-loader
7499 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7500 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007502 fi
7503 fi
7504 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 Linux*|GNU*|QNX*)
7506 LDSHARED='$(CC) -shared'
7507 LDCXXSHARED='$(CXX) -shared';;
7508 BSD/OS*/4*)
7509 LDSHARED="gcc -shared"
7510 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007511 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007512 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007513 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007514 LDSHARED='$(CC) -shared'
7515 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007516 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007517 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007518 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007519 OpenBSD*)
7520 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7521 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007522 LDSHARED='$(CC) -shared $(CCSHARED)'
7523 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007524 else
7525 case `uname -r` in
7526 [01].* | 2.[0-7] | 2.[0-7].*)
7527 LDSHARED="ld -Bshareable ${LDFLAGS}"
7528 ;;
7529 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007530 LDSHARED='$(CC) -shared $(CCSHARED)'
7531 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007532 ;;
7533 esac
7534 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007536 LDSHARED='$(CC) -shared'
7537 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007538 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007539 if test "$GCC" = "yes" ; then
7540 LDSHARED='$(CC) -shared'
7541 LDCXXSHARED='$(CXX) -shared'
7542 else
7543 LDSHARED='$(CC) -G'
7544 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007545 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 SCO_SV*)
7547 LDSHARED='$(CC) -Wl,-G,-Bexport'
7548 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7549 CYGWIN*)
7550 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7551 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007552 *) LDSHARED="ld";;
7553 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7556$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007557LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007558BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007560# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7562$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007563if test -z "$CCSHARED"
7564then
Guido van Rossum07397971997-04-29 21:49:50 +00007565 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007566 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007567 then CCSHARED="-fPIC";
7568 elif test `uname -p` = sparc;
7569 then CCSHARED="-xcode=pic32";
7570 else CCSHARED="-Kpic";
7571 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007572 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007573 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007574 else CCSHARED="+z";
7575 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007576 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007577 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007578 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007579 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007580 if test "$GCC" = "yes"
7581 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007582 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007583 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007584 SCO_SV*)
7585 if test "$GCC" = "yes"
7586 then CCSHARED="-fPIC"
7587 else CCSHARED="-Kpic -belf"
7588 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007589 IRIX*/6*) case $CC in
7590 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007591 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007592 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007593 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7596$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007597# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007598# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7600$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601if test -z "$LINKFORSHARED"
7602then
Guido van Rossum07397971997-04-29 21:49:50 +00007603 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007604 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007605 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007606 LINKFORSHARED="-Wl,-E -Wl,+s";;
7607# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007608 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007609 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007610 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007612 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007613 if test "$enable_framework"
7614 then
Jack Jansenda49e192005-01-07 13:08:22 +00007615 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007616 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007617 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007618 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007619 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007620 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007621 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007622 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7623 then
7624 LINKFORSHARED="-Wl,--export-dynamic"
7625 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007626 SunOS/5*) case $CC in
7627 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007628 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007629 then
7630 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007631 fi;;
7632 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007633 CYGWIN*)
7634 if test $enable_shared = "no"
7635 then
7636 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7637 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007638 QNX*)
7639 # -Wl,-E causes the symbols to be added to the dynamic
7640 # symbol table so that they can be found when a module
7641 # is loaded. -N 2048K causes the stack size to be set
7642 # to 2048 kilobytes so that the stack doesn't overflow
7643 # when running test_compile.py.
7644 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7648$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649
Michael W. Hudson54241132001-12-07 15:38:26 +00007650
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007651
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7653$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007654if test ! "$LIBRARY" = "$LDLIBRARY"
7655then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007656 case $ac_sys_system in
7657 CYGWIN*)
7658 # Cygwin needs CCSHARED when building extension DLLs
7659 # but not when building the interpreter DLL.
7660 CFLAGSFORSHARED='';;
7661 *)
7662 CFLAGSFORSHARED='$(CCSHARED)'
7663 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7666$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007667
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007668# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7669# library (with --enable-shared).
7670# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007671# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7672# if it is not required, since it creates a dependency of the shared library
7673# to LIBS. This, in turn, means that applications linking the shared libpython
7674# don't need to link LIBS explicitly. The default should be only changed
7675# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7678$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007679case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007680 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007681 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007682esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7684$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007685
7686
Guido van Rossum627b2d71993-12-24 10:39:16 +00007687# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7689$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007690if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007692else
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007694LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698/* Override any GCC internal prototype to avoid an error.
7699 Use char because int might match the return type of a GCC
7700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007701#ifdef __cplusplus
7702extern "C"
7703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007704char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007705int
7706main ()
7707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ;
7710 return 0;
7711}
7712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007715else
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7723$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007724if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007725 cat >>confdefs.h <<_ACEOF
7726#define HAVE_LIBDL 1
7727_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007729 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007730
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007731fi
7732 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7734$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007735if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007737else
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007739LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743/* Override any GCC internal prototype to avoid an error.
7744 Use char because int might match the return type of a GCC
7745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746#ifdef __cplusplus
7747extern "C"
7748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007749char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
7752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763rm -f core conftest.err conftest.$ac_objext \
7764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007765LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7768$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007769if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 cat >>confdefs.h <<_ACEOF
7771#define HAVE_LIBDLD 1
7772_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007774 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776fi
7777 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007778
Georg Brandlb1441c72009-01-03 22:33:39 +00007779# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007780if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7782$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007783if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007785else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007786 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790/* Override any GCC internal prototype to avoid an error.
7791 Use char because int might match the return type of a GCC
7792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793#ifdef __cplusplus
7794extern "C"
7795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007796char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007797int
7798main ()
7799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ;
7802 return 0;
7803}
7804_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805for ac_lib in '' pthread rt posix4; do
7806 if test -z "$ac_lib"; then
7807 ac_res="none required"
7808 else
7809 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815rm -f core conftest.err conftest.$ac_objext \
7816 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007817 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007821if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823else
7824 ac_cv_search_sem_init=no
7825fi
7826rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007827LIBS=$ac_func_search_save_LIBS
7828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7830$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007832if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007834
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007835fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007836 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007837 # posix4 on Solaris 2.6
7838 # pthread (first!) on Linux
7839fi
7840
Martin v. Löwis19d17342003-06-14 21:03:05 +00007841# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7843$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007844if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846else
7847 ac_check_lib_save_LIBS=$LIBS
7848LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007850/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852/* Override any GCC internal prototype to avoid an error.
7853 Use char because int might match the return type of a GCC
7854 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007855#ifdef __cplusplus
7856extern "C"
7857#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007858char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859int
7860main ()
7861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863 ;
7864 return 0;
7865}
7866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007868 ac_cv_lib_intl_textdomain=yes
7869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872rm -f core conftest.err conftest.$ac_objext \
7873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874LIBS=$ac_check_lib_save_LIBS
7875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7877$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007878if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881
Brett Cannonc6d936e2009-06-07 20:09:53 +00007882 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007883fi
7884
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007885
7886# checks for system dependent C++ extensions support
7887case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7889$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007891/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
7893 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007894int
7895main ()
7896{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007897loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ;
7899 return 0;
7900}
Matthias Kloseb159a552010-04-25 21:00:44 +00007901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007903if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007904
Matthias Kloseb159a552010-04-25 21:00:44 +00007905
Matthias Kloseb9621712010-04-24 17:59:49 +00007906$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007907
Matthias Kloseb159a552010-04-25 21:00:44 +00007908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007909$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007910
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007911else
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007914$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007915
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917rm -f core conftest.err conftest.$ac_objext \
7918 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007919 *) ;;
7920esac
7921
Guido van Rossum70c7f481998-03-26 18:44:10 +00007922# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7924$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007925if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007929LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933/* Override any GCC internal prototype to avoid an error.
7934 Use char because int might match the return type of a GCC
7935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936#ifdef __cplusplus
7937extern "C"
7938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007939char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7958$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007959if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007960 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007961fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007962 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7964$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007965if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007967else
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007969LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973/* Override any GCC internal prototype to avoid an error.
7974 Use char because int might match the return type of a GCC
7975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007976#ifdef __cplusplus
7977extern "C"
7978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007979char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007980int
7981main ()
7982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ;
7985 return 0;
7986}
7987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007993rm -f core conftest.err conftest.$ac_objext \
7994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007995LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7998$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007999if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008000 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008001fi
8002 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8005$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8011$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008012LIBS="$withval $LIBS"
8013
8014else
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017fi
8018
Guido van Rossum7f43da71994-08-01 12:15:30 +00008019
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008020if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008021 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8022set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008025if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008027else
8028 case $PKG_CONFIG in
8029 [\\/]* | ?:[\\/]*)
8030 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8031 ;;
8032 *)
8033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036 IFS=$as_save_IFS
8037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8040 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008042 break 2
8043 fi
8044done
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046IFS=$as_save_IFS
8047
8048 ;;
8049esac
8050fi
8051PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8052if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8054$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008055else
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008058fi
8059
8060
8061fi
8062if test -z "$ac_cv_path_PKG_CONFIG"; then
8063 ac_pt_PKG_CONFIG=$PKG_CONFIG
8064 # Extract the first word of "pkg-config", so it can be a program name with args.
8065set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8067$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008068if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008070else
8071 case $ac_pt_PKG_CONFIG in
8072 [\\/]* | ?:[\\/]*)
8073 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8074 ;;
8075 *)
8076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8077for as_dir in $PATH
8078do
8079 IFS=$as_save_IFS
8080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8083 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008085 break 2
8086 fi
8087done
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089IFS=$as_save_IFS
8090
8091 ;;
8092esac
8093fi
8094ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8095if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8097$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8100$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101fi
8102
8103 if test "x$ac_pt_PKG_CONFIG" = x; then
8104 PKG_CONFIG=""
8105 else
8106 case $cross_compiling:$ac_tool_warned in
8107yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008110ac_tool_warned=yes ;;
8111esac
8112 PKG_CONFIG=$ac_pt_PKG_CONFIG
8113 fi
8114else
8115 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8116fi
8117
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008118
8119# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8121$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008122
8123# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008124if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008125 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008126else
8127 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128fi
8129
8130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8132$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008133
8134# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8136$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008137
8138# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008140 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008141else
8142 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008143fi
8144
8145
8146if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8148else
8149 LIBFFI_INCLUDEDIR=""
8150fi
8151
8152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8154$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008155
Benjamin Peterson076ed002010-10-31 17:11:02 +00008156# Check for support for loadable sqlite extensions
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8158$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8159# Check whether --enable-loadable-sqlite-extensions was given.
8160if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8161 enableval=$enable_loadable_sqlite_extensions;
8162else
8163 enable_loadable_sqlite_extensions="no"
8164fi
8165
8166
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8168$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8169
Matthias Klose55708cc2009-04-30 08:06:49 +00008170# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8172$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008173
8174# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008175if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008176 withval=$with_dbmliborder;
8177if test x$with_dbmliborder = xyes
8178then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008179as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008180else
8181 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8182 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8183 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008184 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008185 fi
8186 done
8187fi
8188fi
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8191$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008192
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008193# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008194
8195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8197$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008200if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 withval=$with_signal_module;
8202fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008203
8204
8205if test -z "$with_signal_module"
8206then with_signal_module="yes"
8207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8209$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008210
8211if test "${with_signal_module}" = "yes"; then
8212 USE_SIGNAL_MODULE=""
8213 SIGNAL_OBJS=""
8214else
8215 USE_SIGNAL_MODULE="#"
8216 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8217fi
8218
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008219# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008220
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008221USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008222
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8224$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
Guido van Rossumec2f0731997-01-22 20:54:01 +00008226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8231$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008232LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008233if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008234 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008235fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8238$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239fi
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
8242# Templates for things AC_DEFINEd more than once.
8243# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008244
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8249$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008252if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253 withval=$with_threads;
8254fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008255
8256
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008257# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008260if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 withval=$with_thread; with_threads=$with_thread
8262fi
8263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008264
8265if test -z "$with_threads"
8266then with_threads="yes"
8267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8269$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008270
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008271
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008272if test "$with_threads" = "no"
8273then
8274 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008275elif test "$ac_cv_pthread_is_default" = yes
8276then
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008278
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008279 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008281
8282 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008284elif test "$ac_cv_kpthread" = "yes"
8285then
8286 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008287 if test "$ac_cv_cxx_thread" = "yes"; then
8288 CXX="$CXX -Kpthread"
8289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008291
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008293 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008294elif test "$ac_cv_kthread" = "yes"
8295then
8296 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008297 if test "$ac_cv_cxx_thread" = "yes"; then
8298 CXX="$CXX -Kthread"
8299 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008301
8302 posix_threads=yes
8303 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008304elif test "$ac_cv_pthread" = "yes"
8305then
8306 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008307 if test "$ac_cv_cxx_thread" = "yes"; then
8308 CXX="$CXX -pthread"
8309 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008311
8312 posix_threads=yes
8313 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008314else
8315 if test ! -z "$with_threads" -a -d "$with_threads"
8316 then LDFLAGS="$LDFLAGS -L$with_threads"
8317 fi
8318 if test ! -z "$withval" -a -d "$withval"
8319 then LDFLAGS="$LDFLAGS -L$withval"
8320 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321
8322 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008323 # define _POSIX_THREADS in unistd.h. Some apparently don't
8324 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8326$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008329
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008330#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008331#ifdef _POSIX_THREADS
8332yes
8333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008338 unistd_defines_pthreads=yes
8339else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008340 unistd_defines_pthreads=no
8341fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008342rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8345$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 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 +00008350if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008357
8358 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008359 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008360else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 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 +00008363if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008370
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008371 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008372else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008373
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008374 # Just looking for pthread_create in libpthread is not enough:
8375 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8376 # So we really have to include pthread.h, and then link.
8377 _libs=$LIBS
8378 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8380$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008383#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008384
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008385void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008386int
8387main ()
8388{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008389
8390pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ;
8392 return 0;
8393}
8394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8398$as_echo "yes" >&6; }
8399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008405 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008407if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008409
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008410 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008411 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008412else
Guido van Rossumad678af1998-10-02 14:42:15 +00008413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8415$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008416if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418else
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008420LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424/* Override any GCC internal prototype to avoid an error.
8425 Use char because int might match the return type of a GCC
8426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008427#ifdef __cplusplus
8428extern "C"
8429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008430char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008431int
8432main ()
8433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 ;
8436 return 0;
8437}
8438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008441else
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008444rm -f core conftest.err conftest.$ac_objext \
8445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8449$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008450if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008452
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008453 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008454 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008455 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008456else
Greg Steinadf63d62000-07-05 10:38:09 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8459$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008460if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008464LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468/* Override any GCC internal prototype to avoid an error.
8469 Use char because int might match the return type of a GCC
8470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008471#ifdef __cplusplus
8472extern "C"
8473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008474char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ;
8480 return 0;
8481}
8482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008488rm -f core conftest.err conftest.$ac_objext \
8489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008490LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8493$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008494if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008497 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008498 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008500else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8503$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008504if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008508LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512/* Override any GCC internal prototype to avoid an error.
8513 Use char because int might match the return type of a GCC
8514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef __cplusplus
8516extern "C"
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532rm -f core conftest.err conftest.$ac_objext \
8533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8537$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008538if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008542 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008544else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8547$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008548if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008552LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8581$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008582if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008588else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008589
Martin v. Löwis130fb172001-07-19 11:00:41 +00008590 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008591fi
8592
Guido van Rossum627b2d71993-12-24 10:39:16 +00008593
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008594fi
8595
Guido van Rossum0be3e491997-05-22 20:33:33 +00008596fi
8597
Guido van Rossum49545951997-12-02 19:28:29 +00008598fi
8599
Guido van Rossumb93a8621998-05-07 13:27:32 +00008600fi
8601
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603rm -f core conftest.err conftest.$ac_objext \
8604 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605fi
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
8608fi
8609
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008610
Michael W. Hudson54241132001-12-07 15:38:26 +00008611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8613$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008614if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616else
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008618LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622/* Override any GCC internal prototype to avoid an error.
8623 Use char because int might match the return type of a GCC
8624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625#ifdef __cplusplus
8626extern "C"
8627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008628char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008629int
8630main ()
8631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ;
8634 return 0;
8635}
8636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642rm -f core conftest.err conftest.$ac_objext \
8643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8647$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008648if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008650
Martin v. Löwis130fb172001-07-19 11:00:41 +00008651 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008652 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654fi
8655
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008656
Neal Norwitza978ab02002-11-02 16:58:05 +00008657 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8659$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008660if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008662else
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008664LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671#ifdef __cplusplus
8672extern "C"
8673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008674char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675int
8676main ()
8677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ;
8680 return 0;
8681}
8682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8693$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008694if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008697 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008698 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008699 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008700fi
8701
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008702 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008703
Martin v. Löwis130fb172001-07-19 11:00:41 +00008704 if test "$USE_THREAD_MODULE" != "#"
8705 then
8706 # If the above checks didn't disable threads, (at least) OSF1
8707 # needs this '-threads' argument during linking.
8708 case $ac_sys_system in
8709 OSF1) LDLAST=-threads;;
8710 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008711 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008712fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008713
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008714if test "$posix_threads" = "yes"; then
8715 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008716
Matthias Kloseb9621712010-04-24 17:59:49 +00008717$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008718
8719 fi
8720
8721 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8722 case $ac_sys_system/$ac_sys_release in
8723 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008724$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008726 ;;
8727 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008728$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008729
8730 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008731 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008732$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008733
8734 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008735 AIX/6)
8736$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8737
8738 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 esac
8740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8742$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008743 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008747 ac_cv_pthread_system_supported=no
8748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008751#include <pthread.h>
8752 void *foo(void *parm) {
8753 return NULL;
8754 }
8755 main() {
8756 pthread_attr_t attr;
8757 pthread_t id;
8758 if (pthread_attr_init(&attr)) exit(-1);
8759 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8760 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8761 exit(0);
8762 }
8763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008764if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008765 ac_cv_pthread_system_supported=yes
8766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773
Guido van Rossum627b2d71993-12-24 10:39:16 +00008774fi
8775
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8777$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 if test "$ac_cv_pthread_system_supported" = "yes"; then
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781
8782 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 for ac_func in pthread_sigmask
8784do :
8785 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008786if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008790 case $ac_sys_system in
8791 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792
Matthias Kloseb9621712010-04-24 17:59:49 +00008793$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008794
8795 ;;
8796 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797fi
8798done
8799
8800fi
8801
8802
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008803# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008804
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8806$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008808if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8812$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008813 ipv6=no
8814 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8816$as_echo "yes" >&6; }
8817 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008818
8819 ipv6=yes
8820 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008822else
Martin v. Löwis11437992002-04-12 09:54:03 +00008823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008828 ipv6=no
8829
8830else
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008833 /* AF_INET6 available check */
8834#include <sys/types.h>
8835#include <sys/socket.h>
8836main()
8837{
8838 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8839 exit(1);
8840 else
8841 exit(0);
8842}
8843
Martin v. Löwis11437992002-04-12 09:54:03 +00008844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008845if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8848$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008849 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851else
Matthias Kloseb159a552010-04-25 21:00:44 +00008852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008856
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860fi
8861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008863if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8865$as_echo_n "checking if RFC2553 API is available... " >&6; }
8866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008868
8869 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008870#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008874struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008875 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ;
8877 return 0;
8878}
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
Martin v. Löwis11437992002-04-12 09:54:03 +00008880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008881if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008882
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008884$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008885 ipv6=yes
8886
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008887else
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008890$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008891 ipv6=no
8892
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008895fi
8896
8897if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008899
8900fi
8901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902fi
8903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008904
8905ipv6type=unknown
8906ipv6lib=none
8907ipv6trylibc=no
8908
8909if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8911$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008912 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8913 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008914 case $i in
8915 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919#include <netinet/in.h>
8920#ifdef IPV6_INRIA_VERSION
8921yes
8922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008926 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008928rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008929
8930 ;;
8931 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008935#include <netinet/in.h>
8936#ifdef __KAME__
8937yes
8938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942 ipv6type=$i;
8943 ipv6lib=inet6
8944 ipv6libdir=/usr/local/v6/lib
8945 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008947rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948
8949 ;;
8950 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008952/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008953
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954#include <features.h>
8955#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8956yes
8957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008958_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961 ipv6type=$i;
8962 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008964rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965
8966 ;;
8967 linux-inet6)
8968 if test -d /usr/inet6; then
8969 ipv6type=$i
8970 ipv6lib=inet6
8971 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008972 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973 fi
8974 ;;
8975 solaris)
8976 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008977 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978 ipv6type=$i
8979 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980 fi
8981 fi
8982 ;;
8983 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987#include <sys/param.h>
8988#ifdef _TOSHIBA_INET6
8989yes
8990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 ipv6type=$i;
8995 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008996 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008998rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999
9000 ;;
9001 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009003/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009004
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005#include </usr/local/v6/include/sys/v6config.h>
9006#ifdef __V6D__
9007yes
9008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009009_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012 ipv6type=$i;
9013 ipv6lib=v6;
9014 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009015 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009017rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018
9019 ;;
9020 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009022/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024#include <sys/param.h>
9025#ifdef _ZETA_MINAMI_INET6
9026yes
9027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031 ipv6type=$i;
9032 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009033 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009035rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036
9037 ;;
9038 esac
9039 if test "$ipv6type" != "unknown"; then
9040 break
9041 fi
9042 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9044$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045fi
9046
9047if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9048 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9049 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9050 echo "using lib$ipv6lib"
9051 else
9052 if test $ipv6trylibc = "yes"; then
9053 echo "using libc"
9054 else
9055 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9056 echo "You need to fetch lib$ipv6lib.a from appropriate"
9057 echo 'ipv6 kit and compile beforehand.'
9058 exit 1
9059 fi
9060 fi
9061fi
9062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9064$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009066/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
9068 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009069int
9070main ()
9071{
9072FSIORefNum fRef = 0
9073 ;
9074 return 0;
9075}
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009078if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009079
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9084$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009085
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009086else
Matthias Kloseb159a552010-04-25 21:00:44 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009090
9091fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9093
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9096$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009098# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009099if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100 withval=$with_doc_strings;
9101fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009103
9104if test -z "$with_doc_strings"
9105then with_doc_strings="yes"
9106fi
9107if test "$with_doc_strings" != "no"
9108then
9109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009111
9112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9114$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009115
Antoine Pitrou042b1282010-08-13 21:15:58 +00009116# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9118$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009123if test "$withval" != no
9124then
9125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9129$as_echo "yes" >&6; }
9130else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009132fi
9133else
Matthias Kloseb9621712010-04-24 17:59:49 +00009134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9135$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136fi
9137
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009138
9139# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9141$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009144if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 withval=$with_pymalloc;
9146fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009147
Neil Schemenauera35c6882001-02-27 04:45:05 +00009148
Neil Schemenauer16c22972002-03-22 15:34:49 +00009149if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009150then
9151 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009152 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009153fi
9154if test "$with_pymalloc" != "no"
9155then
Martin v. Löwis11437992002-04-12 09:54:03 +00009156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009158
9159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9161$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009162
Benjamin Peterson05159c42009-12-03 03:01:27 +00009163# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9165$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009166
9167# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009168if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009169 withval=$with_valgrind;
9170else
9171 with_valgrind=no
9172fi
9173
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9175$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009176if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 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 +00009178if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009181
9182else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009183 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009184
9185fi
9186
9187
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009188 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009189fi
9190
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009191# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009192
Guido van Rossum98935bf2001-09-05 19:13:16 +00009193DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009194
Guido van Rossume97ee181999-12-20 21:27:22 +00009195# the dlopen() function means we might want to use dynload_shlib.o. some
9196# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009197for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009198do :
9199 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009200if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009202#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009203_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009204
Guido van Rossume97ee181999-12-20 21:27:22 +00009205fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009206done
Guido van Rossume97ee181999-12-20 21:27:22 +00009207
Michael W. Hudson54241132001-12-07 15:38:26 +00009208
Guido van Rossume97ee181999-12-20 21:27:22 +00009209# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9210# loading of modules.
9211
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9213$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009214if test -z "$DYNLOADFILE"
9215then
9216 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009217 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9218 if test "$ac_cv_func_dlopen" = yes
9219 then DYNLOADFILE="dynload_shlib.o"
9220 else DYNLOADFILE="dynload_aix.o"
9221 fi
9222 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009223 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009224 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9225 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009226 *)
9227 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9228 # out any dynamic loading
9229 if test "$ac_cv_func_dlopen" = yes
9230 then DYNLOADFILE="dynload_shlib.o"
9231 else DYNLOADFILE="dynload_stub.o"
9232 fi
9233 ;;
9234 esac
9235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9237$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009238if test "$DYNLOADFILE" != "dynload_stub.o"
9239then
Martin v. Löwis11437992002-04-12 09:54:03 +00009240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009242
9243fi
9244
Neil Schemenauer4e425612001-06-19 15:44:15 +00009245# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9246
Michael W. Hudson54241132001-12-07 15:38:26 +00009247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9249$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009250if test -z "$MACHDEP_OBJS"
9251then
Jack Jansene578a632001-08-15 01:27:14 +00009252 MACHDEP_OBJS=$extra_machdep_objs
9253else
9254 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9257$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009258
Guido van Rossum627b2d71993-12-24 10:39:16 +00009259# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009260for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009261 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009262 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009263 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009264 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009265 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009266 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009267 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9268 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009269 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009270 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009271 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009272 truncate uname unsetenv utimes waitpid wait3 wait4 \
9273 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009274do :
9275 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9276ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009277if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009279#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009280_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009282fi
9283done
9284
Michael W. Hudson54241132001-12-07 15:38:26 +00009285
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286# For some functions, having a definition is not sufficient, since
9287# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9289$as_echo_n "checking for chroot... " >&6; }
9290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009292#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009293int
9294main ()
9295{
9296void *x=chroot
9297 ;
9298 return 0;
9299}
9300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009302
Matthias Kloseb9621712010-04-24 17:59:49 +00009303$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009304
Matthias Kloseb159a552010-04-25 21:00:44 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009306$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009307else
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310
9311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9314$as_echo_n "checking for link... " >&6; }
9315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009316/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009318int
9319main ()
9320{
9321void *x=link
9322 ;
9323 return 0;
9324}
9325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327
Matthias Kloseb9621712010-04-24 17:59:49 +00009328$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329
Matthias Kloseb159a552010-04-25 21:00:44 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009331$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009332else
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335
9336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9339$as_echo_n "checking for symlink... " >&6; }
9340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009343int
9344main ()
9345{
9346void *x=symlink
9347 ;
9348 return 0;
9349}
9350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354
Matthias Kloseb159a552010-04-25 21:00:44 +00009355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009356$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357else
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9359$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360
9361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9364$as_echo_n "checking for fchdir... " >&6; }
9365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009367#include <unistd.h>
9368int
9369main ()
9370{
9371void *x=fchdir
9372 ;
9373 return 0;
9374}
9375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009377
Matthias Kloseb9621712010-04-24 17:59:49 +00009378$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009379
Matthias Kloseb159a552010-04-25 21:00:44 +00009380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9384$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009385
9386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9389$as_echo_n "checking for fsync... " >&6; }
9390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009392#include <unistd.h>
9393int
9394main ()
9395{
9396void *x=fsync
9397 ;
9398 return 0;
9399}
9400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009404
Matthias Kloseb159a552010-04-25 21:00:44 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009406$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009407else
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9409$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410
9411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9414$as_echo_n "checking for fdatasync... " >&6; }
9415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009416/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009417#include <unistd.h>
9418int
9419main ()
9420{
9421void *x=fdatasync
9422 ;
9423 return 0;
9424}
9425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429
Matthias Kloseb159a552010-04-25 21:00:44 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009431$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435
9436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9439$as_echo_n "checking for epoll... " >&6; }
9440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009441/* end confdefs.h. */
9442#include <sys/epoll.h>
9443int
9444main ()
9445{
9446void *x=epoll_create
9447 ;
9448 return 0;
9449}
9450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009454
Matthias Kloseb159a552010-04-25 21:00:44 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009456$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009457else
Matthias Kloseb9621712010-04-24 17:59:49 +00009458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009460
9461fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9464$as_echo_n "checking for kqueue... " >&6; }
9465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009466/* end confdefs.h. */
9467
9468#include <sys/types.h>
9469#include <sys/event.h>
9470
9471int
9472main ()
9473{
9474int x=kqueue()
9475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009482
Matthias Kloseb159a552010-04-25 21:00:44 +00009483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009484$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485else
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488
9489fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009491# On some systems (eg. FreeBSD 5), we would find a definition of the
9492# functions ctermid_r, setgroups in the library, but no prototype
9493# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9494# address to avoid compiler warnings and potential miscompilations
9495# because of the missing prototypes.
9496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9498$as_echo_n "checking for ctermid_r... " >&6; }
9499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009501
Martin v. Löwisd5843682002-11-21 20:41:28 +00009502#include <stdio.h>
9503
Martin v. Löwisd5843682002-11-21 20:41:28 +00009504int
9505main ()
9506{
9507void* p = ctermid_r
9508 ;
9509 return 0;
9510}
9511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009515
Matthias Kloseb159a552010-04-25 21:00:44 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009521
9522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9524
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9526$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009527if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009528 $as_echo_n "(cached) " >&6
9529else
9530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009531/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009532#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009533int
9534main ()
9535{
9536void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009537
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009538 ;
9539 return 0;
9540}
9541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009542if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009543 ac_cv_flock_decl=yes
9544else
9545 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009546
9547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009549
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009550fi
9551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9552$as_echo "$ac_cv_flock_decl" >&6; }
9553if test "x${ac_cv_flock_decl}" = xyes; then
9554 for ac_func in flock
9555do :
9556 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009557if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009558 cat >>confdefs.h <<_ACEOF
9559#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009560_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009561
Antoine Pitroua3000072010-09-07 14:52:42 +00009562else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009564$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009565if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009566 $as_echo_n "(cached) " >&6
9567else
9568 ac_check_lib_save_LIBS=$LIBS
9569LIBS="-lbsd $LIBS"
9570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9571/* end confdefs.h. */
9572
9573/* Override any GCC internal prototype to avoid an error.
9574 Use char because int might match the return type of a GCC
9575 builtin and then its argument prototype would still apply. */
9576#ifdef __cplusplus
9577extern "C"
9578#endif
9579char flock ();
9580int
9581main ()
9582{
9583return flock ();
9584 ;
9585 return 0;
9586}
9587_ACEOF
9588if ac_fn_c_try_link "$LINENO"; then :
9589 ac_cv_lib_bsd_flock=yes
9590else
9591 ac_cv_lib_bsd_flock=no
9592fi
9593rm -f core conftest.err conftest.$ac_objext \
9594 conftest$ac_exeext conftest.$ac_ext
9595LIBS=$ac_check_lib_save_LIBS
9596fi
9597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9598$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009599if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009600 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009601
9602
9603$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9604
9605
9606fi
9607
9608
9609fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009610done
9611
Antoine Pitroua3000072010-09-07 14:52:42 +00009612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9615$as_echo_n "checking for getpagesize... " >&6; }
9616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009617/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009618
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009619#include <unistd.h>
9620
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009621int
9622main ()
9623{
9624void* p = getpagesize
9625 ;
9626 return 0;
9627}
9628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009630
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009632
Matthias Kloseb159a552010-04-25 21:00:44 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009634$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009635else
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009638
9639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642for ac_prog in true
9643do
9644 # Extract the first word of "$ac_prog", so it can be a program name with args.
9645set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009648if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650else
9651 if test -n "$TRUE"; then
9652 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9653else
9654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9655for as_dir in $PATH
9656do
9657 IFS=$as_save_IFS
9658 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660 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 +00009661 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 $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 +00009663 break 2
9664 fi
9665done
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009668
9669fi
9670fi
9671TRUE=$ac_cv_prog_TRUE
9672if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9674$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675else
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009678fi
9679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009681 test -n "$TRUE" && break
9682done
9683test -n "$TRUE" || TRUE="/bin/true"
9684
9685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9687$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009688if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009690else
9691 ac_check_lib_save_LIBS=$LIBS
9692LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699#ifdef __cplusplus
9700extern "C"
9701#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009702char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703int
9704main ()
9705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712 ac_cv_lib_c_inet_aton=yes
9713else
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009718LIBS=$ac_check_lib_save_LIBS
9719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9721$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009722if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009723 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009724else
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9726$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009727if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009729else
9730 ac_check_lib_save_LIBS=$LIBS
9731LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009733/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735/* Override any GCC internal prototype to avoid an error.
9736 Use char because int might match the return type of a GCC
9737 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738#ifdef __cplusplus
9739extern "C"
9740#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009741char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742int
9743main ()
9744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746 ;
9747 return 0;
9748}
9749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751 ac_cv_lib_resolv_inet_aton=yes
9752else
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009755rm -f core conftest.err conftest.$ac_objext \
9756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009757LIBS=$ac_check_lib_save_LIBS
9758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9760$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009761if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762 cat >>confdefs.h <<_ACEOF
9763#define HAVE_LIBRESOLV 1
9764_ACEOF
9765
9766 LIBS="-lresolv $LIBS"
9767
9768fi
9769
9770
9771fi
9772
9773
Christian Heimesd0764e22007-12-04 15:00:33 +00009774# On Tru64, chflags seems to be present, but calling it will
9775# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9777$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009778if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009782 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009783else
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009785/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009786[
Christian Heimesd0764e22007-12-04 15:00:33 +00009787#include <sys/stat.h>
9788#include <unistd.h>
9789int main(int argc, char*argv[])
9790{
9791 if(chflags(argv[0], 0) != 0)
9792 return 1;
9793 return 0;
9794}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009795]
Christian Heimesd0764e22007-12-04 15:00:33 +00009796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009798 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009804fi
9805
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9809$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009810if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009812if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009813 ac_cv_have_chflags="yes"
9814else
9815 ac_cv_have_chflags="no"
9816fi
9817
9818fi
9819if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822
9823fi
9824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9826$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009827if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009829else
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009831 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009832else
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009834/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009835[
Christian Heimesd0764e22007-12-04 15:00:33 +00009836#include <sys/stat.h>
9837#include <unistd.h>
9838int main(int argc, char*argv[])
9839{
9840 if(lchflags(argv[0], 0) != 0)
9841 return 1;
9842 return 0;
9843}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009844]
Christian Heimesd0764e22007-12-04 15:00:33 +00009845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009847 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009853fi
9854
9855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9858$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009859if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009861if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009862 ac_cv_have_lchflags="yes"
9863else
9864 ac_cv_have_lchflags="no"
9865fi
9866
9867fi
9868if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009869
Matthias Kloseb9621712010-04-24 17:59:49 +00009870$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009871
9872fi
9873
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009874case $ac_sys_system/$ac_sys_release in
9875Darwin/*)
9876 _CUR_CFLAGS="${CFLAGS}"
9877 _CUR_LDFLAGS="${LDFLAGS}"
9878 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9879 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9880 ;;
9881esac
9882
Matthias Kloseb9621712010-04-24 17:59:49 +00009883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9884$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009885if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009887else
9888 ac_check_lib_save_LIBS=$LIBS
9889LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009891/* end confdefs.h. */
9892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893/* Override any GCC internal prototype to avoid an error.
9894 Use char because int might match the return type of a GCC
9895 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896#ifdef __cplusplus
9897extern "C"
9898#endif
9899char inflateCopy ();
9900int
9901main ()
9902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009904 ;
9905 return 0;
9906}
9907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009908if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009909 ac_cv_lib_z_inflateCopy=yes
9910else
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009913rm -f core conftest.err conftest.$ac_objext \
9914 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915LIBS=$ac_check_lib_save_LIBS
9916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9918$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009919if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009922
9923fi
9924
9925
9926case $ac_sys_system/$ac_sys_release in
9927Darwin/*)
9928 CFLAGS="${_CUR_CFLAGS}"
9929 LDFLAGS="${_CUR_LDFLAGS}"
9930 ;;
9931esac
9932
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9934$as_echo_n "checking for hstrerror... " >&6; }
9935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009937
Martin v. Löwise9416172003-05-03 10:12:45 +00009938#include <netdb.h>
9939
Martin v. Löwise9416172003-05-03 10:12:45 +00009940int
9941main ()
9942{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009943void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009944 ;
9945 return 0;
9946}
9947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009949
Matthias Kloseb9621712010-04-24 17:59:49 +00009950$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009951
Matthias Kloseb159a552010-04-25 21:00:44 +00009952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009953$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009954else
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009957
9958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959rm -f core conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9963$as_echo_n "checking for inet_aton... " >&6; }
9964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009966
Martin v. Löwis86d66262006-02-17 08:40:11 +00009967#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009968#include <sys/socket.h>
9969#include <netinet/in.h>
9970#include <arpa/inet.h>
9971
Martin v. Löwise9416172003-05-03 10:12:45 +00009972int
9973main ()
9974{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009975void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009976 ;
9977 return 0;
9978}
9979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009983
Matthias Kloseb159a552010-04-25 21:00:44 +00009984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009985$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009986else
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009989
9990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009991rm -f core conftest.err conftest.$ac_objext \
9992 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993
Matthias Kloseb9621712010-04-24 17:59:49 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9995$as_echo_n "checking for inet_pton... " >&6; }
9996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009998
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009999#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010000#include <sys/socket.h>
10001#include <netinet/in.h>
10002#include <arpa/inet.h>
10003
Martin v. Löwise9416172003-05-03 10:12:45 +000010004int
10005main ()
10006{
10007void* p = inet_pton
10008 ;
10009 return 0;
10010}
10011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010015
Matthias Kloseb159a552010-04-25 21:00:44 +000010016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010018else
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010021
10022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010024
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010025# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10027$as_echo_n "checking for setgroups... " >&6; }
10028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010029/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010030
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010031#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010032#ifdef HAVE_GRP_H
10033#include <grp.h>
10034#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010035
Martin v. Löwisd5843682002-11-21 20:41:28 +000010036int
10037main ()
10038{
10039void* p = setgroups
10040 ;
10041 return 0;
10042}
10043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010047
Matthias Kloseb159a552010-04-25 21:00:44 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010050else
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010053
10054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010057# check for openpty and forkpty
10058
10059for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010060do :
10061 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010062if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010064#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010065_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010067else
Matthias Kloseb9621712010-04-24 17:59:49 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10069$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010070if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010072else
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010074LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078/* Override any GCC internal prototype to avoid an error.
10079 Use char because int might match the return type of a GCC
10080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081#ifdef __cplusplus
10082extern "C"
10083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010084char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010085int
10086main ()
10087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ;
10090 return 0;
10091}
10092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010095else
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010098rm -f core conftest.err conftest.$ac_objext \
10099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010100LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10103$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010104if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010106 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010107else
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10109$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010110if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010112else
10113 ac_check_lib_save_LIBS=$LIBS
10114LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116/* end confdefs.h. */
10117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118/* Override any GCC internal prototype to avoid an error.
10119 Use char because int might match the return type of a GCC
10120 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121#ifdef __cplusplus
10122extern "C"
10123#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010124char openpty ();
10125int
10126main ()
10127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010129 ;
10130 return 0;
10131}
10132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010134 ac_cv_lib_bsd_openpty=yes
10135else
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138rm -f core conftest.err conftest.$ac_objext \
10139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010140LIBS=$ac_check_lib_save_LIBS
10141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10143$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010144if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010146 LIBS="$LIBS -lbsd"
10147fi
10148
10149
10150fi
10151
Fred Drake8cef4cf2000-06-28 16:40:38 +000010152
10153fi
10154done
10155
10156for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010157do :
10158 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010159if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010161#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164else
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10166$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010167if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010171LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175/* Override any GCC internal prototype to avoid an error.
10176 Use char because int might match the return type of a GCC
10177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010178#ifdef __cplusplus
10179extern "C"
10180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010181char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010182int
10183main ()
10184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ;
10187 return 0;
10188}
10189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010192else
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195rm -f core conftest.err conftest.$ac_objext \
10196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10200$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010201if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010203 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10206$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010207if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209else
10210 ac_check_lib_save_LIBS=$LIBS
10211LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213/* end confdefs.h. */
10214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215/* Override any GCC internal prototype to avoid an error.
10216 Use char because int might match the return type of a GCC
10217 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221char forkpty ();
10222int
10223main ()
10224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226 ;
10227 return 0;
10228}
10229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010231 ac_cv_lib_bsd_forkpty=yes
10232else
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010235rm -f core conftest.err conftest.$ac_objext \
10236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237LIBS=$ac_check_lib_save_LIBS
10238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10240$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010241if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010243 LIBS="$LIBS -lbsd"
10244fi
10245
10246
10247fi
10248
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249
10250fi
10251done
10252
Jack Jansendd19cf82001-12-06 22:36:17 +000010253
Christian Heimesb186d002008-03-18 15:15:01 +000010254# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010255for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010256do :
10257 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010258if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010261_ACEOF
10262
10263fi
10264done
10265
10266
Michael W. Hudson54241132001-12-07 15:38:26 +000010267# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010269do :
10270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010275_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010276
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010278done
10279
Michael W. Hudson54241132001-12-07 15:38:26 +000010280
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010281ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10282if test "x$ac_cv_func_dup2" = xyes; then :
10283 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010284
Martin v. Löwis1142de32002-03-29 16:28:31 +000010285else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010287 *" dup2.$ac_objext "* ) ;;
10288 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010290esac
10291
Martin v. Löwis1142de32002-03-29 16:28:31 +000010292fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010293
10294ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10295if test "x$ac_cv_func_getcwd" = xyes; then :
10296 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10297
10298else
10299 case " $LIBOBJS " in
10300 *" getcwd.$ac_objext "* ) ;;
10301 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10302 ;;
10303esac
10304
10305fi
10306
10307ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10308if test "x$ac_cv_func_strdup" = xyes; then :
10309 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10310
10311else
10312 case " $LIBOBJS " in
10313 *" strdup.$ac_objext "* ) ;;
10314 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10315 ;;
10316esac
10317
10318fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010319
10320
10321for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010322do :
10323 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010324if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010330#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010331int
10332main ()
10333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010334getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010342
Guido van Rossum627b2d71993-12-24 10:39:16 +000010343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010345
Guido van Rossum627b2d71993-12-24 10:39:16 +000010346fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010347done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010348
Jack Jansen150753c2003-03-29 22:07:47 +000010349for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010350do :
10351 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010352if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010358#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010359int
10360main ()
10361{
10362setpgrp(0,0);
10363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010370
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010373
10374fi
10375done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010376
Thomas Wouters3a584202000-08-05 23:28:51 +000010377for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010378do :
10379 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010380if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010386#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010387int
10388main ()
10389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010390gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ;
10392 return 0;
10393}
10394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010395if ac_fn_c_try_compile "$LINENO"; then :
10396
Guido van Rossum627b2d71993-12-24 10:39:16 +000010397else
Skip Montanaro6dead952003-09-25 14:50:04 +000010398
Matthias Kloseb9621712010-04-24 17:59:49 +000010399$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010400
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Guido van Rossum627b2d71993-12-24 10:39:16 +000010402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010405fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010406done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010407
Michael W. Hudson54241132001-12-07 15:38:26 +000010408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10410$as_echo_n "checking for major... " >&6; }
10411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010414#if defined(MAJOR_IN_MKDEV)
10415#include <sys/mkdev.h>
10416#elif defined(MAJOR_IN_SYSMACROS)
10417#include <sys/sysmacros.h>
10418#else
10419#include <sys/types.h>
10420#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010421
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010422int
10423main ()
10424{
10425
10426 makedev(major(0),minor(0));
10427
10428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010433
10434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10438$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010439
10440else
Skip Montanaro6dead952003-09-25 14:50:04 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010444
10445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446rm -f core conftest.err conftest.$ac_objext \
10447 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010448
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010449# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010450# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10452$as_echo_n "checking for getaddrinfo... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010455
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010456#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010457#include <sys/socket.h>
10458#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010459#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010460
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
10463{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010464getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010470 have_getaddrinfo=yes
10471else
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
10476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10477$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010478if test $have_getaddrinfo = yes
10479then
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10481$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010482 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010484else
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010486 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010487else
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010489/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010490
10491#include <sys/types.h>
10492#include <netdb.h>
10493#include <string.h>
10494#include <sys/socket.h>
10495#include <netinet/in.h>
10496
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010497int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010498{
10499 int passive, gaierr, inet4 = 0, inet6 = 0;
10500 struct addrinfo hints, *ai, *aitop;
10501 char straddr[INET6_ADDRSTRLEN], strport[16];
10502
10503 for (passive = 0; passive <= 1; passive++) {
10504 memset(&hints, 0, sizeof(hints));
10505 hints.ai_family = AF_UNSPEC;
10506 hints.ai_flags = passive ? AI_PASSIVE : 0;
10507 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010508 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010509 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10510 (void)gai_strerror(gaierr);
10511 goto bad;
10512 }
10513 for (ai = aitop; ai; ai = ai->ai_next) {
10514 if (ai->ai_addr == NULL ||
10515 ai->ai_addrlen == 0 ||
10516 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10517 straddr, sizeof(straddr), strport, sizeof(strport),
10518 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10519 goto bad;
10520 }
10521 switch (ai->ai_family) {
10522 case AF_INET:
10523 if (strcmp(strport, "54321") != 0) {
10524 goto bad;
10525 }
10526 if (passive) {
10527 if (strcmp(straddr, "0.0.0.0") != 0) {
10528 goto bad;
10529 }
10530 } else {
10531 if (strcmp(straddr, "127.0.0.1") != 0) {
10532 goto bad;
10533 }
10534 }
10535 inet4++;
10536 break;
10537 case AF_INET6:
10538 if (strcmp(strport, "54321") != 0) {
10539 goto bad;
10540 }
10541 if (passive) {
10542 if (strcmp(straddr, "::") != 0) {
10543 goto bad;
10544 }
10545 } else {
10546 if (strcmp(straddr, "::1") != 0) {
10547 goto bad;
10548 }
10549 }
10550 inet6++;
10551 break;
10552 case AF_UNSPEC:
10553 goto bad;
10554 break;
10555 default:
10556 /* another family support? */
10557 break;
10558 }
10559 }
10560 }
10561
10562 if (!(inet4 == 0 || inet4 == 2))
10563 goto bad;
10564 if (!(inet6 == 0 || inet6 == 2))
10565 goto bad;
10566
10567 if (aitop)
10568 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010569 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010570
10571 bad:
10572 if (aitop)
10573 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010574 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010575}
10576
Martin v. Löwis11437992002-04-12 09:54:03 +000010577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010578if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010579 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010587fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010588
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10592$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10593
Mark Dickinson2df5d282009-12-31 21:22:50 +000010594if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010595then
10596 if test $ipv6 = yes
10597 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010598 echo 'Fatal: You must get working getaddrinfo() function.'
10599 echo ' or you can specify "--disable-ipv6"'.
10600 exit 1
10601 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010602else
Martin v. Löwis11437992002-04-12 09:54:03 +000010603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010605
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010607
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010608for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010609do :
10610 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010611if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010614_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010615
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010616fi
10617done
10618
Michael W. Hudson54241132001-12-07 15:38:26 +000010619
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10622$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 +000010623if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010628#include <sys/types.h>
10629#include <sys/time.h>
10630#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010631
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
10635if ((struct tm *) 0)
10636return 0;
10637 ;
10638 return 0;
10639}
10640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010643else
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10649$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010650if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653
10654fi
10655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10657$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 +000010658if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663#include <sys/types.h>
10664#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Martin v. Löwis11437992002-04-12 09:54:03 +000010666int
10667main ()
10668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669struct tm tm;
10670 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 ;
10673 return 0;
10674}
10675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677 ac_cv_struct_tm=time.h
10678else
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10684$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010685if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010688
10689fi
10690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691ac_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 +000010692#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010695if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
10697cat >>confdefs.h <<_ACEOF
10698#define HAVE_STRUCT_TM_TM_ZONE 1
10699_ACEOF
10700
10701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010702fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010703
Martin v. Löwis11437992002-04-12 09:54:03 +000010704if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010707
10708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10710"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010711if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715fi
10716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010718#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719_ACEOF
10720
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10722$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010723if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010727/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010728#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729#if !HAVE_DECL_TZNAME
10730extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010732
Martin v. Löwis11437992002-04-12 09:54:03 +000010733int
10734main ()
10735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 ;
10738 return 0;
10739}
10740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742 ac_cv_var_tzname=yes
10743else
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746rm -f core conftest.err conftest.$ac_objext \
10747 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10750$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010751 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010755 fi
10756fi
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758ac_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 +000010759if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010760
10761cat >>confdefs.h <<_ACEOF
10762#define HAVE_STRUCT_STAT_ST_RDEV 1
10763_ACEOF
10764
10765
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010766fi
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768ac_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 +000010769if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010770
Martin v. Löwis11437992002-04-12 09:54:03 +000010771cat >>confdefs.h <<_ACEOF
10772#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10773_ACEOF
10774
10775
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010776fi
10777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778ac_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 +000010779if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010780
10781cat >>confdefs.h <<_ACEOF
10782#define HAVE_STRUCT_STAT_ST_FLAGS 1
10783_ACEOF
10784
10785
10786fi
10787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788ac_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 +000010789if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010790
10791cat >>confdefs.h <<_ACEOF
10792#define HAVE_STRUCT_STAT_ST_GEN 1
10793_ACEOF
10794
10795
10796fi
10797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798ac_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 +000010799if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010800
10801cat >>confdefs.h <<_ACEOF
10802#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10803_ACEOF
10804
10805
10806fi
10807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808ac_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 +000010809if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010810
Martin v. Löwis11437992002-04-12 09:54:03 +000010811cat >>confdefs.h <<_ACEOF
10812#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10813_ACEOF
10814
10815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010817
10818else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010820 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10822 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010823esac
10824
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010825fi
10826
Michael W. Hudson54241132001-12-07 15:38:26 +000010827
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10830$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010831if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833else
Matthias Kloseb159a552010-04-25 21:00:44 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010837#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010838int
10839main ()
10840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010841return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ;
10843 return 0;
10844}
10845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847 ac_cv_header_time_altzone=yes
10848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853fi
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10856$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010857if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010860
10861fi
10862
Guido van Rossumda88dad1995-01-26 00:46:29 +000010863was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10865$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010867/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010868
10869#include <sys/types.h>
10870#include <sys/select.h>
10871#include <sys/time.h>
10872
Martin v. Löwis11437992002-04-12 09:54:03 +000010873int
10874main ()
10875{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010876;
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 ;
10878 return 0;
10879}
10880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010885
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010886 was_it_defined=yes
10887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10891$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10894$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010895if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010900#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010901int
10902main ()
10903{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010910 ac_cv_struct_addrinfo=yes
10911else
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10915fi
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10918$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010919if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010922
10923fi
10924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10926$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010927if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929else
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932
10933# include <sys/types.h>
10934# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010935int
10936main ()
10937{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 ;
10940 return 0;
10941}
10942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944 ac_cv_struct_sockaddr_storage=yes
10945else
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10949fi
10950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10952$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956
10957fi
10958
Guido van Rossum627b2d71993-12-24 10:39:16 +000010959# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10962$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010963if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010968$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
10972static int test_array [1 - 2 * !(((char) -1) < 0)];
10973test_array [0] = 0
10974
10975 ;
10976 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010977}
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010979if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010980 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010981else
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10987$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010988if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990
10991fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10994$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010995if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001int
11002main ()
11003{
11004/* FIXME: Include the comments suggested by Paul. */
11005#ifndef __cplusplus
11006 /* Ultrix mips cc rejects this. */
11007 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 char const *const *pcpcc;
11011 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 /* NEC SVR4.0.2 mips cc rejects this. */
11013 struct point {int x, y;};
11014 static struct point const zero = {0,0};
11015 /* AIX XL C 1.02.0.0 rejects this.
11016 It does not let you subtract one const X* pointer from another in
11017 an arm of an if-expression whose if-part is not a constant
11018 expression */
11019 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 ++pcpcc;
11023 ppc = (char**) pcpcc;
11024 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 { /* SCO 3.2v4 cc rejects this. */
11026 char *t;
11027 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 }
11032 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11033 int x[] = {25, 17};
11034 const int *foo = &x[0];
11035 ++foo;
11036 }
11037 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11038 typedef const int *iptr;
11039 iptr p = 0;
11040 ++p;
11041 }
11042 { /* AIX XL C 1.02.0.0 rejects this saying
11043 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11044 struct s { int j; const int *ap[3]; };
11045 struct s *b; b->j = 5;
11046 }
11047 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11048 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011052#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011053
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 ;
11055 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011056}
Martin v. Löwis11437992002-04-12 09:54:03 +000011057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011059 ac_cv_c_const=yes
11060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11066$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011067if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011070
11071fi
11072
Michael W. Hudson54241132001-12-07 15:38:26 +000011073
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11076$as_echo_n "checking for working volatile... " >&6; }
11077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011089 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011090else
Skip Montanaro6dead952003-09-25 14:50:04 +000011091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011094
Guido van Rossum627b2d71993-12-24 10:39:16 +000011095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11098$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011099
Guido van Rossumda88dad1995-01-26 00:46:29 +000011100works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11102$as_echo_n "checking for working signed char... " >&6; }
11103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011104/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011105
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
11108{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011115 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011116else
Skip Montanaro6dead952003-09-25 14:50:04 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011120
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11124$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125
Guido van Rossumda88dad1995-01-26 00:46:29 +000011126have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11128$as_echo_n "checking for prototypes... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011131int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011132int
11133main ()
11134{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Matthias Kloseb9621712010-04-24 17:59:49 +000011142$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Kloseb159a552010-04-25 21:00:44 +000011144 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11148$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149
Guido van Rossumda88dad1995-01-26 00:46:29 +000011150works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11152$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011155
11156#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011157int foo(int x, ...) {
11158 va_list va;
11159 va_start(va, x);
11160 va_arg(va, int);
11161 va_arg(va, char *);
11162 va_arg(va, double);
11163 return 0;
11164}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011165
Martin v. Löwis11437992002-04-12 09:54:03 +000011166int
11167main ()
11168{
Guido van Rossum90eea071996-08-30 20:58:57 +000011169return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 ;
11171 return 0;
11172}
11173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
11176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011179 works=yes
11180
Guido van Rossum627b2d71993-12-24 10:39:16 +000011181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11184$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185
Martin v. Löwisd6320502004-08-12 13:45:08 +000011186# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11188$as_echo_n "checking for socketpair... " >&6; }
11189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011190/* end confdefs.h. */
11191
11192#include <sys/types.h>
11193#include <sys/socket.h>
11194
11195int
11196main ()
11197{
11198void *x=socketpair
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011212
11213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011215
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011216# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11218$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011221#include <sys/types.h>
11222#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011223int
11224main ()
11225{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226struct sockaddr x;
11227x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_compile "$LINENO"; then :
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11234$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011237
11238else
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011241
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011244
Guido van Rossumda88dad1995-01-26 00:46:29 +000011245va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11247$as_echo_n "checking whether va_list is an array... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011250
11251#ifdef HAVE_STDARG_PROTOTYPES
11252#include <stdarg.h>
11253#else
11254#include <varargs.h>
11255#endif
11256
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
11266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011267else
Skip Montanaro6dead952003-09-25 14:50:04 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011271
Guido van Rossumda88dad1995-01-26 00:46:29 +000011272 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11277$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011279# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
11281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011283if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11288$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011289 OLD_CFLAGS=$CFLAGS
11290 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011293
11294# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Martin v. Löwis11437992002-04-12 09:54:03 +000011296int
11297main ()
11298{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011299
11300 char *name;
11301 struct hostent *he, *res;
11302 char buffer[2048];
11303 int buflen = 2048;
11304 int h_errnop;
11305
11306 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
11308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011315
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11320$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011322else
Skip Montanaro6dead952003-09-25 14:50:04 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11327$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011336
11337 char *name;
11338 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011339 char buffer[2048];
11340 int buflen = 2048;
11341 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011342
Matthias Kloseb159a552010-04-25 21:00:44 +000011343 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Matthias Kloseb159a552010-04-25 21:00:44 +000011354$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11357$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011359else
Skip Montanaro6dead952003-09-25 14:50:04 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11364$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11366/* end confdefs.h. */
11367
11368# include <netdb.h>
11369
11370int
11371main ()
11372{
11373
11374 char *name;
11375 struct hostent *he;
11376 struct hostent_data data;
11377
11378 (void) gethostbyname_r(name, he, &data);
11379
11380 ;
11381 return 0;
11382}
11383_ACEOF
11384if ac_fn_c_try_compile "$LINENO"; then :
11385
11386 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11387
11388
11389$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11390
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11392$as_echo "yes" >&6; }
11393
11394else
11395
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011407 CFLAGS=$OLD_CFLAGS
11408
11409else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 for ac_func in gethostbyname
11412do :
11413 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011414if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011417_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011418
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011419fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011420done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011421
Michael W. Hudson54241132001-12-07 15:38:26 +000011422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423fi
11424
Michael W. Hudson54241132001-12-07 15:38:26 +000011425
11426
11427
11428
11429
11430
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431# checks for system services
11432# (none yet)
11433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011435ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011436if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011437
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011438else
Matthias Kloseb9621712010-04-24 17:59:49 +000011439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11440$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011441if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443else
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011445LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449/* Override any GCC internal prototype to avoid an error.
11450 Use char because int might match the return type of a GCC
11451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011452#ifdef __cplusplus
11453extern "C"
11454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011455char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011469rm -f core conftest.err conftest.$ac_objext \
11470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11474$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011475if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 cat >>confdefs.h <<_ACEOF
11477#define HAVE_LIBIEEE 1
11478_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011480 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011481
Guido van Rossum627b2d71993-12-24 10:39:16 +000011482fi
11483
Michael W. Hudson54241132001-12-07 15:38:26 +000011484
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011485fi
11486
Michael W. Hudson54241132001-12-07 15:38:26 +000011487
Guido van Rossum7f253911997-05-09 02:42:48 +000011488# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11490$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011495if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011496then
11497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011499
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11501$as_echo "yes" >&6; }
11502else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011504fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508fi
11509
Guido van Rossum7f253911997-05-09 02:42:48 +000011510
Guido van Rossum7f43da71994-08-01 12:15:30 +000011511# check for --with-libm=...
11512
Guido van Rossum563e7081996-09-10 18:20:48 +000011513case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011514Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011515*) LIBM=-lm
11516esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11518$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011523if test "$withval" = no
11524then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11526$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011527elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011528then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11530$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011531else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011532fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011533else
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11535$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536fi
11537
Guido van Rossum7f43da71994-08-01 12:15:30 +000011538
11539# check for --with-libc=...
11540
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11542$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011547if test "$withval" = no
11548then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11550$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011551elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011552then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11554$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011555else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011556fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11559$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560fi
11561
Guido van Rossum7f43da71994-08-01 12:15:30 +000011562
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563# **************************************************
11564# * Check for various properties of floating point *
11565# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11568$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011569if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011571else
11572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011574 ac_cv_little_endian_double=no
11575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011577/* end confdefs.h. */
11578
11579#include <string.h>
11580int main() {
11581 double x = 9006104071832581.0;
11582 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11583 return 0;
11584 else
11585 return 1;
11586}
11587
11588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590 ac_cv_little_endian_double=yes
11591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596fi
11597
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598fi
11599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11601$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011602if test "$ac_cv_little_endian_double" = yes
11603then
11604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606
11607fi
11608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11610$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011611if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613else
11614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011616 ac_cv_big_endian_double=no
11617else
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011619/* end confdefs.h. */
11620
11621#include <string.h>
11622int main() {
11623 double x = 9006104071832581.0;
11624 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11625 return 0;
11626 else
11627 return 1;
11628}
11629
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632 ac_cv_big_endian_double=yes
11633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638fi
11639
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640fi
11641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11643$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644if test "$ac_cv_big_endian_double" = yes
11645then
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648
11649fi
11650
11651# Some ARM platforms use a mixed-endian representation for doubles.
11652# While Python doesn't currently have full support for these platforms
11653# (see e.g., issue 1762561), we can at least make sure that float <-> string
11654# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11656$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011657if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659else
11660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011662 ac_cv_mixed_endian_double=no
11663else
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665/* end confdefs.h. */
11666
11667#include <string.h>
11668int main() {
11669 double x = 9006104071832581.0;
11670 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11671 return 0;
11672 else
11673 return 1;
11674}
11675
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678 ac_cv_mixed_endian_double=yes
11679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684fi
11685
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686fi
11687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11689$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690if test "$ac_cv_mixed_endian_double" = yes
11691then
11692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694
11695fi
11696
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011697# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011698# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011699# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011700# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011701# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011702# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011703
11704# This inline assembler syntax may also work for suncc and icc,
11705# so we try it on all platforms.
11706
Matthias Kloseb9621712010-04-24 17:59:49 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11708$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710/* end confdefs.h. */
11711
11712int
11713main ()
11714{
11715
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011716 unsigned short cw;
11717 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11718 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719
11720 ;
11721 return 0;
11722}
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725 have_gcc_asm_for_x87=yes
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11731$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011732if test "$have_gcc_asm_for_x87" = yes
11733then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011738
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011739# Detect whether system arithmetic is subject to x87-style double
11740# rounding issues. The result of this test has little meaning on non
11741# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11742# mode is round-to-nearest and double rounding issues are present, and
11743# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11745$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746# $BASECFLAGS may affect the result
11747ac_save_cc="$CC"
11748CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011749if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011750 ac_cv_x87_double_rounding=no
11751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011753/* end confdefs.h. */
11754
11755#include <stdlib.h>
11756#include <math.h>
11757int main() {
11758 volatile double x, y, z;
11759 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11760 x = 0.99999999999999989; /* 1-2**-53 */
11761 y = 1./x;
11762 if (y != 1.)
11763 exit(0);
11764 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11765 x = 1e16;
11766 y = 2.99999;
11767 z = x + y;
11768 if (z != 1e16+4.)
11769 exit(0);
11770 /* both tests show evidence of double rounding */
11771 exit(1);
11772}
11773
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011776 ac_cv_x87_double_rounding=no
11777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011782fi
11783
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11786$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011787if test "$ac_cv_x87_double_rounding" = yes
11788then
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011791
11792fi
11793
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011794# ************************************
11795# * Check for mathematical functions *
11796# ************************************
11797
11798LIBS_SAVE=$LIBS
11799LIBS="$LIBS $LIBM"
11800
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011801for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11802do :
11803 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11804ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011805if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011806 cat >>confdefs.h <<_ACEOF
11807#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11808_ACEOF
11809
11810fi
11811done
11812
11813for ac_func in hypot lgamma log1p round tgamma
11814do :
11815 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11816ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011817if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011818 cat >>confdefs.h <<_ACEOF
11819#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11820_ACEOF
11821
11822fi
11823done
11824
11825ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11826"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011827if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011828 ac_have_decl=1
11829else
11830 ac_have_decl=0
11831fi
11832
11833cat >>confdefs.h <<_ACEOF
11834#define HAVE_DECL_ISINF $ac_have_decl
11835_ACEOF
11836ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11837"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011838if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011839 ac_have_decl=1
11840else
11841 ac_have_decl=0
11842fi
11843
11844cat >>confdefs.h <<_ACEOF
11845#define HAVE_DECL_ISNAN $ac_have_decl
11846_ACEOF
11847ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11848"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011849if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011850 ac_have_decl=1
11851else
11852 ac_have_decl=0
11853fi
11854
11855cat >>confdefs.h <<_ACEOF
11856#define HAVE_DECL_ISFINITE $ac_have_decl
11857_ACEOF
11858
11859
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011860# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11861# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11863$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011864if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011866else
11867
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011869 ac_cv_tanh_preserves_zero_sign=no
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011872/* end confdefs.h. */
11873
11874#include <math.h>
11875#include <stdlib.h>
11876int main() {
11877 /* return 0 if either negative zeros don't exist
11878 on this platform or if negative zeros exist
11879 and tanh(-0.) == -0. */
11880 if (atan2(0., -1.) == atan2(-0., -1.) ||
11881 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11882 else exit(1);
11883}
11884
11885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011887 ac_cv_tanh_preserves_zero_sign=yes
11888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011893fi
11894
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011895fi
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11898$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011899if test "$ac_cv_tanh_preserves_zero_sign" = yes
11900then
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011903
11904fi
11905
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906if test "$ac_cv_func_log1p" = yes
11907then
11908 # On some versions of AIX, log1p(-0.) returns 0. instead of
11909 # -0. See issue #9920.
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11911$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011912 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011913 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011916 if test "$cross_compiling" = yes; then :
11917 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011918else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011922 #include <math.h>
11923 #include <stdlib.h>
11924 int main() {
11925 /* Fail if the signs of log1p(-0.) and -0. can be
11926 distinguished. */
11927 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11928 return 0;
11929 else
11930 return 1;
11931 }
11932
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011933_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011934if ac_fn_c_try_run "$LINENO"; then :
11935 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011936else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011937 ac_cv_log1p_drops_zero_sign=yes
11938fi
11939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011941fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011942
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011943fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011944
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11946$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11947fi
11948if test "$ac_cv_log1p_drops_zero_sign" = yes
11949then
11950
11951$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11952
11953fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011954
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011955LIBS=$LIBS_SAVE
11956
Mark Dickinsona614f042009-11-28 12:48:43 +000011957# For multiprocessing module, check that sem_open
11958# actually works. For FreeBSD versions <= 7.2,
11959# the kernel module that provides POSIX semaphores
11960# isn't loaded by default, so an attempt to call
11961# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11963$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011964if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011968 ac_cv_posix_semaphores_enabled=yes
11969else
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011971/* end confdefs.h. */
11972
11973#include <unistd.h>
11974#include <fcntl.h>
11975#include <stdio.h>
11976#include <semaphore.h>
11977#include <sys/stat.h>
11978
11979int main(void) {
11980 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11981 if (a == SEM_FAILED) {
11982 perror("sem_open");
11983 return 1;
11984 }
11985 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011986 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011987 return 0;
11988}
11989
11990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011992 ac_cv_posix_semaphores_enabled=yes
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011998fi
11999
12000
Mark Dickinsona614f042009-11-28 12:48:43 +000012001fi
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12004$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012005if test $ac_cv_posix_semaphores_enabled = no
12006then
12007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012009
12010fi
12011
Mark Dickinson10683072009-04-18 21:18:19 +000012012# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12014$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012015if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012019 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012022/* end confdefs.h. */
12023
12024#include <unistd.h>
12025#include <fcntl.h>
12026#include <stdio.h>
12027#include <semaphore.h>
12028#include <sys/stat.h>
12029
12030int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012031 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012032 int count;
12033 int res;
12034 if(a==SEM_FAILED){
12035 perror("sem_open");
12036 return 1;
12037
12038 }
12039 res = sem_getvalue(a, &count);
12040 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012041 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012042 return res==-1 ? 1 : 0;
12043}
12044
Mark Dickinson10683072009-04-18 21:18:19 +000012045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012053fi
12054
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012056fi
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12059$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012060if test $ac_cv_broken_sem_getvalue = yes
12061then
12062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012064
12065fi
12066
Mark Dickinsonbd792642009-03-18 20:06:12 +000012067# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12069$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012070# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012071if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012072 enableval=$enable_big_digits; case $enable_big_digits in
12073yes)
12074 enable_big_digits=30 ;;
12075no)
12076 enable_big_digits=15 ;;
1207715|30)
12078 ;;
12079*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012080 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 +000012081esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12083$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012084
12085cat >>confdefs.h <<_ACEOF
12086#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12087_ACEOF
12088
12089
12090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12092$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012093fi
12094
12095
Guido van Rossumef2255b2000-03-10 22:30:29 +000012096# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012097ac_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 +000012098if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012099
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012103 wchar_h="yes"
12104
Guido van Rossumef2255b2000-03-10 22:30:29 +000012105else
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012107
12108fi
12109
Michael W. Hudson54241132001-12-07 15:38:26 +000012110
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012112# determine wchar_t size
12113if test "$wchar_h" = yes
12114then
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12118# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12120$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012121if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12125"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012126
Martin v. Löwis11437992002-04-12 09:54:03 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 if test "$ac_cv_type_wchar_t" = yes; then
12129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012131as_fn_error 77 "cannot compute sizeof (wchar_t)
12132See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133 else
12134 ac_cv_sizeof_wchar_t=0
12135 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12140$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141
12142
12143
Martin v. Löwis11437992002-04-12 09:54:03 +000012144cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012145#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012146_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012147
Michael W. Hudson54241132001-12-07 15:38:26 +000012148
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012149fi
12150
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12152$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012153have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012156
12157#include <tcl.h>
12158#if TCL_UTF_MAX != 6
12159# error "NOT UCS4_TCL"
12160#endif
12161int
12162main ()
12163{
12164
12165 ;
12166 return 0;
12167}
12168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012170
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012173
12174 have_ucs4_tcl=yes
12175
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12179$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012180
Skip Montanaro6dead952003-09-25 14:50:04 +000012181# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012182if test "$wchar_h" = yes
12183then
12184 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12186$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012187 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189else
12190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012192 ac_cv_wchar_t_signed=yes
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012196
12197 #include <wchar.h>
12198 int main()
12199 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012200 /* Success: exit code 0 */
12201 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012202 }
12203
12204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012206 ac_cv_wchar_t_signed=yes
12207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012212fi
12213
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012214fi
12215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12217$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218fi
12219
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12221$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012222
12223# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012225 withval=$with_wide_unicode;
12226if test "$withval" != no
12227then unicode_size="4"
12228else unicode_size="2"
12229fi
12230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012231else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232
Georg Brandl52d168a2008-01-07 18:10:24 +000012233case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012234 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012235 *) unicode_size="2" ;;
12236esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012237
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012238fi
12239
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012240
12241
Georg Brandl52d168a2008-01-07 18:10:24 +000012242case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012243 4)
12244 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12245
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012246 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012247 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012249 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250esac
12251
Michael W. Hudson54241132001-12-07 15:38:26 +000012252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Georg Brandl52d168a2008-01-07 18:10:24 +000012254# wchar_t is only usable if it maps to an unsigned type
12255if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012256 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012257then
12258 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012263
Georg Brandl52d168a2008-01-07 18:10:24 +000012264elif test "$ac_cv_sizeof_short" = "$unicode_size"
12265then
12266 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012268
Georg Brandl52d168a2008-01-07 18:10:24 +000012269elif test "$ac_cv_sizeof_long" = "$unicode_size"
12270then
12271 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012273
Georg Brandl52d168a2008-01-07 18:10:24 +000012274else
12275 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12278$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012279
12280# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12282$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012283if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 ac_cv_c_bigendian=unknown
12287 # See if we're dealing with a universal compiler.
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289/* end confdefs.h. */
12290#ifndef __APPLE_CC__
12291 not a universal capable compiler
12292 #endif
12293 typedef int dummy;
12294
Skip Montanaro6dead952003-09-25 14:50:04 +000012295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_compile "$LINENO"; then :
12297
12298 # Check for potential -arch flags. It is not universal unless
12299 # there are at least two -arch flags with different values.
12300 ac_arch=
12301 ac_prev=
12302 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12303 if test -n "$ac_prev"; then
12304 case $ac_word in
12305 i?86 | x86_64 | ppc | ppc64)
12306 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12307 ac_arch=$ac_word
12308 else
12309 ac_cv_c_bigendian=universal
12310 break
12311 fi
12312 ;;
12313 esac
12314 ac_prev=
12315 elif test "x$ac_word" = "x-arch"; then
12316 ac_prev=arch
12317 fi
12318 done
12319fi
12320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12321 if test $ac_cv_c_bigendian = unknown; then
12322 # See if sys/param.h defines the BYTE_ORDER macro.
12323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012325#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328int
12329main ()
12330{
Matthias Kloseb9621712010-04-24 17:59:49 +000012331#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12332 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12333 && LITTLE_ENDIAN)
12334 bogus endian macros
12335 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
12337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012347
Martin v. Löwis11437992002-04-12 09:54:03 +000012348int
12349main ()
12350{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 not big endian
12353 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
12355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012360 ac_cv_c_bigendian=yes
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012365fi
12366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12367 fi
12368 if test $ac_cv_c_bigendian = unknown; then
12369 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#include <limits.h>
12373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374int
12375main ()
12376{
Matthias Kloseb9621712010-04-24 17:59:49 +000012377#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12378 bogus endian macros
12379 #endif
12380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
12383}
12384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if ac_fn_c_try_compile "$LINENO"; then :
12386 # It does; now see whether it defined to _BIG_ENDIAN or not.
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388/* end confdefs.h. */
12389#include <limits.h>
12390
12391int
12392main ()
12393{
12394#ifndef _BIG_ENDIAN
12395 not big endian
12396 #endif
12397
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12408fi
12409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12410 fi
12411 if test $ac_cv_c_bigendian = unknown; then
12412 # Compile a test program.
12413 if test "$cross_compiling" = yes; then :
12414 # Try to guess by grepping values from an object file.
12415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416/* end confdefs.h. */
12417short int ascii_mm[] =
12418 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12419 short int ascii_ii[] =
12420 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12421 int use_ascii (int i) {
12422 return ascii_mm[i] + ascii_ii[i];
12423 }
12424 short int ebcdic_ii[] =
12425 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12426 short int ebcdic_mm[] =
12427 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12428 int use_ebcdic (int i) {
12429 return ebcdic_mm[i] + ebcdic_ii[i];
12430 }
12431 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433int
12434main ()
12435{
12436return use_ascii (foo) == use_ebcdic (foo);
12437 ;
12438 return 0;
12439}
12440_ACEOF
12441if ac_fn_c_try_compile "$LINENO"; then :
12442 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12443 ac_cv_c_bigendian=yes
12444 fi
12445 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12446 if test "$ac_cv_c_bigendian" = unknown; then
12447 ac_cv_c_bigendian=no
12448 else
12449 # finding both strings is unlikely to happen, but who knows?
12450 ac_cv_c_bigendian=unknown
12451 fi
12452 fi
12453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 /* Are we little or big endian? From Harbison&Steele. */
12464 union
12465 {
12466 long int l;
12467 char c[sizeof (long int)];
12468 } u;
12469 u.l = 1;
12470 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471
12472 ;
12473 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474}
Martin v. Löwis11437992002-04-12 09:54:03 +000012475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477 ac_cv_c_bigendian=no
12478else
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12488$as_echo "$ac_cv_c_bigendian" >&6; }
12489 case $ac_cv_c_bigendian in #(
12490 yes)
12491 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12492;; #(
12493 no)
12494 ;; #(
12495 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012496
Matthias Kloseb9621712010-04-24 17:59:49 +000012497$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ;; #(
12500 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012501 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012502 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012504
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012506# ABI version string for Python extension modules. This appears between the
12507# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12508# from the following attributes which affect the ABI of this Python build (in
12509# this order):
12510#
12511# * The Python implementation (always 'cpython-' for us)
12512# * The major and minor version numbers
12513# * --with-pydebug (adds a 'd')
12514# * --with-pymalloc (adds a 'm')
12515# * --with-wide-unicode (adds a 'u')
12516#
12517# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012518# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12519# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012520
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12522$as_echo_n "checking ABIFLAGS... " >&6; }
12523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12524$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12526$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012527SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12529$as_echo "$SOABI" >&6; }
12530
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12532$as_echo_n "checking LDVERSION... " >&6; }
12533LDVERSION='$(VERSION)$(ABIFLAGS)'
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12535$as_echo "$LDVERSION" >&6; }
12536
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012537# SO is the extension of shared libraries `(including the dot!)
12538# -- usually .so, .sl on HP-UX, .dll on Cygwin
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12540$as_echo_n "checking SO... " >&6; }
12541if test -z "$SO"
12542then
12543 case $ac_sys_system in
12544 hp*|HP*)
12545 case `uname -m` in
12546 ia64) SO=.so;;
12547 *) SO=.sl;;
12548 esac
12549 ;;
12550 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012551 Linux*|GNU*)
12552 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012553 *) SO=.so;;
12554 esac
12555else
12556 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012557 echo
12558 echo '====================================================================='
12559 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012560 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012561 echo '+ Do you really mean to change the extension for shared libraries? +'
12562 echo '+ Continuing in 10 seconds to let you to ponder. +'
12563 echo '+ +'
12564 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012565 sleep 10
12566fi
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12568$as_echo "$SO" >&6; }
12569
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012570# Check whether right shifting a negative integer extends the sign bit
12571# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12573$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012574if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012576else
Martin v. Löwis11437992002-04-12 09:54:03 +000012577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012579 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012582/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012583
12584int main()
12585{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012586 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012587}
12588
Martin v. Löwis11437992002-04-12 09:54:03 +000012589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012590if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012591 ac_cv_rshift_extends_sign=yes
12592else
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12596 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012597fi
12598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599fi
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12602$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012603if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012604then
Martin v. Löwis11437992002-04-12 09:54:03 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012607
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012608fi
12609
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012610# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12612$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012613if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012615else
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012623
12624 FILE *f = fopen("/dev/null", "r");
12625 flockfile(f);
12626 getc_unlocked(f);
12627 funlockfile(f);
12628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012634 ac_cv_have_getc_unlocked=yes
12635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 ac_cv_have_getc_unlocked=no
12637fi
12638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12643$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012644if test "$ac_cv_have_getc_unlocked" = yes
12645then
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012648
12649fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012650
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012651# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012652# save the value of LIBS so we don't actually link Python with readline
12653LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012654
Gregory P. Smith18820942008-09-07 06:24:49 +000012655# On some systems we need to link readline to a termcap compatible
12656# library. NOTE: Keep the precedence of listed libraries synchronised
12657# with setup.py.
12658py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12660$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012661for py_libtermcap in "" ncursesw ncurses curses termcap; do
12662 if test -z "$py_libtermcap"; then
12663 READLINE_LIBS="-lreadline"
12664 else
12665 READLINE_LIBS="-lreadline -l$py_libtermcap"
12666 fi
12667 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012669/* end confdefs.h. */
12670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671/* Override any GCC internal prototype to avoid an error.
12672 Use char because int might match the return type of a GCC
12673 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012674#ifdef __cplusplus
12675extern "C"
12676#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012677char readline ();
12678int
12679main ()
12680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012682 ;
12683 return 0;
12684}
12685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012686if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012687 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext \
12690 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012691 if test $py_cv_lib_readline = yes; then
12692 break
12693 fi
12694done
12695# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12696#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012697if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12699$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12702$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012705
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012706fi
12707
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012708# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12710$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012711if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713else
12714 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012715LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012717/* end confdefs.h. */
12718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719/* Override any GCC internal prototype to avoid an error.
12720 Use char because int might match the return type of a GCC
12721 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012722#ifdef __cplusplus
12723extern "C"
12724#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012725char rl_callback_handler_install ();
12726int
12727main ()
12728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012730 ;
12731 return 0;
12732}
12733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012735 ac_cv_lib_readline_rl_callback_handler_install=yes
12736else
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739rm -f core conftest.err conftest.$ac_objext \
12740 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741LIBS=$ac_check_lib_save_LIBS
12742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12744$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012745if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012748
12749fi
12750
12751
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012752# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755#include <readline/readline.h>
12756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012758 have_readline=yes
12759else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012760 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012761
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012762fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012763rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012764if test $have_readline = yes
12765then
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012768#include <readline/readline.h>
12769
12770_ACEOF
12771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012775
12776fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012777rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012780/* end confdefs.h. */
12781#include <readline/readline.h>
12782
12783_ACEOF
12784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012788
12789fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012790rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012791
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012792fi
12793
Martin v. Löwis0daad592001-09-30 21:09:59 +000012794# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12796$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012797if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012799else
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012801LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805/* Override any GCC internal prototype to avoid an error.
12806 Use char because int might match the return type of a GCC
12807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012808#ifdef __cplusplus
12809extern "C"
12810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012811char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012812int
12813main ()
12814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ;
12817 return 0;
12818}
12819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012822else
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012825rm -f core conftest.err conftest.$ac_objext \
12826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012827LIBS=$ac_check_lib_save_LIBS
12828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12830$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012831if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012834
Martin v. Löwis0daad592001-09-30 21:09:59 +000012835fi
12836
Michael W. Hudson54241132001-12-07 15:38:26 +000012837
Thomas Wouters89d996e2007-09-08 17:39:28 +000012838# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12840$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012841if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012843else
12844 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012845LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012847/* end confdefs.h. */
12848
12849/* Override any GCC internal prototype to avoid an error.
12850 Use char because int might match the return type of a GCC
12851 builtin and then its argument prototype would still apply. */
12852#ifdef __cplusplus
12853extern "C"
12854#endif
12855char rl_completion_display_matches_hook ();
12856int
12857main ()
12858{
12859return rl_completion_display_matches_hook ();
12860 ;
12861 return 0;
12862}
12863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012864if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012865 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012869rm -f core conftest.err conftest.$ac_objext \
12870 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012871LIBS=$ac_check_lib_save_LIBS
12872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12874$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012875if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012878
12879fi
12880
12881
Martin v. Löwis0daad592001-09-30 21:09:59 +000012882# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12884$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012885if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012887else
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012889LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012893/* Override any GCC internal prototype to avoid an error.
12894 Use char because int might match the return type of a GCC
12895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012896#ifdef __cplusplus
12897extern "C"
12898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012899char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012900int
12901main ()
12902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ;
12905 return 0;
12906}
12907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012908if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012910else
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012913rm -f core conftest.err conftest.$ac_objext \
12914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012915LIBS=$ac_check_lib_save_LIBS
12916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12918$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012919if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012922
Guido van Rossum353ae582001-07-10 16:45:32 +000012923fi
12924
Jack Jansendd19cf82001-12-06 22:36:17 +000012925
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928/* end confdefs.h. */
12929#include <readline/readline.h>
12930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932 have_readline=yes
12933else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012935
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012936fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012937rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938if test $have_readline = yes
12939then
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941/* end confdefs.h. */
12942#include <readline/readline.h>
12943
12944_ACEOF
12945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012949
12950fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012951rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012952
12953fi
12954
Martin v. Löwis82bca632006-02-10 20:49:30 +000012955# End of readline checks: restore LIBS
12956LIBS=$LIBS_no_readline
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12959$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012960if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012962else
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012965 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012968/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012969
12970int main()
12971{
12972 int val1 = nice(1);
12973 if (val1 != -1 && val1 == nice(2))
12974 exit(0);
12975 exit(1);
12976}
12977
Martin v. Löwis11437992002-04-12 09:54:03 +000012978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012979if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012980 ac_cv_broken_nice=yes
12981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012986fi
12987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12991$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012992if test "$ac_cv_broken_nice" = yes
12993then
Martin v. Löwis11437992002-04-12 09:54:03 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012996
12997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13000$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013001if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013005 ac_cv_broken_poll=no
13006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013008/* end confdefs.h. */
13009
13010#include <poll.h>
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012int main()
13013{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013014 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013015 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013016
13017 close (42);
13018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013020 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013021 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013022 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013023 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013025 return 1;
13026}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027
13028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013030 ac_cv_broken_poll=yes
13031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013038fi
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13041$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013042if test "$ac_cv_broken_poll" = yes
13043then
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013046
13047fi
13048
Brett Cannon43802422005-02-10 20:48:03 +000013049# 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 +000013050# (which is not required by ISO C or UNIX spec) and/or if we support
13051# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013052ac_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 +000013053#include <$ac_cv_struct_tm>
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013056if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013057
13058cat >>confdefs.h <<_ACEOF
13059#define HAVE_STRUCT_TM_TM_ZONE 1
13060_ACEOF
13061
13062
13063fi
13064
13065if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013068
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13071"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013072if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013076fi
13077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080_ACEOF
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13083$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013084if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013088/* end confdefs.h. */
13089#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090#if !HAVE_DECL_TZNAME
13091extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013092#endif
13093
13094int
13095main ()
13096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013103 ac_cv_var_tzname=yes
13104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107rm -f core conftest.err conftest.$ac_objext \
13108 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13111$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013112 if test $ac_cv_var_tzname = yes; then
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013115
13116 fi
13117fi
13118
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013119
Martin v. Löwis1d459062005-03-14 21:23:33 +000013120# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13122$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013123if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013125else
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013128 ac_cv_working_tzset=no
13129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132
13133#include <stdlib.h>
13134#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013135#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013136
13137#if HAVE_TZNAME
13138extern char *tzname[];
13139#endif
13140
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013141int main()
13142{
Brett Cannon18367812003-09-19 00:59:16 +000013143 /* Note that we need to ensure that not only does tzset(3)
13144 do 'something' with localtime, but it works as documented
13145 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013146 This includes making sure that tzname is set properly if
13147 tm->tm_zone does not exist since it is the alternative way
13148 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013149
13150 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013151 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013152 */
13153
Martin v. Löwis1d459062005-03-14 21:23:33 +000013154 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013155 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13156
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013157 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013158 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013159 if (localtime(&groundhogday)->tm_hour != 0)
13160 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013161#if HAVE_TZNAME
13162 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13163 if (strcmp(tzname[0], "UTC") ||
13164 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13165 exit(1);
13166#endif
Brett Cannon18367812003-09-19 00:59:16 +000013167
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013168 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013169 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013170 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013171 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013172#if HAVE_TZNAME
13173 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13174 exit(1);
13175#endif
Brett Cannon18367812003-09-19 00:59:16 +000013176
13177 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13178 tzset();
13179 if (localtime(&groundhogday)->tm_hour != 11)
13180 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013181#if HAVE_TZNAME
13182 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13183 exit(1);
13184#endif
13185
13186#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013187 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13188 exit(1);
13189 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13190 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013191#endif
Brett Cannon18367812003-09-19 00:59:16 +000013192
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013193 exit(0);
13194}
13195
13196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013198 ac_cv_working_tzset=yes
13199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013204fi
13205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206fi
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13209$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013210if test "$ac_cv_working_tzset" = yes
13211then
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013214
13215fi
13216
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013217# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13219$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013220if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013225#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013226int
13227main ()
13228{
13229
13230struct stat st;
13231st.st_mtim.tv_nsec = 1;
13232
13233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013238 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13243fi
13244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13246$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013247if test "$ac_cv_stat_tv_nsec" = yes
13248then
13249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013251
13252fi
13253
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013254# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13256$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013257if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013261/* end confdefs.h. */
13262#include <sys/stat.h>
13263int
13264main ()
13265{
13266
13267struct stat st;
13268st.st_mtimespec.tv_nsec = 1;
13269
13270 ;
13271 return 0;
13272}
13273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013275 ac_cv_stat_tv_nsec2=yes
13276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13280fi
13281
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13283$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013284if test "$ac_cv_stat_tv_nsec2" = yes
13285then
13286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013288
13289fi
13290
Jack Jansen666b1e72001-10-31 12:11:48 +000013291# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13293$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013294if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013299#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013300int
13301main ()
13302{
Jack Jansen666b1e72001-10-31 12:11:48 +000013303
13304 int rtn;
13305 rtn = mvwdelch(0,0,0);
13306
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 ;
13308 return 0;
13309}
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013312 ac_cv_mvwdelch_is_expression=yes
13313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13320$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013321
13322if test "$ac_cv_mvwdelch_is_expression" = yes
13323then
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013326
13327fi
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13330$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013331if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013333else
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013335/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013336#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Jack Jansen666b1e72001-10-31 12:11:48 +000013340
13341 WINDOW *w;
13342 w->_flags = 0;
13343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ;
13345 return 0;
13346}
13347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013348if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013349 ac_cv_window_has_flags=yes
13350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13354fi
13355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13357$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013358
Jack Jansen666b1e72001-10-31 12:11:48 +000013359
13360if test "$ac_cv_window_has_flags" = yes
13361then
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013364
13365fi
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13368$as_echo_n "checking for is_term_resized... " >&6; }
13369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013370/* end confdefs.h. */
13371#include <curses.h>
13372int
13373main ()
13374{
13375void *x=is_term_resized
13376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013383
Matthias Kloseb159a552010-04-25 21:00:44 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013385$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13388$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013389
13390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13394$as_echo_n "checking for resize_term... " >&6; }
13395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013396/* end confdefs.h. */
13397#include <curses.h>
13398int
13399main ()
13400{
13401void *x=resize_term
13402 ;
13403 return 0;
13404}
13405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013406if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013409
Matthias Kloseb159a552010-04-25 21:00:44 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13414$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013415
13416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13420$as_echo_n "checking for resizeterm... " >&6; }
13421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013422/* end confdefs.h. */
13423#include <curses.h>
13424int
13425main ()
13426{
13427void *x=resizeterm
13428 ;
13429 return 0;
13430}
13431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013435
Matthias Kloseb159a552010-04-25 21:00:44 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013437$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013438else
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13440$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013441
13442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13446$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013447
13448if test -r /dev/ptmx
13449then
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13451$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013454
Thomas Wouters89f507f2006-12-13 04:49:30 +000013455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13457$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13461$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013462
13463if test -r /dev/ptc
13464then
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13466$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013469
Thomas Wouters89f507f2006-12-13 04:49:30 +000013470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13472$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013473fi
13474
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013475if test "$have_long_long" = yes
13476then
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13478$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013479 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013483 ac_cv_have_long_long_format=no
13484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013486/* end confdefs.h. */
13487
13488 #include <stdio.h>
13489 #include <stddef.h>
13490 #include <string.h>
13491
13492 #ifdef HAVE_SYS_TYPES_H
13493 #include <sys/types.h>
13494 #endif
13495
13496 int main()
13497 {
13498 char buffer[256];
13499
13500 if (sprintf(buffer, "%lld", (long long)123) < 0)
13501 return 1;
13502 if (strcmp(buffer, "123"))
13503 return 1;
13504
13505 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13506 return 1;
13507 if (strcmp(buffer, "-123"))
13508 return 1;
13509
13510 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13511 return 1;
13512 if (strcmp(buffer, "123"))
13513 return 1;
13514
13515 return 0;
13516 }
13517
13518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013520 ac_cv_have_long_long_format=yes
13521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013526fi
13527
13528
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013529fi
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13532$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533fi
13534
Mark Dickinson89d7d412009-12-31 20:50:59 +000013535if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013536then
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013539
13540fi
13541
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013542if test $ac_sys_system = Darwin
13543then
13544 LIBS="$LIBS -framework CoreFoundation"
13545fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13548$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013549if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013551else
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013553 ac_cv_have_size_t_format="cross -- assuming yes"
13554
Thomas Wouters477c8d52006-05-27 19:21:47 +000013555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013557/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558
Thomas Wouters477c8d52006-05-27 19:21:47 +000013559#include <stdio.h>
13560#include <stddef.h>
13561#include <string.h>
13562
Christian Heimes2c181612007-12-17 20:04:13 +000013563#ifdef HAVE_SYS_TYPES_H
13564#include <sys/types.h>
13565#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013566
13567#ifdef HAVE_SSIZE_T
13568typedef ssize_t Py_ssize_t;
13569#elif SIZEOF_VOID_P == SIZEOF_LONG
13570typedef long Py_ssize_t;
13571#else
13572typedef int Py_ssize_t;
13573#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013574
Christian Heimes2c181612007-12-17 20:04:13 +000013575int main()
13576{
13577 char buffer[256];
13578
Thomas Wouters477c8d52006-05-27 19:21:47 +000013579 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13580 return 1;
13581
Thomas Wouters89f507f2006-12-13 04:49:30 +000013582 if (strcmp(buffer, "123"))
13583 return 1;
13584
13585 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13586 return 1;
13587
13588 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013589 return 1;
13590
13591 return 0;
13592}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593
Thomas Wouters477c8d52006-05-27 19:21:47 +000013594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013596 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013602fi
13603
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13606$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013607if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610
13611fi
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013614#ifdef HAVE_SYS_TYPES_H
13615#include <sys/types.h>
13616#endif
13617#ifdef HAVE_SYS_SOCKET_H
13618#include <sys/socket.h>
13619#endif
13620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013622if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013627
13628fi
13629
Michael W. Hudson54241132001-12-07 15:38:26 +000013630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13632$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013633if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013637 ac_cv_broken_mbstowcs=no
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013640/* end confdefs.h. */
13641
13642#include<stdlib.h>
13643int main() {
13644 size_t len = -1;
13645 const char *str = "text";
13646 len = mbstowcs(NULL, str, 0);
13647 return (len != 4);
13648}
13649
13650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013652 ac_cv_broken_mbstowcs=no
13653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013658fi
13659
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660fi
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13663$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013664if test "$ac_cv_broken_mbstowcs" = yes
13665then
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013668
13669fi
13670
Antoine Pitrou042b1282010-08-13 21:15:58 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13672$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013673if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013674 $as_echo_n "(cached) " >&6
13675else
13676 if test "$cross_compiling" = yes; then :
13677 ac_cv_computed_gotos=no
13678else
13679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13680/* end confdefs.h. */
13681
13682int main(int argc, char **argv)
13683{
13684 static void *targets[1] = { &&LABEL1 };
13685 goto LABEL2;
13686LABEL1:
13687 return 0;
13688LABEL2:
13689 goto *targets[0];
13690 return 1;
13691}
13692
13693_ACEOF
13694if ac_fn_c_try_run "$LINENO"; then :
13695 ac_cv_computed_gotos=yes
13696else
13697 ac_cv_computed_gotos=no
13698fi
13699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13700 conftest.$ac_objext conftest.beam conftest.$ac_ext
13701fi
13702
13703fi
13704
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13706$as_echo "$ac_cv_computed_gotos" >&6; }
13707if test "$ac_cv_computed_gotos" = yes
13708then
13709
13710$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13711
13712fi
13713
Antoine Pitroub52ec782009-01-25 16:34:23 +000013714# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13716$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013717
13718# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013720 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013721if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013722then
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13727$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013728fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013729if test "$withval" = no
13730then
13731
13732$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13735$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013736fi
13737
Antoine Pitrou042b1282010-08-13 21:15:58 +000013738else
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13740$as_echo "no value specified" >&6; }
13741fi
13742
Antoine Pitroub52ec782009-01-25 16:34:23 +000013743
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013744case $ac_sys_system in
13745AIX*)
13746
13747$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13748 ;;
13749esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013750
Michael W. Hudson54241132001-12-07 15:38:26 +000013751
Jesus Cea6a792292010-05-03 21:18:48 +000013752case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013753 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 +000013754esac
13755
Gregory P. Smith138fa432010-12-13 08:00:52 +000013756ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013757if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013758
13759$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13760
13761fi
Jesus Cea6a792292010-05-03 21:18:48 +000013762
13763
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013764
13765
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013766for h in `(cd $srcdir;echo Python/thread_*.h)`
13767do
13768 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13769done
13770
Michael W. Hudson54241132001-12-07 15:38:26 +000013771
Neal Norwitzd24499d2005-12-18 21:36:39 +000013772SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13774$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013775for dir in $SRCDIRS; do
13776 if test ! -d $dir; then
13777 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013778 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013779done
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13781$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013782
Guido van Rossum627b2d71993-12-24 10:39:16 +000013783# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013784ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013785
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013786ac_config_files="$ac_config_files Modules/ld_so_aix"
13787
Martin v. Löwis11437992002-04-12 09:54:03 +000013788cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789# This file is a shell script that caches the results of configure
13790# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013791# scripts and configure runs, see configure's option --config-cache.
13792# It is not useful on other systems. If it contains results you don't
13793# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794#
Martin v. Löwis11437992002-04-12 09:54:03 +000013795# config.status only pays attention to the cache file if you give it
13796# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797#
Skip Montanaro6dead952003-09-25 14:50:04 +000013798# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013799# loading this file, other *unset* `ac_cv_foo' will be assigned the
13800# following values.
13801
13802_ACEOF
13803
Guido van Rossumf78abae1997-01-21 22:02:36 +000013804# The following way of writing the cache mishandles newlines in values,
13805# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013807# Ultrix sh set writes to stderr and can't be redirected directly,
13808# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809(
13810 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13811 eval ac_val=\$$ac_var
13812 case $ac_val in #(
13813 *${as_nl}*)
13814 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13816$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817 esac
13818 case $ac_var in #(
13819 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13821 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 esac ;;
13823 esac
13824 done
13825
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13828 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 # `set' does not quote correctly, so add quotes: double-quote
13830 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013832 "s/'/'\\\\''/g;
13833 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 *)
13836 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 esac |
13840 sort
13841) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13847 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13849 :end' >>confcache
13850if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13851 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013852 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13854$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013855 if test ! -f "$cache_file" || test -h "$cache_file"; then
13856 cat confcache >"$cache_file"
13857 else
13858 case $cache_file in #(
13859 */* | ?:*)
13860 mv -f confcache "$cache_file"$$ &&
13861 mv -f "$cache_file"$$ "$cache_file" ;; #(
13862 *)
13863 mv -f confcache "$cache_file" ;;
13864 esac
13865 fi
13866 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013867 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13869$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013870 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013871fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013872rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874test "x$prefix" = xNONE && prefix=$ac_default_prefix
13875# Let make expand exec_prefix.
13876test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013877
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878DEFS=-DHAVE_CONFIG_H
13879
Skip Montanaro6dead952003-09-25 14:50:04 +000013880ac_libobjs=
13881ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013882U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013883for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13884 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13888 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13890 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013891done
13892LIBOBJS=$ac_libobjs
13893
13894LTLIBOBJS=$ac_ltlibobjs
13895
13896
Martin v. Löwis11437992002-04-12 09:54:03 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013899: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013900ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013901ac_clean_files_save=$ac_clean_files
13902ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13904$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13905as_write_fail=0
13906cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013907#! $SHELL
13908# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013909# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013911# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013912
Martin v. Löwis11437992002-04-12 09:54:03 +000013913debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013914ac_cs_recheck=false
13915ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013916
Matthias Kloseb9621712010-04-24 17:59:49 +000013917SHELL=\${CONFIG_SHELL-$SHELL}
13918export SHELL
13919_ASEOF
13920cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13921## -------------------- ##
13922## M4sh Initialization. ##
13923## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925# Be more Bourne compatible
13926DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013927if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 emulate sh
13929 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013931 # is contrary to our usage. Disable this feature.
13932 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013933 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 case `(set -o) 2>/dev/null` in #(
13936 *posix*) :
13937 set -o posix ;; #(
13938 *) :
13939 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013941fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013942
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944as_nl='
13945'
13946export as_nl
13947# Printing a long string crashes Solaris 7 /usr/bin/printf.
13948as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13949as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13950as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13951# Prefer a ksh shell builtin over an external printf program on Solaris,
13952# but without wasting forks for bash or zsh.
13953if test -z "$BASH_VERSION$ZSH_VERSION" \
13954 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13955 as_echo='print -r --'
13956 as_echo_n='print -rn --'
13957elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13958 as_echo='printf %s\n'
13959 as_echo_n='printf %s'
13960else
13961 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13962 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13963 as_echo_n='/usr/ucb/echo -n'
13964 else
13965 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13966 as_echo_n_body='eval
13967 arg=$1;
13968 case $arg in #(
13969 *"$as_nl"*)
13970 expr "X$arg" : "X\\(.*\\)$as_nl";
13971 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13972 esac;
13973 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13974 '
13975 export as_echo_n_body
13976 as_echo_n='sh -c $as_echo_n_body as_echo'
13977 fi
13978 export as_echo_body
13979 as_echo='sh -c $as_echo_body as_echo'
13980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
13982# The user is always right.
13983if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 PATH_SEPARATOR=:
13985 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13986 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13987 PATH_SEPARATOR=';'
13988 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991
13992# IFS
13993# We need space, tab and new line, in precisely that order. Quoting is
13994# there to prevent editors from complaining about space-tab.
13995# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13996# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997IFS=" "" $as_nl"
13998
13999# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014000as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014001case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002 *[\\/]* ) as_myself=$0 ;;
14003 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014004for as_dir in $PATH
14005do
14006 IFS=$as_save_IFS
14007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14009 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012 ;;
14013esac
14014# We did not find ourselves, most probably we were run as `sh COMMAND'
14015# in which case we are not to be found in the path.
14016if test "x$as_myself" = x; then
14017 as_myself=$0
14018fi
14019if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14021 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022fi
14023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024# Unset variables that we do not need and which cause bugs (e.g. in
14025# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14026# suppresses any "Segmentation fault" message there. '((' could
14027# trigger a bug in pdksh 5.2.14.
14028for as_var in BASH_ENV ENV MAIL MAILPATH
14029do eval test x\${$as_var+set} = xset \
14030 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031done
14032PS1='$ '
14033PS2='> '
14034PS4='+ '
14035
14036# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014037LC_ALL=C
14038export LC_ALL
14039LANGUAGE=C
14040export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042# CDPATH.
14043(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14044
14045
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014046# as_fn_error STATUS ERROR [LINENO LOG_FD]
14047# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014048# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14049# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014050# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014051as_fn_error ()
14052{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014053 as_status=$1; test $as_status -eq 0 && as_status=1
14054 if test "$4"; then
14055 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14056 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014058 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 as_fn_exit $as_status
14060} # as_fn_error
14061
14062
14063# as_fn_set_status STATUS
14064# -----------------------
14065# Set $? to STATUS, without forking.
14066as_fn_set_status ()
14067{
14068 return $1
14069} # as_fn_set_status
14070
14071# as_fn_exit STATUS
14072# -----------------
14073# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14074as_fn_exit ()
14075{
14076 set +e
14077 as_fn_set_status $1
14078 exit $1
14079} # as_fn_exit
14080
14081# as_fn_unset VAR
14082# ---------------
14083# Portably unset VAR.
14084as_fn_unset ()
14085{
14086 { eval $1=; unset $1;}
14087}
14088as_unset=as_fn_unset
14089# as_fn_append VAR VALUE
14090# ----------------------
14091# Append the text in VALUE to the end of the definition contained in VAR. Take
14092# advantage of any shell optimizations that allow amortized linear growth over
14093# repeated appends, instead of the typical quadratic growth present in naive
14094# implementations.
14095if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14096 eval 'as_fn_append ()
14097 {
14098 eval $1+=\$2
14099 }'
14100else
14101 as_fn_append ()
14102 {
14103 eval $1=\$$1\$2
14104 }
14105fi # as_fn_append
14106
14107# as_fn_arith ARG...
14108# ------------------
14109# Perform arithmetic evaluation on the ARGs, and store the result in the
14110# global $as_val. Take advantage of shells that can avoid forks. The arguments
14111# must be portable across $(()) and expr.
14112if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14113 eval 'as_fn_arith ()
14114 {
14115 as_val=$(( $* ))
14116 }'
14117else
14118 as_fn_arith ()
14119 {
14120 as_val=`expr "$@" || test $? -eq 1`
14121 }
14122fi # as_fn_arith
14123
14124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125if expr a : '\(a\)' >/dev/null 2>&1 &&
14126 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14127 as_expr=expr
14128else
14129 as_expr=false
14130fi
14131
14132if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14133 as_basename=basename
14134else
14135 as_basename=false
14136fi
14137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14139 as_dirname=dirname
14140else
14141 as_dirname=false
14142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144as_me=`$as_basename -- "$0" ||
14145$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14146 X"$0" : 'X\(//\)$' \| \
14147 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014148$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 sed '/^.*\/\([^/][^/]*\)\/*$/{
14150 s//\1/
14151 q
14152 }
14153 /^X\/\(\/\/\)$/{
14154 s//\1/
14155 q
14156 }
14157 /^X\/\(\/\).*/{
14158 s//\1/
14159 q
14160 }
14161 s/.*/./; q'`
14162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163# Avoid depending upon Character Ranges.
14164as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14165as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14166as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14167as_cr_digits='0123456789'
14168as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014169
14170ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014171case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 xy) ECHO_C='\c';;
14176 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14177 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178 esac;;
14179*)
14180 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184if test -d conf$$.dir; then
14185 rm -f conf$$.dir/conf$$.file
14186else
14187 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if (echo >conf$$.file) 2>/dev/null; then
14191 if ln -s conf$$.file conf$$ 2>/dev/null; then
14192 as_ln_s='ln -s'
14193 # ... but there are two gotchas:
14194 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14195 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14196 # In both cases, we have to default to `cp -p'.
14197 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14198 as_ln_s='cp -p'
14199 elif ln conf$$.file conf$$ 2>/dev/null; then
14200 as_ln_s=ln
14201 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014204else
14205 as_ln_s='cp -p'
14206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14208rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210
14211# as_fn_mkdir_p
14212# -------------
14213# Create "$as_dir" as a directory, including parents if necessary.
14214as_fn_mkdir_p ()
14215{
14216
14217 case $as_dir in #(
14218 -*) as_dir=./$as_dir;;
14219 esac
14220 test -d "$as_dir" || eval $as_mkdir_p || {
14221 as_dirs=
14222 while :; do
14223 case $as_dir in #(
14224 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14225 *) as_qdir=$as_dir;;
14226 esac
14227 as_dirs="'$as_qdir' $as_dirs"
14228 as_dir=`$as_dirname -- "$as_dir" ||
14229$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14230 X"$as_dir" : 'X\(//\)[^/]' \| \
14231 X"$as_dir" : 'X\(//\)$' \| \
14232 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14233$as_echo X"$as_dir" |
14234 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14235 s//\1/
14236 q
14237 }
14238 /^X\(\/\/\)[^/].*/{
14239 s//\1/
14240 q
14241 }
14242 /^X\(\/\/\)$/{
14243 s//\1/
14244 q
14245 }
14246 /^X\(\/\).*/{
14247 s//\1/
14248 q
14249 }
14250 s/.*/./; q'`
14251 test -d "$as_dir" && break
14252 done
14253 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014254 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014255
14256
14257} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014258if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014260else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014261 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014262 as_mkdir_p=false
14263fi
14264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014265if test -x / >/dev/null 2>&1; then
14266 as_test_x='test -x'
14267else
14268 if ls -dL / >/dev/null 2>&1; then
14269 as_ls_L_option=L
14270 else
14271 as_ls_L_option=
14272 fi
14273 as_test_x='
14274 eval sh -c '\''
14275 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 case $1 in #(
14279 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014280 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282 ???[sx]*):;;*)false;;esac;fi
14283 '\'' sh
14284 '
14285fi
14286as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
14288# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289as_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 +000014290
14291# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014292as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014293
14294
Martin v. Löwis11437992002-04-12 09:54:03 +000014295exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014296## ----------------------------------- ##
14297## Main body of $CONFIG_STATUS script. ##
14298## ----------------------------------- ##
14299_ASEOF
14300test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14303# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014304# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305# values after options handling.
14306ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014307This file was extended by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014308generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
14310 CONFIG_FILES = $CONFIG_FILES
14311 CONFIG_HEADERS = $CONFIG_HEADERS
14312 CONFIG_LINKS = $CONFIG_LINKS
14313 CONFIG_COMMANDS = $CONFIG_COMMANDS
14314 $ $0 $@
14315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316on `(hostname || uname -n) 2>/dev/null | sed 1q`
14317"
14318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319_ACEOF
14320
Matthias Kloseb9621712010-04-24 17:59:49 +000014321case $ac_config_files in *"
14322"*) set x $ac_config_files; shift; ac_config_files=$*;;
14323esac
14324
14325case $ac_config_headers in *"
14326"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14327esac
14328
14329
14330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014331# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014332config_files="$ac_config_files"
14333config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014338ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014339\`$as_me' instantiates files and other configuration actions
14340from templates according to the current configuration. Unless the files
14341and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Matthias Kloseb9621712010-04-24 17:59:49 +000014343Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
14345 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 --config print configuration, then exit
14348 -q, --quiet, --silent
14349 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 -d, --debug don't remove temporary files
14351 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 --file=FILE[:TEMPLATE]
14353 instantiate the configuration file FILE
14354 --header=FILE[:TEMPLATE]
14355 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357Configuration files:
14358$config_files
14359
14360Configuration headers:
14361$config_headers
14362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14367ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014368ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014369python config.status 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014370configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014373Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014374This config.status script is free software; the Free Software Foundation
14375gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376
14377ac_pwd='$ac_pwd'
14378srcdir='$srcdir'
14379INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014380test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014381_ACEOF
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14384# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014385ac_need_defaults=:
14386while test $# != 0
14387do
14388 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014389 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14391 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014392 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014394 --*=)
14395 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14396 ac_optarg=
14397 ac_shift=:
14398 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014400 ac_option=$1
14401 ac_optarg=$2
14402 ac_shift=shift
14403 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014404 esac
14405
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014408 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14409 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo "$ac_cs_version"; exit ;;
14412 --config | --confi | --conf | --con | --co | --c )
14413 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 debug=: ;;
14416 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014417 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 case $ac_optarg in
14419 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014420 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 esac
14422 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 ac_need_defaults=false;;
14424 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014425 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 case $ac_optarg in
14427 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14428 esac
14429 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 --he | --h)
14432 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014433 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014434Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014437 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14438 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14439 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014442 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014443Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
14448 esac
14449 shift
14450done
14451
Skip Montanaro6dead952003-09-25 14:50:04 +000014452ac_configure_extra_args=
14453
14454if $ac_cs_silent; then
14455 exec 6>/dev/null
14456 ac_configure_extra_args="$ac_configure_extra_args --silent"
14457fi
14458
14459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014461if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14463 shift
14464 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14465 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014468fi
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472exec 5>>config.log
14473{
14474 echo
14475 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14476## Running $as_me. ##
14477_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486
14487# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014488for ac_config_target in $ac_config_targets
14489do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490 case $ac_config_target in
14491 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14492 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14493 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014494 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14495 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14497 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014498 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014499 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014501 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 esac
14503done
14504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506# If the user did not use the arguments to specify the items to instantiate,
14507# then the envvar interface is used. Set only those that are not.
14508# We use the long form for the default assignment because of an extremely
14509# bizarre bug on SunOS 4.1.3.
14510if $ac_need_defaults; then
14511 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14512 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14513fi
14514
Skip Montanaro6dead952003-09-25 14:50:04 +000014515# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014517# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518# Hook for its removal unless debugging.
14519# Note that there is a small window in which the directory will not be cleaned:
14520# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014521$debug ||
14522{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014523 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014525 : "${ac_tmp:=$tmp}"
14526 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014529}
Martin v. Löwis11437992002-04-12 09:54:03 +000014530# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014534 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014535} ||
14536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537 tmp=./conf$$-$RANDOM
14538 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014539} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14540ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542# Set up the scripts for CONFIG_FILES section.
14543# No need to generate them if there are no CONFIG_FILES.
14544# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547
14548ac_cr=`echo X | tr X '\015'`
14549# On cygwin, bash can eat \r inside `` if the user requested igncr.
14550# But we know of no other shell where ac_cr would be empty at this
14551# point, so we can use a bashism as a fallback.
14552if test "x$ac_cr" = x; then
14553 eval ac_cr=\$\'\\r\'
14554fi
14555ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14556if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014557 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014558else
14559 ac_cs_awk_cr=$ac_cr
14560fi
14561
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014562echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
14564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{
14567 echo "cat >conf$$subs.awk <<_ACEOF" &&
14568 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14569 echo "_ACEOF"
14570} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014571 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14572ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573ac_delim='%!_!# '
14574for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014576 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14579 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580 break
14581 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014582 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 else
14584 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586done
Matthias Kloseb9621712010-04-24 17:59:49 +000014587rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014590cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014592sed -n '
14593h
14594s/^/S["/; s/!.*/"]=/
14595p
14596g
14597s/^[^!]*!//
14598:repl
14599t repl
14600s/'"$ac_delim"'$//
14601t delim
14602:nl
14603h
14604s/\(.\{148\}\)..*/\1/
14605t more1
14606s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14607p
14608n
14609b repl
14610:more1
14611s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14612p
14613g
14614s/.\{148\}//
14615t nl
14616:delim
14617h
14618s/\(.\{148\}\)..*/\1/
14619t more2
14620s/["\\]/\\&/g; s/^/"/; s/$/"/
14621p
14622b
14623:more2
14624s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14625p
14626g
14627s/.\{148\}//
14628t delim
14629' <conf$$subs.awk | sed '
14630/^[^""]/{
14631 N
14632 s/\n//
14633}
14634' >>$CONFIG_STATUS || ac_write_fail=1
14635rm -f conf$$subs.awk
14636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14637_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014638cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 for (key in S) S_is_set[key] = 1
14640 FS = ""
14641
14642}
14643{
14644 line = $ 0
14645 nfields = split(line, field, "@")
14646 substed = 0
14647 len = length(field[1])
14648 for (i = 2; i < nfields; i++) {
14649 key = field[i]
14650 keylen = length(key)
14651 if (S_is_set[key]) {
14652 value = S[key]
14653 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14654 len += length(value) + length(field[++i])
14655 substed = 1
14656 } else
14657 len += 1 + keylen
14658 }
14659
14660 print line
14661}
14662
14663_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14666if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14667 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14668else
14669 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014670fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14671 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014672_ACEOF
14673
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014674# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14675# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676# trailing colons and then remove the whole line if VPATH becomes empty
14677# (actually we leave an empty line to preserve line numbers).
14678if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014679 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14680h
14681s///
14682s/^/:/
14683s/[ ]*$/:/
14684s/:\$(srcdir):/:/g
14685s/:\${srcdir}:/:/g
14686s/:@srcdir@:/:/g
14687s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014689x
14690s/\(=[ ]*\).*/\1/
14691G
14692s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693s/^[^=]*=[ ]*$//
14694}'
14695fi
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014698fi # test -n "$CONFIG_FILES"
14699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700# Set up the scripts for CONFIG_HEADERS section.
14701# No need to generate them if there are no CONFIG_HEADERS.
14702# This happens for instance with `./config.status Makefile'.
14703if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014704cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014705BEGIN {
14706_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708# Transform confdefs.h into an awk script `defines.awk', embedded as
14709# here-document in config.status, that substitutes the proper values into
14710# config.h.in to produce config.h.
14711
14712# Create a delimiter string that does not exist in confdefs.h, to ease
14713# handling of long lines.
14714ac_delim='%!_!# '
14715for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014716 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14717 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 break
14719 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014720 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 else
14722 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14723 fi
14724done
14725
14726# For the awk script, D is an array of macro values keyed by name,
14727# likewise P contains macro parameters if any. Preserve backslash
14728# newline sequences.
14729
14730ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14731sed -n '
14732s/.\{148\}/&'"$ac_delim"'/g
14733t rset
14734:rset
14735s/^[ ]*#[ ]*define[ ][ ]*/ /
14736t def
14737d
14738:def
14739s/\\$//
14740t bsnl
14741s/["\\]/\\&/g
14742s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14743D["\1"]=" \3"/p
14744s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14745d
14746:bsnl
14747s/["\\]/\\&/g
14748s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14749D["\1"]=" \3\\\\\\n"\\/p
14750t cont
14751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14752t cont
14753d
14754:cont
14755n
14756s/.\{148\}/&'"$ac_delim"'/g
14757t clear
14758:clear
14759s/\\$//
14760t bsnlc
14761s/["\\]/\\&/g; s/^/"/; s/$/"/p
14762d
14763:bsnlc
14764s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14765b cont
14766' <confdefs.h | sed '
14767s/'"$ac_delim"'/"\\\
14768"/g' >>$CONFIG_STATUS || ac_write_fail=1
14769
14770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14771 for (key in D) D_is_set[key] = 1
14772 FS = ""
14773}
14774/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14775 line = \$ 0
14776 split(line, arg, " ")
14777 if (arg[1] == "#") {
14778 defundef = arg[2]
14779 mac1 = arg[3]
14780 } else {
14781 defundef = substr(arg[1], 2)
14782 mac1 = arg[2]
14783 }
14784 split(mac1, mac2, "(") #)
14785 macro = mac2[1]
14786 prefix = substr(line, 1, index(line, defundef) - 1)
14787 if (D_is_set[macro]) {
14788 # Preserve the white space surrounding the "#".
14789 print prefix "define", macro P[macro] D[macro]
14790 next
14791 } else {
14792 # Replace #undef with comments. This is necessary, for example,
14793 # in the case of _POSIX_SOURCE, which is predefined and required
14794 # on some systems where configure will not decide to define it.
14795 if (defundef == "undef") {
14796 print "/*", prefix defundef, macro, "*/"
14797 next
14798 }
14799 }
14800}
14801{ print }
14802_ACAWK
14803_ACEOF
14804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014805 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014806fi # test -n "$CONFIG_HEADERS"
14807
14808
14809eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14810shift
14811for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812do
14813 case $ac_tag in
14814 :[FHLC]) ac_mode=$ac_tag; continue;;
14815 esac
14816 case $ac_mode$ac_tag in
14817 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014818 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819 :[FH]-) ac_tag=-:-;;
14820 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14821 esac
14822 ac_save_IFS=$IFS
14823 IFS=:
14824 set x $ac_tag
14825 IFS=$ac_save_IFS
14826 shift
14827 ac_file=$1
14828 shift
14829
14830 case $ac_mode in
14831 :L) ac_source=$1;;
14832 :[FH])
14833 ac_file_inputs=
14834 for ac_f
14835 do
14836 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014837 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838 *) # Look for the file first in the build tree, then in the source tree
14839 # (if the path is not absolute). The absolute path cannot be DOS-style,
14840 # because $ac_f cannot contain `:'.
14841 test -f "$ac_f" ||
14842 case $ac_f in
14843 [\\/$]*) false;;
14844 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14845 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014846 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14849 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850 done
14851
14852 # Let's still pretend it is `configure' which instantiates (i.e., don't
14853 # use $as_me), people would be surprised to read:
14854 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 configure_input='Generated from '`
14856 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14857 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 if test x"$ac_file" != x-; then
14859 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14861$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 # Neutralize special characters interpreted by sed in replacement strings.
14864 case $configure_input in #(
14865 *\&* | *\|* | *\\* )
14866 ac_sed_conf_input=`$as_echo "$configure_input" |
14867 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14868 *) ac_sed_conf_input=$configure_input;;
14869 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870
14871 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014872 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14873 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 esac
14875 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 esac
14877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014879$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880 X"$ac_file" : 'X\(//\)[^/]' \| \
14881 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14885 s//\1/
14886 q
14887 }
14888 /^X\(\/\/\)[^/].*/{
14889 s//\1/
14890 q
14891 }
14892 /^X\(\/\/\)$/{
14893 s//\1/
14894 q
14895 }
14896 /^X\(\/\).*/{
14897 s//\1/
14898 q
14899 }
14900 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ac_builddir=.
14903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904case "$ac_dir" in
14905.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14906*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 case $ac_top_builddir_sub in
14911 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14912 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14913 esac ;;
14914esac
14915ac_abs_top_builddir=$ac_pwd
14916ac_abs_builddir=$ac_pwd$ac_dir_suffix
14917# for backward compatibility:
14918ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
14920case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923 ac_top_srcdir=$ac_top_builddir_sub
14924 ac_abs_top_srcdir=$ac_pwd ;;
14925 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927 ac_top_srcdir=$srcdir
14928 ac_abs_top_srcdir=$srcdir ;;
14929 *) # Relative name.
14930 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14931 ac_top_srcdir=$ac_top_build_prefix$srcdir
14932 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014933esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014935
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 case $ac_mode in
14938 :F)
14939 #
14940 # CONFIG_FILE
14941 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014942
14943 case $INSTALL in
14944 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014947_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950# If the template does not know about datarootdir, expand it.
14951# FIXME: This hack should be removed a few years after 2.60.
14952ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014953ac_sed_dataroot='
14954/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 p
14956 q
14957}
14958/@datadir@/p
14959/@docdir@/p
14960/@infodir@/p
14961/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014962/@mandir@/p'
14963case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964*datarootdir*) ac_datarootdir_seen=yes;;
14965*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14967$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970 ac_datarootdir_hack='
14971 s&@datadir@&$datadir&g
14972 s&@docdir@&$docdir&g
14973 s&@infodir@&$infodir&g
14974 s&@localedir@&$localedir&g
14975 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977esac
14978_ACEOF
14979
14980# Neutralize VPATH when `$srcdir' = `.'.
14981# Shell code in configure.ac might set extrasub.
14982# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14984ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014985$extrasub
14986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014988:t
14989/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014990s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014992s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993s&@srcdir@&$ac_srcdir&;t t
14994s&@abs_srcdir@&$ac_abs_srcdir&;t t
14995s&@top_srcdir@&$ac_top_srcdir&;t t
14996s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14997s&@builddir@&$ac_builddir&;t t
14998s&@abs_builddir@&$ac_abs_builddir&;t t
14999s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15000s&@INSTALL@&$ac_INSTALL&;t t
15001$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015002"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015003eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15004 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015007 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15008 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15009 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 { $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 +000015011which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015012$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015013which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015014
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015015 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015017 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15018 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015020 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021 ;;
15022 :H)
15023 #
15024 # CONFIG_HEADER
15025 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 {
15028 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015029 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15030 } >"$ac_tmp/config.h" \
15031 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15032 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15034$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015037 mv "$ac_tmp/config.h" "$ac_file" \
15038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 fi
15040 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015041 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015042 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15043 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047
15048 esac
15049
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015050
15051 case $ac_file$ac_mode in
15052 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15053
15054 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055done # for ac_tag
15056
Guido van Rossum627b2d71993-12-24 10:39:16 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015059_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015060ac_clean_files=$ac_clean_files_save
15061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015063 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015064
Martin v. Löwis11437992002-04-12 09:54:03 +000015065
15066# configure is writing to config.log, and then calls config.status.
15067# config.status does its own redirection, appending to config.log.
15068# Unfortunately, on DOS this fails, as config.log is still kept open
15069# by configure, so config.status won't be able to write to it; its
15070# output is simply discarded. So we exec the FD to /dev/null,
15071# effectively closing config.log, so it can be properly (re)opened and
15072# appended to by config.status. When coming back to configure, we
15073# need to make the FD available again.
15074if test "$no_create" != yes; then
15075 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015076 ac_config_status_args=
15077 test "$silent" = yes &&
15078 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015080 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 exec 5>>config.log
15082 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15083 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015084 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015085fi
15086if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15088$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015089fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015091
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015092echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015093if test ! -f Modules/Setup
15094then
15095 cp $srcdir/Modules/Setup.dist Modules/Setup
15096fi
15097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015098echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015099if test ! -f Modules/Setup.local
15100then
15101 echo "# Edit this file for local setup changes" >Modules/Setup.local
15102fi
15103
15104echo "creating Makefile"
15105$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15106 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015107 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015108mv config.c Modules