blob: 8e461522d9522dd7ceedf992729e588c7310eddc [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002# From configure.in Revision: 88440 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandl3ebb6b32011-02-20 10:37:07 +00004# Generated by GNU Autoconf 2.68 for python 3.3.
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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000564PACKAGE_VERSION='3.3'
565PACKAGE_STRING='python 3.3'
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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001320\`configure' configures python 3.3 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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001381 short | recursive ) echo "Configuration of python 3.3:";;
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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001519python configure 3.3
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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002350It was created by python $as_me 3.3, 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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002717VERSION=3.3
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
Georg Brandl216e4042011-02-19 08:58:23 +00006417case $ac_sys_system/$ac_sys_release in
6418AIX*)
6419
6420$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6421
6422 ;;
6423esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427
Matthias Kloseb9621712010-04-24 17:59:49 +00006428$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006429
Martin v. Löwis399a6892002-10-04 10:22:02 +00006430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006431
Guido van Rossum84e7b241996-08-19 21:59:00 +00006432# Add some code to confdefs.h so that the test for off_t works on SCO
6433cat >> confdefs.h <<\EOF
6434#if defined(SCO_DS)
6435#undef _OFF_T
6436#endif
6437EOF
6438
Guido van Rossumef2255b2000-03-10 22:30:29 +00006439# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006440ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006441if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443else
Martin v. Löwis11437992002-04-12 09:54:03 +00006444
6445cat >>confdefs.h <<_ACEOF
6446#define mode_t int
6447_ACEOF
6448
6449fi
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006452if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454else
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006457#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006458_ACEOF
6459
6460fi
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006463if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006464
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465else
Martin v. Löwis11437992002-04-12 09:54:03 +00006466
6467cat >>confdefs.h <<_ACEOF
6468#define pid_t int
6469_ACEOF
6470
6471fi
6472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006473
Martin v. Löwis11437992002-04-12 09:54:03 +00006474cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006475#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006479if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006485_ACEOF
6486
6487fi
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6490$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006491if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006493else
Matthias Kloseb9621712010-04-24 17:59:49 +00006494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501 ac_cv_type_uid_t=yes
6502else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503 ac_cv_type_uid_t=no
6504fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006505rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6509$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006510if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516
6517fi
6518
Matthias Kloseb9621712010-04-24 17:59:49 +00006519ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6520case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521 no|yes) ;; #(
6522 *)
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006525
6526
6527cat >>confdefs.h <<_ACEOF
6528#define uint32_t $ac_cv_c_uint32_t
6529_ACEOF
6530;;
6531 esac
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6534case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535 no|yes) ;; #(
6536 *)
6537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006539
6540
6541cat >>confdefs.h <<_ACEOF
6542#define uint64_t $ac_cv_c_uint64_t
6543_ACEOF
6544;;
6545 esac
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6548case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006549 no|yes) ;; #(
6550 *)
6551
6552cat >>confdefs.h <<_ACEOF
6553#define int32_t $ac_cv_c_int32_t
6554_ACEOF
6555;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006556esac
6557
Matthias Kloseb9621712010-04-24 17:59:49 +00006558ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6559case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006560 no|yes) ;; #(
6561 *)
6562
6563cat >>confdefs.h <<_ACEOF
6564#define int64_t $ac_cv_c_int64_t
6565_ACEOF
6566;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006567esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006570if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571
Matthias Kloseb9621712010-04-24 17:59:49 +00006572$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006573
6574fi
6575
Jack Jansendd19cf82001-12-06 22:36:17 +00006576
Michael W. Hudson54241132001-12-07 15:38:26 +00006577# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006578# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579# The cast to long int works around a bug in the HP C Compiler
6580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6584$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006585if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 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 +00006589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590else
Matthias Kloseb9621712010-04-24 17:59:49 +00006591 if test "$ac_cv_type_int" = yes; then
6592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006594as_fn_error 77 "cannot compute sizeof (int)
6595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596 else
6597 ac_cv_sizeof_int=0
6598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6603$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604
6605
6606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610
6611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612# The cast to long int works around a bug in the HP C Compiler
6613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6617$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006618if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 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 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 if test "$ac_cv_type_long" = yes; then
6625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006627as_fn_error 77 "cannot compute sizeof (long)
6628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 else
6630 ac_cv_sizeof_long=0
6631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6636$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637
6638
6639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006641#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006642_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006643
6644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645# The cast to long int works around a bug in the HP C Compiler
6646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6650$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006651if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 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 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 if test "$ac_cv_type_void_p" = yes; then
6658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006660as_fn_error 77 "cannot compute sizeof (void *)
6661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 else
6663 ac_cv_sizeof_void_p=0
6664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6669$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670
6671
6672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006674#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006675_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006676
6677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678# The cast to long int works around a bug in the HP C Compiler
6679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6683$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006684if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 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 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 if test "$ac_cv_type_short" = yes; then
6691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006693as_fn_error 77 "cannot compute sizeof (short)
6694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_short=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6702$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703
6704
6705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709
6710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711# The cast to long int works around a bug in the HP C Compiler
6712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6716$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006717if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 if test "$ac_cv_type_float" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006726as_fn_error 77 "cannot compute sizeof (float)
6727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728 else
6729 ac_cv_sizeof_float=0
6730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6735$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736
6737
6738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006740#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006741_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742
6743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744# The cast to long int works around a bug in the HP C Compiler
6745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6749$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006750if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 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 +00006754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 if test "$ac_cv_type_double" = yes; then
6757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006759as_fn_error 77 "cannot compute sizeof (double)
6760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761 else
6762 ac_cv_sizeof_double=0
6763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6768$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769
6770
6771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006773#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775
6776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777# The cast to long int works around a bug in the HP C Compiler
6778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6782$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006783if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 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 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 if test "$ac_cv_type_fpos_t" = yes; then
6790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006792as_fn_error 77 "cannot compute sizeof (fpos_t)
6793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794 else
6795 ac_cv_sizeof_fpos_t=0
6796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6801$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802
6803
6804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006806#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006807_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006808
Michael W. Hudson54241132001-12-07 15:38:26 +00006809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810# The cast to long int works around a bug in the HP C Compiler
6811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6815$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006816if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 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 +00006820
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821else
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 if test "$ac_cv_type_size_t" = yes; then
6823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006825as_fn_error 77 "cannot compute sizeof (size_t)
6826See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827 else
6828 ac_cv_sizeof_size_t=0
6829 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006831
Martin v. Löwis18e16552006-02-15 17:27:45 +00006832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6834$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835
6836
6837
Martin v. Löwis18e16552006-02-15 17:27:45 +00006838cat >>confdefs.h <<_ACEOF
6839#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6840_ACEOF
6841
6842
Christian Heimes400adb02008-02-01 08:12:03 +00006843# The cast to long int works around a bug in the HP C Compiler
6844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6846# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6848$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006849if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006850 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006851else
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 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 +00006853
Christian Heimes400adb02008-02-01 08:12:03 +00006854else
Matthias Kloseb9621712010-04-24 17:59:49 +00006855 if test "$ac_cv_type_pid_t" = yes; then
6856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006858as_fn_error 77 "cannot compute sizeof (pid_t)
6859See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006860 else
6861 ac_cv_sizeof_pid_t=0
6862 fi
6863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006864
Christian Heimes400adb02008-02-01 08:12:03 +00006865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6867$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006868
6869
6870
6871cat >>confdefs.h <<_ACEOF
6872#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6873_ACEOF
6874
6875
Michael W. Hudson54241132001-12-07 15:38:26 +00006876
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6878$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006879have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006882
Martin v. Löwis11437992002-04-12 09:54:03 +00006883int
6884main ()
6885{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006886long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006887 ;
6888 return 0;
6889}
6890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006892
6893
Matthias Kloseb9621712010-04-24 17:59:49 +00006894$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006895
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006896 have_long_long=yes
6897
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6901$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006902if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903# The cast to long int works around a bug in the HP C Compiler
6904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6906# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6908$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006909if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 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 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 if test "$ac_cv_type_long_long" = yes; then
6916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006918as_fn_error 77 "cannot compute sizeof (long long)
6919See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920 else
6921 ac_cv_sizeof_long_long=0
6922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6927$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928
6929
6930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006932#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006934
Michael W. Hudson54241132001-12-07 15:38:26 +00006935
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006936fi
6937
Matthias Kloseb9621712010-04-24 17:59:49 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6939$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006940have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942/* end confdefs.h. */
6943
6944int
6945main ()
6946{
6947long double x; x = (long double)0;
6948 ;
6949 return 0;
6950}
6951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006952if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953
6954
Matthias Kloseb9621712010-04-24 17:59:49 +00006955$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956
6957 have_long_double=yes
6958
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6962$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006963if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964# The cast to long int works around a bug in the HP C Compiler
6965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6969$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006970if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972else
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 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 +00006974
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006975else
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 if test "$ac_cv_type_long_double" = yes; then
6977 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006979as_fn_error 77 "cannot compute sizeof (long double)
6980See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981 else
6982 ac_cv_sizeof_long_double=0
6983 fi
6984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006985
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6988$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006989
6990
6991
6992cat >>confdefs.h <<_ACEOF
6993#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6994_ACEOF
6995
6996
6997fi
6998
6999
Matthias Kloseb9621712010-04-24 17:59:49 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7001$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007002have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007004/* end confdefs.h. */
7005
7006int
7007main ()
7008{
7009_Bool x; x = (_Bool)0;
7010 ;
7011 return 0;
7012}
7013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007014if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007015
7016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007018
7019 have_c99_bool=yes
7020
Thomas Woutersb2137042007-02-01 18:02:27 +00007021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7024$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007025if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026# The cast to long int works around a bug in the HP C Compiler
7027# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7028# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7029# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7031$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007032if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 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 +00007036
Thomas Woutersb2137042007-02-01 18:02:27 +00007037else
Matthias Kloseb9621712010-04-24 17:59:49 +00007038 if test "$ac_cv_type__Bool" = yes; then
7039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007041as_fn_error 77 "cannot compute sizeof (_Bool)
7042See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043 else
7044 ac_cv_sizeof__Bool=0
7045 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047
Thomas Woutersb2137042007-02-01 18:02:27 +00007048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7050$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051
7052
7053
Thomas Woutersb2137042007-02-01 18:02:27 +00007054cat >>confdefs.h <<_ACEOF
7055#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7056_ACEOF
7057
7058
7059fi
7060
Matthias Kloseb9621712010-04-24 17:59:49 +00007061ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007062 #include <stdint.h>
7063 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007064 #ifdef HAVE_INTTYPES_H
7065 #include <inttypes.h>
7066 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007067"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007068if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007069
7070cat >>confdefs.h <<_ACEOF
7071#define HAVE_UINTPTR_T 1
7072_ACEOF
7073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074# The cast to long int works around a bug in the HP C Compiler
7075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7079$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007080if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007081 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 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 +00007084
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if test "$ac_cv_type_uintptr_t" = yes; then
7087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007089as_fn_error 77 "cannot compute sizeof (uintptr_t)
7090See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091 else
7092 ac_cv_sizeof_uintptr_t=0
7093 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095
Martin v. Löwis11437992002-04-12 09:54:03 +00007096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7098$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099
7100
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007103#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007104_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007105
Michael W. Hudson54241132001-12-07 15:38:26 +00007106
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007107fi
7108
Thomas Wouters89f507f2006-12-13 04:49:30 +00007109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007110# The cast to long int works around a bug in the HP C Compiler
7111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7113# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7115$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007116if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007120#ifdef HAVE_SYS_TYPES_H
7121#include <sys/types.h>
7122#endif
7123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if test "$ac_cv_type_off_t" = yes; then
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007130as_fn_error 77 "cannot compute sizeof (off_t)
7131See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007132 else
7133 ac_cv_sizeof_off_t=0
7134 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7139$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141
7142
Martin v. Löwis11437992002-04-12 09:54:03 +00007143cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007144#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007146
Michael W. Hudson54241132001-12-07 15:38:26 +00007147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007148
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7150$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007151if test "$have_long_long" = yes
7152then
7153if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007154 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007155
Matthias Kloseb9621712010-04-24 17:59:49 +00007156$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7159$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160else
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007163fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007167fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169# The cast to long int works around a bug in the HP C Compiler
7170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7172# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7174$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007175if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179#ifdef HAVE_SYS_TYPES_H
7180#include <sys/types.h>
7181#endif
7182#ifdef HAVE_TIME_H
7183#include <time.h>
7184#endif
7185
Matthias Kloseb9621712010-04-24 17:59:49 +00007186"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188else
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 if test "$ac_cv_type_time_t" = yes; then
7190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007192as_fn_error 77 "cannot compute sizeof (time_t)
7193See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007194 else
7195 ac_cv_sizeof_time_t=0
7196 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7201$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
7210
Trent Mick635f6fb2000-08-23 21:33:05 +00007211# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212ac_save_cc="$CC"
7213if test "$ac_cv_kpthread" = "yes"
7214then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007215elif test "$ac_cv_kthread" = "yes"
7216then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007217elif test "$ac_cv_pthread" = "yes"
7218then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007219fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7222$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007223have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
7227 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007228int
7229main ()
7230{
Guido van Rossum12580492000-09-24 16:47:19 +00007231pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ;
7233 return 0;
7234}
Matthias Kloseb159a552010-04-25 21:00:44 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007237if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007238 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7242$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007243if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7249$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007250if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254#ifdef HAVE_PTHREAD_H
7255#include <pthread.h>
7256#endif
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if test "$ac_cv_type_pthread_t" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007264as_fn_error 77 "cannot compute sizeof (pthread_t)
7265See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266 else
7267 ac_cv_sizeof_pthread_t=0
7268 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007270
Trent Mick635f6fb2000-08-23 21:33:05 +00007271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7273$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
7276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007278#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007281
Trent Mick635f6fb2000-08-23 21:33:05 +00007282fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007283CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007284
Michael W. Hudson54241132001-12-07 15:38:26 +00007285
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007286case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007287 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007288 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7289 ;;
7290 Darwin/*)
7291 OTHER_LIBTOOL_OPT=""
7292 ;;
7293esac
7294
7295
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007296ARCH_RUN_32BIT=""
7297
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007298case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007299 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007300 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7301 if test "${enable_universalsdk}"; then
7302 :
7303 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007304 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007305 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007306 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007308 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007309 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007310 if test ${gcc_version} '<' 4.0
7311 then
7312 LIBTOOL_CRUFT="-lcc_dynamic"
7313 else
7314 LIBTOOL_CRUFT=""
7315 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007317 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007321
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007322 #include <unistd.h>
7323 int main(int argc, char*argv[])
7324 {
7325 if (sizeof(long) == 4) {
7326 return 0;
7327 } else {
7328 return 1;
7329 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007330 }
7331
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007333if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334 ac_osx_32bit=yes
7335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340fi
7341
7342
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007344 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007345 i386)
7346 MACOSX_DEFAULT_ARCH="i386"
7347 ;;
7348 ppc)
7349 MACOSX_DEFAULT_ARCH="ppc"
7350 ;;
7351 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007352 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007353 ;;
7354 esac
7355 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007356 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007357 i386)
7358 MACOSX_DEFAULT_ARCH="x86_64"
7359 ;;
7360 ppc)
7361 MACOSX_DEFAULT_ARCH="ppc64"
7362 ;;
7363 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007364 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007365 ;;
7366 esac
7367
7368 #ARCH_RUN_32BIT="true"
7369 fi
7370
7371 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007374esac
7375
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7377$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007378if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007380 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007382 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007383
Matthias Kloseb9621712010-04-24 17:59:49 +00007384$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7387$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007388 if test $enable_shared = "yes"
7389 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007390 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 +00007391 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007392else
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395fi
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7398$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007399case $ac_sys_system/$ac_sys_release in
7400 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007403
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7405$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007406 ;;
7407 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7409$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007410 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007411esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412
Guido van Rossum0a516c91994-09-12 10:58:40 +00007413# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414
Michael W. Hudson54241132001-12-07 15:38:26 +00007415
7416
7417
7418
Benjamin Peterson99f03762010-04-11 22:15:28 +00007419
Thomas Wouters477c8d52006-05-27 19:21:47 +00007420
Georg Brandlb1441c72009-01-03 22:33:39 +00007421
Thomas Wouters477c8d52006-05-27 19:21:47 +00007422cat >>confdefs.h <<_ACEOF
7423#define SHLIB_EXT "$SO"
7424_ACEOF
7425
Guido van Rossum0a516c91994-09-12 10:58:40 +00007426# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007427# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007428# (Shared libraries in this instance are shared modules to be loaded into
7429# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7431$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007432if test -z "$LDSHARED"
7433then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007435 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007436 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007437 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007438 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007439 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007440 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007442 if test "$GCC" = "yes" ; then
7443 LDSHARED='$(CC) -shared'
7444 LDCXXSHARED='$(CXX) -shared'
7445 else
7446 LDSHARED='$(CC) -G'
7447 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007448 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007449 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007450 if test "$GCC" = "yes" ; then
7451 LDSHARED='$(CC) -shared'
7452 LDCXXSHARED='$(CXX) -shared'
7453 else
7454 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007455 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007456 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007457 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007458 LDSHARED='$(CC) -bundle'
7459 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007460 if test "$enable_framework" ; then
7461 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007462 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7463 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007464 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007465 else
7466 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007467 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007468 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007469 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007471 LDSHARED='$(CC) -bundle'
7472 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007473 if test "$enable_framework" ; then
7474 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007475 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7476 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007477 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007478 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007479 # No framework, use the Python app as bundle-loader
7480 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007481 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007482 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007484 Darwin/*)
7485 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7486 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007487
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007488 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007489 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007490 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007491 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007492 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007493 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7494 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007495 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007496 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007497 LDSHARED='$(CC) -bundle'
7498 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007499 if test "$enable_framework" ; then
7500 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007501 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7502 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007503 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007504 else
7505 # No framework, use the Python app as bundle-loader
7506 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7507 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007508 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007509 fi
7510 fi
7511 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 Linux*|GNU*|QNX*)
7513 LDSHARED='$(CC) -shared'
7514 LDCXXSHARED='$(CXX) -shared';;
7515 BSD/OS*/4*)
7516 LDSHARED="gcc -shared"
7517 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007518 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007519 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007520 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED='$(CC) -shared'
7522 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007523 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007524 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007525 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007526 OpenBSD*)
7527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7528 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007529 LDSHARED='$(CC) -shared $(CCSHARED)'
7530 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007531 else
7532 case `uname -r` in
7533 [01].* | 2.[0-7] | 2.[0-7].*)
7534 LDSHARED="ld -Bshareable ${LDFLAGS}"
7535 ;;
7536 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -shared $(CCSHARED)'
7538 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007539 ;;
7540 esac
7541 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007543 LDSHARED='$(CC) -shared'
7544 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007545 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007546 if test "$GCC" = "yes" ; then
7547 LDSHARED='$(CC) -shared'
7548 LDCXXSHARED='$(CXX) -shared'
7549 else
7550 LDSHARED='$(CC) -G'
7551 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007552 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007553 SCO_SV*)
7554 LDSHARED='$(CC) -Wl,-G,-Bexport'
7555 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7556 CYGWIN*)
7557 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7558 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007559 *) LDSHARED="ld";;
7560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7563$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007565BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007567# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7569$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570if test -z "$CCSHARED"
7571then
Guido van Rossum07397971997-04-29 21:49:50 +00007572 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007573 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007574 then CCSHARED="-fPIC";
7575 elif test `uname -p` = sparc;
7576 then CCSHARED="-xcode=pic32";
7577 else CCSHARED="-Kpic";
7578 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007579 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007580 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007581 else CCSHARED="+z";
7582 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007583 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007584 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007585 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007586 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007587 if test "$GCC" = "yes"
7588 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007589 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007590 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007591 SCO_SV*)
7592 if test "$GCC" = "yes"
7593 then CCSHARED="-fPIC"
7594 else CCSHARED="-Kpic -belf"
7595 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007596 IRIX*/6*) case $CC in
7597 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007598 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007599 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007600 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7603$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007604# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007605# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7607$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007608if test -z "$LINKFORSHARED"
7609then
Guido van Rossum07397971997-04-29 21:49:50 +00007610 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007611 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007612 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007613 LINKFORSHARED="-Wl,-E -Wl,+s";;
7614# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007615 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007616 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007617 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007619 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007620 if test "$enable_framework"
7621 then
Jack Jansenda49e192005-01-07 13:08:22 +00007622 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007623 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007624 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007625 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007626 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007627 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007628 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007629 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7630 then
7631 LINKFORSHARED="-Wl,--export-dynamic"
7632 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007633 SunOS/5*) case $CC in
7634 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007635 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007636 then
7637 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007638 fi;;
7639 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007640 CYGWIN*)
7641 if test $enable_shared = "no"
7642 then
7643 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7644 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007645 QNX*)
7646 # -Wl,-E causes the symbols to be added to the dynamic
7647 # symbol table so that they can be found when a module
7648 # is loaded. -N 2048K causes the stack size to be set
7649 # to 2048 kilobytes so that the stack doesn't overflow
7650 # when running test_compile.py.
7651 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007652 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7655$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656
Michael W. Hudson54241132001-12-07 15:38:26 +00007657
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007658
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7660$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007661if test ! "$LIBRARY" = "$LDLIBRARY"
7662then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007663 case $ac_sys_system in
7664 CYGWIN*)
7665 # Cygwin needs CCSHARED when building extension DLLs
7666 # but not when building the interpreter DLL.
7667 CFLAGSFORSHARED='';;
7668 *)
7669 CFLAGSFORSHARED='$(CCSHARED)'
7670 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7673$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007674
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007675# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7676# library (with --enable-shared).
7677# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007678# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7679# if it is not required, since it creates a dependency of the shared library
7680# to LIBS. This, in turn, means that applications linking the shared libpython
7681# don't need to link LIBS explicitly. The default should be only changed
7682# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007683
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7685$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007686case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007688 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007689esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7691$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007692
7693
Guido van Rossum627b2d71993-12-24 10:39:16 +00007694# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7696$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007697if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007699else
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007701LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705/* Override any GCC internal prototype to avoid an error.
7706 Use char because int might match the return type of a GCC
7707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007708#ifdef __cplusplus
7709extern "C"
7710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007711char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007712int
7713main ()
7714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 ;
7717 return 0;
7718}
7719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007721 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007725rm -f core conftest.err conftest.$ac_objext \
7726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007727LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7730$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007731if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 cat >>confdefs.h <<_ACEOF
7733#define HAVE_LIBDL 1
7734_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007736 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738fi
7739 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7741$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007742if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007744else
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007746LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750/* Override any GCC internal prototype to avoid an error.
7751 Use char because int might match the return type of a GCC
7752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007753#ifdef __cplusplus
7754extern "C"
7755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007756char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007757int
7758main ()
7759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ;
7762 return 0;
7763}
7764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767else
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770rm -f core conftest.err conftest.$ac_objext \
7771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7775$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007776if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 cat >>confdefs.h <<_ACEOF
7778#define HAVE_LIBDLD 1
7779_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007781 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007783fi
7784 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007785
Georg Brandlb1441c72009-01-03 22:33:39 +00007786# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007787if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7789$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007790if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007792else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007793 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797/* Override any GCC internal prototype to avoid an error.
7798 Use char because int might match the return type of a GCC
7799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800#ifdef __cplusplus
7801extern "C"
7802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007803char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
7806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ;
7809 return 0;
7810}
7811_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812for ac_lib in '' pthread rt posix4; do
7813 if test -z "$ac_lib"; then
7814 ac_res="none required"
7815 else
7816 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007824 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007828if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830else
7831 ac_cv_search_sem_init=no
7832fi
7833rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007834LIBS=$ac_func_search_save_LIBS
7835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7837$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007839if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007841
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007842fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007843 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007844 # posix4 on Solaris 2.6
7845 # pthread (first!) on Linux
7846fi
7847
Martin v. Löwis19d17342003-06-14 21:03:05 +00007848# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7850$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007851if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007853else
7854 ac_check_lib_save_LIBS=$LIBS
7855LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862#ifdef __cplusplus
7863extern "C"
7864#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007866int
7867main ()
7868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007875 ac_cv_lib_intl_textdomain=yes
7876else
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007879rm -f core conftest.err conftest.$ac_objext \
7880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881LIBS=$ac_check_lib_save_LIBS
7882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7884$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007885if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886
Matthias Kloseb9621712010-04-24 17:59:49 +00007887$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007888
Brett Cannonc6d936e2009-06-07 20:09:53 +00007889 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890fi
7891
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007892
7893# checks for system dependent C++ extensions support
7894case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7896$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007898/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007899
Georg Brandl59e87bd2011-02-15 19:48:59 +00007900 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007901int
7902main ()
7903{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007904loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 ;
7906 return 0;
7907}
Matthias Kloseb159a552010-04-25 21:00:44 +00007908
Martin v. Löwis11437992002-04-12 09:54:03 +00007909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007910if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007911
Matthias Kloseb159a552010-04-25 21:00:44 +00007912
Matthias Kloseb9621712010-04-24 17:59:49 +00007913$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007914
Matthias Kloseb159a552010-04-25 21:00:44 +00007915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007916$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007917
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007918else
Matthias Kloseb159a552010-04-25 21:00:44 +00007919
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007921$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007922
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924rm -f core conftest.err conftest.$ac_objext \
7925 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007926 *) ;;
7927esac
7928
Guido van Rossum70c7f481998-03-26 18:44:10 +00007929# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7931$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007932if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007934else
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007936LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940/* Override any GCC internal prototype to avoid an error.
7941 Use char because int might match the return type of a GCC
7942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007943#ifdef __cplusplus
7944extern "C"
7945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007946char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007947int
7948main ()
7949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ;
7952 return 0;
7953}
7954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007957else
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960rm -f core conftest.err conftest.$ac_objext \
7961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7965$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007966if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007967 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007968fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007969 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7971$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007972if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007973 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974else
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007976LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007986char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000rm -f core conftest.err conftest.$ac_objext \
8001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008002LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8005$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008006if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008007 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008008fi
8009 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8012$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008015if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8018$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008019LIBS="$withval $LIBS"
8020
8021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8023$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024fi
8025
Guido van Rossum7f43da71994-08-01 12:15:30 +00008026
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008027if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008028 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8029set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008032if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008034else
8035 case $PKG_CONFIG in
8036 [\\/]* | ?:[\\/]*)
8037 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8038 ;;
8039 *)
8040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043 IFS=$as_save_IFS
8044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8047 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008049 break 2
8050 fi
8051done
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008053IFS=$as_save_IFS
8054
8055 ;;
8056esac
8057fi
8058PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8059if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8061$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008062else
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008065fi
8066
8067
8068fi
8069if test -z "$ac_cv_path_PKG_CONFIG"; then
8070 ac_pt_PKG_CONFIG=$PKG_CONFIG
8071 # Extract the first word of "pkg-config", so it can be a program name with args.
8072set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8074$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008075if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008077else
8078 case $ac_pt_PKG_CONFIG in
8079 [\\/]* | ?:[\\/]*)
8080 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8081 ;;
8082 *)
8083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8084for as_dir in $PATH
8085do
8086 IFS=$as_save_IFS
8087 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8090 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092 break 2
8093 fi
8094done
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008096IFS=$as_save_IFS
8097
8098 ;;
8099esac
8100fi
8101ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8102if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8104$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008105else
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008108fi
8109
8110 if test "x$ac_pt_PKG_CONFIG" = x; then
8111 PKG_CONFIG=""
8112 else
8113 case $cross_compiling:$ac_tool_warned in
8114yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008117ac_tool_warned=yes ;;
8118esac
8119 PKG_CONFIG=$ac_pt_PKG_CONFIG
8120 fi
8121else
8122 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8123fi
8124
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008125
8126# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8128$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008129
8130# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008131if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008132 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008133else
8134 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008135fi
8136
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8139$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008140
8141# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8143$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008144
8145# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008146if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008147 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008148else
8149 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008150fi
8151
8152
8153if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008154 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8155else
8156 LIBFFI_INCLUDEDIR=""
8157fi
8158
8159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8161$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008162
Benjamin Peterson076ed002010-10-31 17:11:02 +00008163# Check for support for loadable sqlite extensions
8164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8165$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8166# Check whether --enable-loadable-sqlite-extensions was given.
8167if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8168 enableval=$enable_loadable_sqlite_extensions;
8169else
8170 enable_loadable_sqlite_extensions="no"
8171fi
8172
8173
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8175$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8176
Matthias Klose55708cc2009-04-30 08:06:49 +00008177# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8179$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008180
8181# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008182if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008183 withval=$with_dbmliborder;
8184if test x$with_dbmliborder = xyes
8185then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008186as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008187else
8188 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8189 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8190 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008191 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008192 fi
8193 done
8194fi
8195fi
8196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8198$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008199
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008200# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008201
8202
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8204$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 withval=$with_signal_module;
8209fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008210
8211
8212if test -z "$with_signal_module"
8213then with_signal_module="yes"
8214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8216$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008217
8218if test "${with_signal_module}" = "yes"; then
8219 USE_SIGNAL_MODULE=""
8220 SIGNAL_OBJS=""
8221else
8222 USE_SIGNAL_MODULE="#"
8223 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8224fi
8225
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008226# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008227
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008228USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8231$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
Guido van Rossumec2f0731997-01-22 20:54:01 +00008233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008235if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8238$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008239LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008240if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008241 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008242fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246fi
8247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
8249# Templates for things AC_DEFINEd more than once.
8250# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008251
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8256$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008259if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 withval=$with_threads;
8261fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008262
8263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008264# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008267if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268 withval=$with_thread; with_threads=$with_thread
8269fi
8270
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008271
8272if test -z "$with_threads"
8273then with_threads="yes"
8274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8276$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008277
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008278
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008279if test "$with_threads" = "no"
8280then
8281 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008282elif test "$ac_cv_pthread_is_default" = yes
8283then
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008285
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008286 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008288
8289 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008291elif test "$ac_cv_kpthread" = "yes"
8292then
8293 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008294 if test "$ac_cv_cxx_thread" = "yes"; then
8295 CXX="$CXX -Kpthread"
8296 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008300 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008301elif test "$ac_cv_kthread" = "yes"
8302then
8303 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008304 if test "$ac_cv_cxx_thread" = "yes"; then
8305 CXX="$CXX -Kthread"
8306 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008308
8309 posix_threads=yes
8310 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008311elif test "$ac_cv_pthread" = "yes"
8312then
8313 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008314 if test "$ac_cv_cxx_thread" = "yes"; then
8315 CXX="$CXX -pthread"
8316 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008318
8319 posix_threads=yes
8320 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008321else
8322 if test ! -z "$with_threads" -a -d "$with_threads"
8323 then LDFLAGS="$LDFLAGS -L$with_threads"
8324 fi
8325 if test ! -z "$withval" -a -d "$withval"
8326 then LDFLAGS="$LDFLAGS -L$withval"
8327 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008328
8329 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008330 # define _POSIX_THREADS in unistd.h. Some apparently don't
8331 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8333$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008335/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008336
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008338#ifdef _POSIX_THREADS
8339yes
8340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008345 unistd_defines_pthreads=yes
8346else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008347 unistd_defines_pthreads=no
8348fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008349rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8352$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 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 +00008357if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008364
8365 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008366 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008367else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 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 +00008370if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008372
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008374
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008377
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008378 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008379else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008380
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008381 # Just looking for pthread_create in libpthread is not enough:
8382 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8383 # So we really have to include pthread.h, and then link.
8384 _libs=$LIBS
8385 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8387$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008389/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008390#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008391
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008392void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008393int
8394main ()
8395{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396
8397pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ;
8399 return 0;
8400}
8401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8405$as_echo "yes" >&6; }
8406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008407
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008408 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008409 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008410else
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008412 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008414if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008416
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008417 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008418 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008419else
Guido van Rossumad678af1998-10-02 14:42:15 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8422$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008423if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008425else
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008427LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431/* Override any GCC internal prototype to avoid an error.
8432 Use char because int might match the return type of a GCC
8433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008434#ifdef __cplusplus
8435extern "C"
8436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008437char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ;
8443 return 0;
8444}
8445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451rm -f core conftest.err conftest.$ac_objext \
8452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008453LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8456$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008457if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008460 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008461 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008462 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008463else
Greg Steinadf63d62000-07-05 10:38:09 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8466$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008467if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008471LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475/* Override any GCC internal prototype to avoid an error.
8476 Use char because int might match the return type of a GCC
8477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008478#ifdef __cplusplus
8479extern "C"
8480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008481char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ;
8487 return 0;
8488}
8489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008492else
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495rm -f core conftest.err conftest.$ac_objext \
8496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8500$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008501if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008503
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008504 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008505 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008506 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008507else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8510$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008511if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008515LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519/* Override any GCC internal prototype to avoid an error.
8520 Use char because int might match the return type of a GCC
8521 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522#ifdef __cplusplus
8523extern "C"
8524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008525char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ;
8531 return 0;
8532}
8533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539rm -f core conftest.err conftest.$ac_objext \
8540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8544$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008545if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008548 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008549 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008550 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008551else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8554$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008555if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008557else
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008559LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563/* Override any GCC internal prototype to avoid an error.
8564 Use char because int might match the return type of a GCC
8565 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008566#ifdef __cplusplus
8567extern "C"
8568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008569char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ;
8575 return 0;
8576}
8577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008578if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008583rm -f core conftest.err conftest.$ac_objext \
8584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8588$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008589if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008592 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008593 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008594 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008595else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008596
Martin v. Löwis130fb172001-07-19 11:00:41 +00008597 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008598fi
8599
Guido van Rossum627b2d71993-12-24 10:39:16 +00008600
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008601fi
8602
Guido van Rossum0be3e491997-05-22 20:33:33 +00008603fi
8604
Guido van Rossum49545951997-12-02 19:28:29 +00008605fi
8606
Guido van Rossumb93a8621998-05-07 13:27:32 +00008607fi
8608
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610rm -f core conftest.err conftest.$ac_objext \
8611 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612fi
8613
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615fi
8616
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008617
Michael W. Hudson54241132001-12-07 15:38:26 +00008618
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8620$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008621if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008623else
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008625LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629/* Override any GCC internal prototype to avoid an error.
8630 Use char because int might match the return type of a GCC
8631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008632#ifdef __cplusplus
8633extern "C"
8634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008635char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008636int
8637main ()
8638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ;
8641 return 0;
8642}
8643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008649rm -f core conftest.err conftest.$ac_objext \
8650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8654$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008655if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008657
Martin v. Löwis130fb172001-07-19 11:00:41 +00008658 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008659 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008660 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008661fi
8662
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008663
Neal Norwitza978ab02002-11-02 16:58:05 +00008664 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8666$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008667if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008669else
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008671LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675/* Override any GCC internal prototype to avoid an error.
8676 Use char because int might match the return type of a GCC
8677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678#ifdef __cplusplus
8679extern "C"
8680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008681char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008682int
8683main ()
8684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ;
8687 return 0;
8688}
8689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695rm -f core conftest.err conftest.$ac_objext \
8696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8700$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008701if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008703
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008704 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008705 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008706 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707fi
8708
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008709 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008710
Martin v. Löwis130fb172001-07-19 11:00:41 +00008711 if test "$USE_THREAD_MODULE" != "#"
8712 then
8713 # If the above checks didn't disable threads, (at least) OSF1
8714 # needs this '-threads' argument during linking.
8715 case $ac_sys_system in
8716 OSF1) LDLAST=-threads;;
8717 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008718 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008719fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008720
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721if test "$posix_threads" = "yes"; then
8722 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008723
Matthias Kloseb9621712010-04-24 17:59:49 +00008724$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008725
8726 fi
8727
8728 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8729 case $ac_sys_system/$ac_sys_release in
8730 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008731$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008732
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008733 ;;
8734 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008735$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736
8737 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008738 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008740
8741 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008742 AIX/6)
8743$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8744
8745 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008746 esac
8747
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8749$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008750 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754 ac_cv_pthread_system_supported=no
8755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758#include <pthread.h>
8759 void *foo(void *parm) {
8760 return NULL;
8761 }
8762 main() {
8763 pthread_attr_t attr;
8764 pthread_t id;
8765 if (pthread_attr_init(&attr)) exit(-1);
8766 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8767 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8768 exit(0);
8769 }
8770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008771if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772 ac_cv_pthread_system_supported=yes
8773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
8782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8784$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785 if test "$ac_cv_pthread_system_supported" = "yes"; then
8786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788
8789 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 for ac_func in pthread_sigmask
8791do :
8792 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008793if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008794 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008795#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008796_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008797 case $ac_sys_system in
8798 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008801
8802 ;;
8803 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008804fi
8805done
8806
8807fi
8808
8809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8813$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008815if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008817 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008820 ipv6=no
8821 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8823$as_echo "yes" >&6; }
8824 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825
8826 ipv6=yes
8827 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008829else
Martin v. Löwis11437992002-04-12 09:54:03 +00008830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8834$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835 ipv6=no
8836
8837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008839/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 /* AF_INET6 available check */
8841#include <sys/types.h>
8842#include <sys/socket.h>
8843main()
8844{
8845 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8846 exit(1);
8847 else
8848 exit(0);
8849}
8850
Martin v. Löwis11437992002-04-12 09:54:03 +00008851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008852if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8855$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008856 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858else
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008867fi
8868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008870if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8872$as_echo_n "checking if RFC2553 API is available... " >&6; }
8873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008875
8876 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008877#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008881struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008882 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ;
8884 return 0;
8885}
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Martin v. Löwis11437992002-04-12 09:54:03 +00008887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008888if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008889
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008891$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008892 ipv6=yes
8893
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008894else
Matthias Kloseb159a552010-04-25 21:00:44 +00008895
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008897$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008898 ipv6=no
8899
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008902fi
8903
8904if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008906
8907fi
8908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909fi
8910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911
8912ipv6type=unknown
8913ipv6lib=none
8914ipv6trylibc=no
8915
8916if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8918$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008919 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8920 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921 case $i in
8922 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926#include <netinet/in.h>
8927#ifdef IPV6_INRIA_VERSION
8928yes
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008933 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936
8937 ;;
8938 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008942#include <netinet/in.h>
8943#ifdef __KAME__
8944yes
8945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008946_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949 ipv6type=$i;
8950 ipv6lib=inet6
8951 ipv6libdir=/usr/local/v6/lib
8952 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008954rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955
8956 ;;
8957 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961#include <features.h>
8962#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8963yes
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968 ipv6type=$i;
8969 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008971rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972
8973 ;;
8974 linux-inet6)
8975 if test -d /usr/inet6; then
8976 ipv6type=$i
8977 ipv6lib=inet6
8978 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008979 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980 fi
8981 ;;
8982 solaris)
8983 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008984 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6type=$i
8986 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 fi
8988 fi
8989 ;;
8990 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994#include <sys/param.h>
8995#ifdef _TOSHIBA_INET6
8996yes
8997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001 ipv6type=$i;
9002 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009003 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009005rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006
9007 ;;
9008 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012#include </usr/local/v6/include/sys/v6config.h>
9013#ifdef __V6D__
9014yes
9015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009016_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019 ipv6type=$i;
9020 ipv6lib=v6;
9021 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009022 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009024rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025
9026 ;;
9027 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031#include <sys/param.h>
9032#ifdef _ZETA_MINAMI_INET6
9033yes
9034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009035_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038 ipv6type=$i;
9039 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009040 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009042rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043
9044 ;;
9045 esac
9046 if test "$ipv6type" != "unknown"; then
9047 break
9048 fi
9049 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9051$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052fi
9053
9054if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9055 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9056 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9057 echo "using lib$ipv6lib"
9058 else
9059 if test $ipv6trylibc = "yes"; then
9060 echo "using libc"
9061 else
9062 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9063 echo "You need to fetch lib$ipv6lib.a from appropriate"
9064 echo 'ipv6 kit and compile beforehand.'
9065 exit 1
9066 fi
9067 fi
9068fi
9069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9071$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009074
9075 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009076int
9077main ()
9078{
9079FSIORefNum fRef = 0
9080 ;
9081 return 0;
9082}
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009085if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009086
Matthias Kloseb159a552010-04-25 21:00:44 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9091$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009092
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009093else
Matthias Kloseb159a552010-04-25 21:00:44 +00009094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009097
9098fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9100
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009101# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9103$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009106if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107 withval=$with_doc_strings;
9108fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009109
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009110
9111if test -z "$with_doc_strings"
9112then with_doc_strings="yes"
9113fi
9114if test "$with_doc_strings" != "no"
9115then
9116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009118
9119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9121$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009122
Antoine Pitrou042b1282010-08-13 21:15:58 +00009123# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9125$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009128if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009130if test "$withval" != no
9131then
9132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9136$as_echo "yes" >&6; }
9137else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9138$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009139fi
9140else
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143fi
9144
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009145
9146# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9148$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009151if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009152 withval=$with_pymalloc;
9153fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009154
Neil Schemenauera35c6882001-02-27 04:45:05 +00009155
Neil Schemenauer16c22972002-03-22 15:34:49 +00009156if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009157then
9158 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009159 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009160fi
9161if test "$with_pymalloc" != "no"
9162then
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Matthias Kloseb9621712010-04-24 17:59:49 +00009164$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009165
9166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9168$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009169
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9172$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009173
9174# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009175if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009176 withval=$with_valgrind;
9177else
9178 with_valgrind=no
9179fi
9180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9182$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009183if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 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 +00009185if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009188
9189else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009190 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009191
9192fi
9193
9194
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009195 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009196fi
9197
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009198# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009199
Guido van Rossum98935bf2001-09-05 19:13:16 +00009200DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009201
Guido van Rossume97ee181999-12-20 21:27:22 +00009202# the dlopen() function means we might want to use dynload_shlib.o. some
9203# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009204for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009205do :
9206 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009207if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009209#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009210_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009211
Guido van Rossume97ee181999-12-20 21:27:22 +00009212fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009213done
Guido van Rossume97ee181999-12-20 21:27:22 +00009214
Michael W. Hudson54241132001-12-07 15:38:26 +00009215
Guido van Rossume97ee181999-12-20 21:27:22 +00009216# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9217# loading of modules.
9218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9220$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009221if test -z "$DYNLOADFILE"
9222then
9223 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009224 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9225 if test "$ac_cv_func_dlopen" = yes
9226 then DYNLOADFILE="dynload_shlib.o"
9227 else DYNLOADFILE="dynload_aix.o"
9228 fi
9229 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009230 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009231 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9232 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009233 *)
9234 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9235 # out any dynamic loading
9236 if test "$ac_cv_func_dlopen" = yes
9237 then DYNLOADFILE="dynload_shlib.o"
9238 else DYNLOADFILE="dynload_stub.o"
9239 fi
9240 ;;
9241 esac
9242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9244$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009245if test "$DYNLOADFILE" != "dynload_stub.o"
9246then
Martin v. Löwis11437992002-04-12 09:54:03 +00009247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009249
9250fi
9251
Neil Schemenauer4e425612001-06-19 15:44:15 +00009252# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9253
Michael W. Hudson54241132001-12-07 15:38:26 +00009254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9256$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009257if test -z "$MACHDEP_OBJS"
9258then
Jack Jansene578a632001-08-15 01:27:14 +00009259 MACHDEP_OBJS=$extra_machdep_objs
9260else
9261 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9264$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009265
Guido van Rossum627b2d71993-12-24 10:39:16 +00009266# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009267for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009268 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009269 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009270 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009271 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009272 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009273 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009274 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9275 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009276 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009277 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009278 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009279 truncate uname unsetenv utimes waitpid wait3 wait4 \
9280 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009281do :
9282 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9283ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009284if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009286#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009287_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009288
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009289fi
9290done
9291
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009293# For some functions, having a definition is not sufficient, since
9294# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9296$as_echo_n "checking for chroot... " >&6; }
9297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009298/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300int
9301main ()
9302{
9303void *x=chroot
9304 ;
9305 return 0;
9306}
9307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311
Matthias Kloseb159a552010-04-25 21:00:44 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009313$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009314else
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009317
9318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9321$as_echo_n "checking for link... " >&6; }
9322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009323/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325int
9326main ()
9327{
9328void *x=link
9329 ;
9330 return 0;
9331}
9332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336
Matthias Kloseb159a552010-04-25 21:00:44 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339else
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009342
9343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9346$as_echo_n "checking for symlink... " >&6; }
9347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350int
9351main ()
9352{
9353void *x=symlink
9354 ;
9355 return 0;
9356}
9357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361
Matthias Kloseb159a552010-04-25 21:00:44 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009363$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364else
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009367
9368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9371$as_echo_n "checking for fchdir... " >&6; }
9372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009373/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009374#include <unistd.h>
9375int
9376main ()
9377{
9378void *x=fchdir
9379 ;
9380 return 0;
9381}
9382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386
Matthias Kloseb159a552010-04-25 21:00:44 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009388$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009389else
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9391$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009392
9393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9396$as_echo_n "checking for fsync... " >&6; }
9397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009399#include <unistd.h>
9400int
9401main ()
9402{
9403void *x=fsync
9404 ;
9405 return 0;
9406}
9407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411
Matthias Kloseb159a552010-04-25 21:00:44 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009413$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414else
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009417
9418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9421$as_echo_n "checking for fdatasync... " >&6; }
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009424#include <unistd.h>
9425int
9426main ()
9427{
9428void *x=fdatasync
9429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009434
Matthias Kloseb9621712010-04-24 17:59:49 +00009435$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436
Matthias Kloseb159a552010-04-25 21:00:44 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009438$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009439else
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009442
9443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9446$as_echo_n "checking for epoll... " >&6; }
9447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009448/* end confdefs.h. */
9449#include <sys/epoll.h>
9450int
9451main ()
9452{
9453void *x=epoll_create
9454 ;
9455 return 0;
9456}
9457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009461
Matthias Kloseb159a552010-04-25 21:00:44 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009463$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009464else
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009467
9468fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9471$as_echo_n "checking for kqueue... " >&6; }
9472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009473/* end confdefs.h. */
9474
9475#include <sys/types.h>
9476#include <sys/event.h>
9477
9478int
9479main ()
9480{
9481int x=kqueue()
9482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009486if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009487
Matthias Kloseb9621712010-04-24 17:59:49 +00009488$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009489
Matthias Kloseb159a552010-04-25 21:00:44 +00009490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009491$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009495
9496fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009498# On some systems (eg. FreeBSD 5), we would find a definition of the
9499# functions ctermid_r, setgroups in the library, but no prototype
9500# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9501# address to avoid compiler warnings and potential miscompilations
9502# because of the missing prototypes.
9503
Matthias Kloseb9621712010-04-24 17:59:49 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9505$as_echo_n "checking for ctermid_r... " >&6; }
9506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009508
Martin v. Löwisd5843682002-11-21 20:41:28 +00009509#include <stdio.h>
9510
Martin v. Löwisd5843682002-11-21 20:41:28 +00009511int
9512main ()
9513{
9514void* p = ctermid_r
9515 ;
9516 return 0;
9517}
9518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009520
Matthias Kloseb9621712010-04-24 17:59:49 +00009521$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009522
Matthias Kloseb159a552010-04-25 21:00:44 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009524$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009525else
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009528
9529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9531
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9533$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009534if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009535 $as_echo_n "(cached) " >&6
9536else
9537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009538/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009539#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009540int
9541main ()
9542{
9543void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009544
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009545 ;
9546 return 0;
9547}
9548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009549if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009550 ac_cv_flock_decl=yes
9551else
9552 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009553
9554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009556
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009557fi
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9559$as_echo "$ac_cv_flock_decl" >&6; }
9560if test "x${ac_cv_flock_decl}" = xyes; then
9561 for ac_func in flock
9562do :
9563 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009564if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009565 cat >>confdefs.h <<_ACEOF
9566#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009567_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009568
Antoine Pitroua3000072010-09-07 14:52:42 +00009569else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009571$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009572if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009573 $as_echo_n "(cached) " >&6
9574else
9575 ac_check_lib_save_LIBS=$LIBS
9576LIBS="-lbsd $LIBS"
9577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9578/* end confdefs.h. */
9579
9580/* Override any GCC internal prototype to avoid an error.
9581 Use char because int might match the return type of a GCC
9582 builtin and then its argument prototype would still apply. */
9583#ifdef __cplusplus
9584extern "C"
9585#endif
9586char flock ();
9587int
9588main ()
9589{
9590return flock ();
9591 ;
9592 return 0;
9593}
9594_ACEOF
9595if ac_fn_c_try_link "$LINENO"; then :
9596 ac_cv_lib_bsd_flock=yes
9597else
9598 ac_cv_lib_bsd_flock=no
9599fi
9600rm -f core conftest.err conftest.$ac_objext \
9601 conftest$ac_exeext conftest.$ac_ext
9602LIBS=$ac_check_lib_save_LIBS
9603fi
9604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9605$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009606if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009607 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009608
9609
9610$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9611
9612
9613fi
9614
9615
9616fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009617done
9618
Antoine Pitroua3000072010-09-07 14:52:42 +00009619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9622$as_echo_n "checking for getpagesize... " >&6; }
9623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009624/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009625
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626#include <unistd.h>
9627
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628int
9629main ()
9630{
9631void* p = getpagesize
9632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009639
Matthias Kloseb159a552010-04-25 21:00:44 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009641$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009645
9646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009648
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009649for ac_prog in true
9650do
9651 # Extract the first word of "$ac_prog", so it can be a program name with args.
9652set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9654$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009655if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009657else
9658 if test -n "$TRUE"; then
9659 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9660else
9661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9662for as_dir in $PATH
9663do
9664 IFS=$as_save_IFS
9665 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667 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 +00009668 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $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 +00009670 break 2
9671 fi
9672done
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675
9676fi
9677fi
9678TRUE=$ac_cv_prog_TRUE
9679if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9681$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009685fi
9686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688 test -n "$TRUE" && break
9689done
9690test -n "$TRUE" || TRUE="/bin/true"
9691
9692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9694$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009695if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009697else
9698 ac_check_lib_save_LIBS=$LIBS
9699LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703/* Override any GCC internal prototype to avoid an error.
9704 Use char because int might match the return type of a GCC
9705 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706#ifdef __cplusplus
9707extern "C"
9708#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710int
9711main ()
9712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009714 ;
9715 return 0;
9716}
9717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009718if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009719 ac_cv_lib_c_inet_aton=yes
9720else
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009723rm -f core conftest.err conftest.$ac_objext \
9724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009725LIBS=$ac_check_lib_save_LIBS
9726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9728$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009729if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009730 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731else
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9733$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009734if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736else
9737 ac_check_lib_save_LIBS=$LIBS
9738LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745#ifdef __cplusplus
9746extern "C"
9747#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749int
9750main ()
9751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758 ac_cv_lib_resolv_inet_aton=yes
9759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009764LIBS=$ac_check_lib_save_LIBS
9765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9767$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009768if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009769 cat >>confdefs.h <<_ACEOF
9770#define HAVE_LIBRESOLV 1
9771_ACEOF
9772
9773 LIBS="-lresolv $LIBS"
9774
9775fi
9776
9777
9778fi
9779
9780
Christian Heimesd0764e22007-12-04 15:00:33 +00009781# On Tru64, chflags seems to be present, but calling it will
9782# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9784$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009785if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009787else
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009789 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009790else
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009792/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009793[
Christian Heimesd0764e22007-12-04 15:00:33 +00009794#include <sys/stat.h>
9795#include <unistd.h>
9796int main(int argc, char*argv[])
9797{
9798 if(chflags(argv[0], 0) != 0)
9799 return 1;
9800 return 0;
9801}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009802]
Christian Heimesd0764e22007-12-04 15:00:33 +00009803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009804if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009805 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009806else
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009811fi
9812
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9816$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009817if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009819if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009820 ac_cv_have_chflags="yes"
9821else
9822 ac_cv_have_chflags="no"
9823fi
9824
9825fi
9826if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009827
Matthias Kloseb9621712010-04-24 17:59:49 +00009828$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009829
9830fi
9831
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9833$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009834if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009836else
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009841/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009842[
Christian Heimesd0764e22007-12-04 15:00:33 +00009843#include <sys/stat.h>
9844#include <unistd.h>
9845int main(int argc, char*argv[])
9846{
9847 if(lchflags(argv[0], 0) != 0)
9848 return 1;
9849 return 0;
9850}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009851]
Christian Heimesd0764e22007-12-04 15:00:33 +00009852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009854 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009860fi
9861
9862
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9865$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009866if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009868if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009869 ac_cv_have_lchflags="yes"
9870else
9871 ac_cv_have_lchflags="no"
9872fi
9873
9874fi
9875if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009878
9879fi
9880
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009881case $ac_sys_system/$ac_sys_release in
9882Darwin/*)
9883 _CUR_CFLAGS="${CFLAGS}"
9884 _CUR_LDFLAGS="${LDFLAGS}"
9885 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9886 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9887 ;;
9888esac
9889
Matthias Kloseb9621712010-04-24 17:59:49 +00009890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9891$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009892if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894else
9895 ac_check_lib_save_LIBS=$LIBS
9896LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009898/* end confdefs.h. */
9899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900/* Override any GCC internal prototype to avoid an error.
9901 Use char because int might match the return type of a GCC
9902 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009903#ifdef __cplusplus
9904extern "C"
9905#endif
9906char inflateCopy ();
9907int
9908main ()
9909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009911 ;
9912 return 0;
9913}
9914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009915if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009916 ac_cv_lib_z_inflateCopy=yes
9917else
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920rm -f core conftest.err conftest.$ac_objext \
9921 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009922LIBS=$ac_check_lib_save_LIBS
9923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9925$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009926if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009927
Matthias Kloseb9621712010-04-24 17:59:49 +00009928$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009929
9930fi
9931
9932
9933case $ac_sys_system/$ac_sys_release in
9934Darwin/*)
9935 CFLAGS="${_CUR_CFLAGS}"
9936 LDFLAGS="${_CUR_LDFLAGS}"
9937 ;;
9938esac
9939
Matthias Kloseb9621712010-04-24 17:59:49 +00009940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9941$as_echo_n "checking for hstrerror... " >&6; }
9942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009944
Martin v. Löwise9416172003-05-03 10:12:45 +00009945#include <netdb.h>
9946
Martin v. Löwise9416172003-05-03 10:12:45 +00009947int
9948main ()
9949{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009950void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009951 ;
9952 return 0;
9953}
9954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Matthias Kloseb159a552010-04-25 21:00:44 +00009959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009964
9965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966rm -f core conftest.err conftest.$ac_objext \
9967 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9970$as_echo_n "checking for inet_aton... " >&6; }
9971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009972/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Martin v. Löwis86d66262006-02-17 08:40:11 +00009974#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009975#include <sys/socket.h>
9976#include <netinet/in.h>
9977#include <arpa/inet.h>
9978
Martin v. Löwise9416172003-05-03 10:12:45 +00009979int
9980main ()
9981{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009982void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009983 ;
9984 return 0;
9985}
9986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Matthias Kloseb159a552010-04-25 21:00:44 +00009991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009992$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009993else
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009996
9997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998rm -f core conftest.err conftest.$ac_objext \
9999 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000
Matthias Kloseb9621712010-04-24 17:59:49 +000010001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10002$as_echo_n "checking for inet_pton... " >&6; }
10003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010006#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010007#include <sys/socket.h>
10008#include <netinet/in.h>
10009#include <arpa/inet.h>
10010
Martin v. Löwise9416172003-05-03 10:12:45 +000010011int
10012main ()
10013{
10014void* p = inet_pton
10015 ;
10016 return 0;
10017}
10018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010022
Matthias Kloseb159a552010-04-25 21:00:44 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010024$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010028
10029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010031
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010032# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10034$as_echo_n "checking for setgroups... " >&6; }
10035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010037
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010038#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010039#ifdef HAVE_GRP_H
10040#include <grp.h>
10041#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042
Martin v. Löwisd5843682002-11-21 20:41:28 +000010043int
10044main ()
10045{
10046void* p = setgroups
10047 ;
10048 return 0;
10049}
10050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010054
Matthias Kloseb159a552010-04-25 21:00:44 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010056$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010060
10061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010063
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010064# check for openpty and forkpty
10065
10066for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010067do :
10068 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010069if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010071#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010072_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010073
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010074else
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10076$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010077if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010079else
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010081LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085/* Override any GCC internal prototype to avoid an error.
10086 Use char because int might match the return type of a GCC
10087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010088#ifdef __cplusplus
10089extern "C"
10090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010091char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010092int
10093main ()
10094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 ;
10097 return 0;
10098}
10099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010102else
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105rm -f core conftest.err conftest.$ac_objext \
10106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010107LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10110$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010111if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010113 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10116$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010117if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010119else
10120 ac_check_lib_save_LIBS=$LIBS
10121LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010123/* end confdefs.h. */
10124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010131char openpty ();
10132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010141 ac_cv_lib_bsd_openpty=yes
10142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010147LIBS=$ac_check_lib_save_LIBS
10148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10150$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010151if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010153 LIBS="$LIBS -lbsd"
10154fi
10155
10156
10157fi
10158
Fred Drake8cef4cf2000-06-28 16:40:38 +000010159
10160fi
10161done
10162
10163for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010164do :
10165 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010166if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010168#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010170
Fred Drake8cef4cf2000-06-28 16:40:38 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10173$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010174if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176else
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010178LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182/* Override any GCC internal prototype to avoid an error.
10183 Use char because int might match the return type of a GCC
10184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010185#ifdef __cplusplus
10186extern "C"
10187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010188char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010189int
10190main ()
10191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010193 ;
10194 return 0;
10195}
10196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199else
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202rm -f core conftest.err conftest.$ac_objext \
10203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010204LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10207$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010208if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10213$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010214if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010216else
10217 ac_check_lib_save_LIBS=$LIBS
10218LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010220/* end confdefs.h. */
10221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222/* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225#ifdef __cplusplus
10226extern "C"
10227#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010228char forkpty ();
10229int
10230main ()
10231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233 ;
10234 return 0;
10235}
10236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010238 ac_cv_lib_bsd_forkpty=yes
10239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242rm -f core conftest.err conftest.$ac_objext \
10243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010244LIBS=$ac_check_lib_save_LIBS
10245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10247$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010248if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250 LIBS="$LIBS -lbsd"
10251fi
10252
10253
10254fi
10255
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256
10257fi
10258done
10259
Jack Jansendd19cf82001-12-06 22:36:17 +000010260
Christian Heimesb186d002008-03-18 15:15:01 +000010261# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010262for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010263do :
10264 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010265if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010268_ACEOF
10269
10270fi
10271done
10272
10273
Michael W. Hudson54241132001-12-07 15:38:26 +000010274# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010275for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010276do :
10277 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10278ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010279if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010282_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010283
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010284fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010285done
10286
Michael W. Hudson54241132001-12-07 15:38:26 +000010287
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010288ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10289if test "x$ac_cv_func_dup2" = xyes; then :
10290 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010291
Martin v. Löwis1142de32002-03-29 16:28:31 +000010292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010294 *" dup2.$ac_objext "* ) ;;
10295 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010297esac
10298
Martin v. Löwis1142de32002-03-29 16:28:31 +000010299fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010300
10301ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10302if test "x$ac_cv_func_getcwd" = xyes; then :
10303 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10304
10305else
10306 case " $LIBOBJS " in
10307 *" getcwd.$ac_objext "* ) ;;
10308 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10309 ;;
10310esac
10311
10312fi
10313
10314ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10315if test "x$ac_cv_func_strdup" = xyes; then :
10316 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10317
10318else
10319 case " $LIBOBJS " in
10320 *" strdup.$ac_objext "* ) ;;
10321 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10322 ;;
10323esac
10324
10325fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010326
10327
10328for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010329do :
10330 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010331if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010337#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010338int
10339main ()
10340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010341getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010349
Guido van Rossum627b2d71993-12-24 10:39:16 +000010350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010352
Guido van Rossum627b2d71993-12-24 10:39:16 +000010353fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010354done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010355
Jack Jansen150753c2003-03-29 22:07:47 +000010356for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010357do :
10358 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010359if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010360 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010365#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010366int
10367main ()
10368{
10369setpgrp(0,0);
10370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010377
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010380
10381fi
10382done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010383
Thomas Wouters3a584202000-08-05 23:28:51 +000010384for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010385do :
10386 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010387if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010392/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010397gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_compile "$LINENO"; then :
10403
Guido van Rossum627b2d71993-12-24 10:39:16 +000010404else
Skip Montanaro6dead952003-09-25 14:50:04 +000010405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010407
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
Guido van Rossum627b2d71993-12-24 10:39:16 +000010409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010413done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010414
Michael W. Hudson54241132001-12-07 15:38:26 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10417$as_echo_n "checking for major... " >&6; }
10418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010419/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010420
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010421#if defined(MAJOR_IN_MKDEV)
10422#include <sys/mkdev.h>
10423#elif defined(MAJOR_IN_SYSMACROS)
10424#include <sys/sysmacros.h>
10425#else
10426#include <sys/types.h>
10427#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010428
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010429int
10430main ()
10431{
10432
10433 makedev(major(0),minor(0));
10434
10435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010440
10441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10445$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010446
10447else
Skip Montanaro6dead952003-09-25 14:50:04 +000010448
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010451
10452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010453rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010455
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010456# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010457# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10459$as_echo_n "checking for getaddrinfo... " >&6; }
10460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010461/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010462
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010463#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010464#include <sys/socket.h>
10465#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010466#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010467
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010471getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010477 have_getaddrinfo=yes
10478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
10483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10484$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010485if test $have_getaddrinfo = yes
10486then
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10488$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010489 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010493 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010494else
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010496/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010497
10498#include <sys/types.h>
10499#include <netdb.h>
10500#include <string.h>
10501#include <sys/socket.h>
10502#include <netinet/in.h>
10503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010504int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010505{
10506 int passive, gaierr, inet4 = 0, inet6 = 0;
10507 struct addrinfo hints, *ai, *aitop;
10508 char straddr[INET6_ADDRSTRLEN], strport[16];
10509
10510 for (passive = 0; passive <= 1; passive++) {
10511 memset(&hints, 0, sizeof(hints));
10512 hints.ai_family = AF_UNSPEC;
10513 hints.ai_flags = passive ? AI_PASSIVE : 0;
10514 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010515 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010516 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10517 (void)gai_strerror(gaierr);
10518 goto bad;
10519 }
10520 for (ai = aitop; ai; ai = ai->ai_next) {
10521 if (ai->ai_addr == NULL ||
10522 ai->ai_addrlen == 0 ||
10523 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10524 straddr, sizeof(straddr), strport, sizeof(strport),
10525 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10526 goto bad;
10527 }
10528 switch (ai->ai_family) {
10529 case AF_INET:
10530 if (strcmp(strport, "54321") != 0) {
10531 goto bad;
10532 }
10533 if (passive) {
10534 if (strcmp(straddr, "0.0.0.0") != 0) {
10535 goto bad;
10536 }
10537 } else {
10538 if (strcmp(straddr, "127.0.0.1") != 0) {
10539 goto bad;
10540 }
10541 }
10542 inet4++;
10543 break;
10544 case AF_INET6:
10545 if (strcmp(strport, "54321") != 0) {
10546 goto bad;
10547 }
10548 if (passive) {
10549 if (strcmp(straddr, "::") != 0) {
10550 goto bad;
10551 }
10552 } else {
10553 if (strcmp(straddr, "::1") != 0) {
10554 goto bad;
10555 }
10556 }
10557 inet6++;
10558 break;
10559 case AF_UNSPEC:
10560 goto bad;
10561 break;
10562 default:
10563 /* another family support? */
10564 break;
10565 }
10566 }
10567 }
10568
10569 if (!(inet4 == 0 || inet4 == 2))
10570 goto bad;
10571 if (!(inet6 == 0 || inet6 == 2))
10572 goto bad;
10573
10574 if (aitop)
10575 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010576 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010577
10578 bad:
10579 if (aitop)
10580 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010581 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010582}
10583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010585if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010586 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010595
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10599$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10600
Mark Dickinson2df5d282009-12-31 21:22:50 +000010601if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010602then
10603 if test $ipv6 = yes
10604 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010605 echo 'Fatal: You must get working getaddrinfo() function.'
10606 echo ' or you can specify "--disable-ipv6"'.
10607 exit 1
10608 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010609else
Martin v. Löwis11437992002-04-12 09:54:03 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010612
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010614
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010615for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010616do :
10617 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010618if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010622
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010623fi
10624done
10625
Michael W. Hudson54241132001-12-07 15:38:26 +000010626
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10629$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 +000010630if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635#include <sys/types.h>
10636#include <sys/time.h>
10637#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010638
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
10642if ((struct tm *) 0)
10643return 0;
10644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10656$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010657if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660
10661fi
10662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10664$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 +000010665if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670#include <sys/types.h>
10671#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Martin v. Löwis11437992002-04-12 09:54:03 +000010673int
10674main ()
10675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676struct tm tm;
10677 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ;
10680 return 0;
10681}
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684 ac_cv_struct_tm=time.h
10685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10691$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010692if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695
10696fi
10697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698ac_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 +000010699#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Matthias Kloseb9621712010-04-24 17:59:49 +000010701"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010702if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
10704cat >>confdefs.h <<_ACEOF
10705#define HAVE_STRUCT_TM_TM_ZONE 1
10706_ACEOF
10707
10708
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010710
Martin v. Löwis11437992002-04-12 09:54:03 +000010711if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714
10715else
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10717"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010718if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720else
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722fi
10723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726_ACEOF
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10729$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010730if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010735#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736#if !HAVE_DECL_TZNAME
10737extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010739
Martin v. Löwis11437992002-04-12 09:54:03 +000010740int
10741main ()
10742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 ;
10745 return 0;
10746}
10747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010748if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749 ac_cv_var_tzname=yes
10750else
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010753rm -f core conftest.err conftest.$ac_objext \
10754 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10757$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010758 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762 fi
10763fi
10764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765ac_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 +000010766if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010767
10768cat >>confdefs.h <<_ACEOF
10769#define HAVE_STRUCT_STAT_ST_RDEV 1
10770_ACEOF
10771
10772
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010773fi
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775ac_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 +000010776if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010777
Martin v. Löwis11437992002-04-12 09:54:03 +000010778cat >>confdefs.h <<_ACEOF
10779#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10780_ACEOF
10781
10782
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010783fi
10784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785ac_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 +000010786if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010787
10788cat >>confdefs.h <<_ACEOF
10789#define HAVE_STRUCT_STAT_ST_FLAGS 1
10790_ACEOF
10791
10792
10793fi
10794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795ac_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 +000010796if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010797
10798cat >>confdefs.h <<_ACEOF
10799#define HAVE_STRUCT_STAT_ST_GEN 1
10800_ACEOF
10801
10802
10803fi
10804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805ac_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 +000010806if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010807
10808cat >>confdefs.h <<_ACEOF
10809#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10810_ACEOF
10811
10812
10813fi
10814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815ac_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 +000010816if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010817
Martin v. Löwis11437992002-04-12 09:54:03 +000010818cat >>confdefs.h <<_ACEOF
10819#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10820_ACEOF
10821
10822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010824
10825else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010827 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10829 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010830esac
10831
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010832fi
10833
Michael W. Hudson54241132001-12-07 15:38:26 +000010834
Martin v. Löwis11437992002-04-12 09:54:03 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10837$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010838if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840else
Matthias Kloseb159a552010-04-25 21:00:44 +000010841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010843/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010844#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010845int
10846main ()
10847{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 ;
10850 return 0;
10851}
10852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010853if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854 ac_cv_header_time_altzone=yes
10855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10863$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010864if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867
10868fi
10869
Guido van Rossumda88dad1995-01-26 00:46:29 +000010870was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10872$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010875
10876#include <sys/types.h>
10877#include <sys/select.h>
10878#include <sys/time.h>
10879
Martin v. Löwis11437992002-04-12 09:54:03 +000010880int
10881main ()
10882{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010883;
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 ;
10885 return 0;
10886}
10887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010889
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010892
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010893 was_it_defined=yes
10894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10898$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10901$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010902if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010906/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010907#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010908int
10909main ()
10910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ;
10913 return 0;
10914}
10915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010917 ac_cv_struct_addrinfo=yes
10918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922fi
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10925$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929
10930fi
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10933$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010934if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010936else
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010939
10940# include <sys/types.h>
10941# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010942int
10943main ()
10944{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010945struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951 ac_cv_struct_sockaddr_storage=yes
10952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956fi
10957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10959$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010960if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010963
10964fi
10965
Guido van Rossum627b2d71993-12-24 10:39:16 +000010966# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10969$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010970if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010976int
10977main ()
10978{
10979static int test_array [1 - 2 * !(((char) -1) < 0)];
10980test_array [0] = 0
10981
10982 ;
10983 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010984}
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010986if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010987 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010988else
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10994$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997
10998fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11001$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011002if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011007
Martin v. Löwis11437992002-04-12 09:54:03 +000011008int
11009main ()
11010{
11011/* FIXME: Include the comments suggested by Paul. */
11012#ifndef __cplusplus
11013 /* Ultrix mips cc rejects this. */
11014 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017 char const *const *pcpcc;
11018 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 /* NEC SVR4.0.2 mips cc rejects this. */
11020 struct point {int x, y;};
11021 static struct point const zero = {0,0};
11022 /* AIX XL C 1.02.0.0 rejects this.
11023 It does not let you subtract one const X* pointer from another in
11024 an arm of an if-expression whose if-part is not a constant
11025 expression */
11026 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029 ++pcpcc;
11030 ppc = (char**) pcpcc;
11031 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 { /* SCO 3.2v4 cc rejects this. */
11033 char *t;
11034 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011035
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 }
11039 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11040 int x[] = {25, 17};
11041 const int *foo = &x[0];
11042 ++foo;
11043 }
11044 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11045 typedef const int *iptr;
11046 iptr p = 0;
11047 ++p;
11048 }
11049 { /* AIX XL C 1.02.0.0 rejects this saying
11050 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11051 struct s { int j; const int *ap[3]; };
11052 struct s *b; b->j = 5;
11053 }
11054 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11055 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011059#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011060
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 ;
11062 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011063}
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011065if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066 ac_cv_c_const=yes
11067else
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11073$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011074if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077
11078fi
11079
Michael W. Hudson54241132001-12-07 15:38:26 +000011080
Guido van Rossumda88dad1995-01-26 00:46:29 +000011081works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11083$as_echo_n "checking for working volatile... " >&6; }
11084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011085/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087int
11088main ()
11089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011090volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 ;
11092 return 0;
11093}
11094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011095if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011096 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011097else
Skip Montanaro6dead952003-09-25 14:50:04 +000011098
Matthias Kloseb9621712010-04-24 17:59:49 +000011099$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011100
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011101
Guido van Rossum627b2d71993-12-24 10:39:16 +000011102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11105$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011106
Guido van Rossumda88dad1995-01-26 00:46:29 +000011107works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11109$as_echo_n "checking for working signed char... " >&6; }
11110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113int
11114main ()
11115{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ;
11118 return 0;
11119}
11120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011122 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011123else
Skip Montanaro6dead952003-09-25 14:50:04 +000011124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011127
Guido van Rossum7f43da71994-08-01 12:15:30 +000011128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11131$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011132
Guido van Rossumda88dad1995-01-26 00:46:29 +000011133have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11135$as_echo_n "checking for prototypes... " >&6; }
11136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011137/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011139int
11140main ()
11141{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ;
11144 return 0;
11145}
11146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Matthias Kloseb159a552010-04-25 21:00:44 +000011151 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11155$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156
Guido van Rossumda88dad1995-01-26 00:46:29 +000011157works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11159$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011161/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011162
11163#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011164int foo(int x, ...) {
11165 va_list va;
11166 va_start(va, x);
11167 va_arg(va, int);
11168 va_arg(va, char *);
11169 va_arg(va, double);
11170 return 0;
11171}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173int
11174main ()
11175{
Guido van Rossum90eea071996-08-30 20:58:57 +000011176return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 ;
11178 return 0;
11179}
11180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011182
11183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011186 works=yes
11187
Guido van Rossum627b2d71993-12-24 10:39:16 +000011188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11191$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011192
Martin v. Löwisd6320502004-08-12 13:45:08 +000011193# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11195$as_echo_n "checking for socketpair... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197/* end confdefs.h. */
11198
11199#include <sys/types.h>
11200#include <sys/socket.h>
11201
11202int
11203main ()
11204{
11205void *x=socketpair
11206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011211
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011213
Matthias Kloseb159a552010-04-25 21:00:44 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011216else
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011219
11220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011222
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11225$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011228#include <sys/types.h>
11229#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011230int
11231main ()
11232{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233struct sockaddr x;
11234x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ;
11236 return 0;
11237}
11238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011239if ac_fn_c_try_compile "$LINENO"; then :
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11241$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011244
11245else
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11247$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011248
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011251
Guido van Rossumda88dad1995-01-26 00:46:29 +000011252va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11254$as_echo_n "checking whether va_list is an array... " >&6; }
11255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011257
11258#ifdef HAVE_STDARG_PROTOTYPES
11259#include <stdarg.h>
11260#else
11261#include <varargs.h>
11262#endif
11263
Martin v. Löwis11437992002-04-12 09:54:03 +000011264int
11265main ()
11266{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011267va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 ;
11269 return 0;
11270}
11271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272if ac_fn_c_try_compile "$LINENO"; then :
11273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274else
Skip Montanaro6dead952003-09-25 14:50:04 +000011275
Martin v. Löwis11437992002-04-12 09:54:03 +000011276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
Guido van Rossumda88dad1995-01-26 00:46:29 +000011279 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11284$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011286# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
11288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011290if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11295$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011296 OLD_CFLAGS=$CFLAGS
11297 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011300
11301# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Martin v. Löwis11437992002-04-12 09:54:03 +000011303int
11304main ()
11305{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011306
11307 char *name;
11308 struct hostent *he, *res;
11309 char buffer[2048];
11310 int buflen = 2048;
11311 int h_errnop;
11312
11313 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11327$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329else
Skip Montanaro6dead952003-09-25 14:50:04 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11334$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011337
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011338# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011343
11344 char *name;
11345 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011346 char buffer[2048];
11347 int buflen = 2048;
11348 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011349
Matthias Kloseb159a552010-04-25 21:00:44 +000011350 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
11352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011359
Martin v. Löwis11437992002-04-12 09:54:03 +000011360
Matthias Kloseb159a552010-04-25 21:00:44 +000011361$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11364$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011366else
Skip Montanaro6dead952003-09-25 14:50:04 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11371$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373/* end confdefs.h. */
11374
11375# include <netdb.h>
11376
11377int
11378main ()
11379{
11380
11381 char *name;
11382 struct hostent *he;
11383 struct hostent_data data;
11384
11385 (void) gethostbyname_r(name, he, &data);
11386
11387 ;
11388 return 0;
11389}
11390_ACEOF
11391if ac_fn_c_try_compile "$LINENO"; then :
11392
11393 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11394
11395
11396$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11397
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399$as_echo "yes" >&6; }
11400
11401else
11402
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011411
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414 CFLAGS=$OLD_CFLAGS
11415
11416else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 for ac_func in gethostbyname
11419do :
11420 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011421if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011424_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011426fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011427done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011428
Michael W. Hudson54241132001-12-07 15:38:26 +000011429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011430fi
11431
Michael W. Hudson54241132001-12-07 15:38:26 +000011432
11433
11434
11435
11436
11437
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438# checks for system services
11439# (none yet)
11440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011442ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011443if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011444
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011445else
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11447$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011448if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450else
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011452LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456/* Override any GCC internal prototype to avoid an error.
11457 Use char because int might match the return type of a GCC
11458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011459#ifdef __cplusplus
11460extern "C"
11461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011462char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011463int
11464main ()
11465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 ;
11468 return 0;
11469}
11470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011476rm -f core conftest.err conftest.$ac_objext \
11477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11481$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011482if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 cat >>confdefs.h <<_ACEOF
11484#define HAVE_LIBIEEE 1
11485_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011487 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011488
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489fi
11490
Michael W. Hudson54241132001-12-07 15:38:26 +000011491
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011492fi
11493
Michael W. Hudson54241132001-12-07 15:38:26 +000011494
Guido van Rossum7f253911997-05-09 02:42:48 +000011495# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11497$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011500if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011502if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011503then
11504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11508$as_echo "yes" >&6; }
11509else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011511fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011512else
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11514$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515fi
11516
Guido van Rossum7f253911997-05-09 02:42:48 +000011517
Guido van Rossum7f43da71994-08-01 12:15:30 +000011518# check for --with-libm=...
11519
Guido van Rossum563e7081996-09-10 18:20:48 +000011520case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011521Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011522*) LIBM=-lm
11523esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11525$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011528if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011530if test "$withval" = no
11531then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11533$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011534elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011535then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11537$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011538else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011539fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11542$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543fi
11544
Guido van Rossum7f43da71994-08-01 12:15:30 +000011545
11546# check for --with-libc=...
11547
Matthias Kloseb9621712010-04-24 17:59:49 +000011548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11549$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011554if test "$withval" = no
11555then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11557$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011558elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011559then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11561$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011562else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011563fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11566$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567fi
11568
Guido van Rossum7f43da71994-08-01 12:15:30 +000011569
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570# **************************************************
11571# * Check for various properties of floating point *
11572# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11575$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011576if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011578else
11579
Matthias Kloseb9621712010-04-24 17:59:49 +000011580if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011581 ac_cv_little_endian_double=no
11582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584/* end confdefs.h. */
11585
11586#include <string.h>
11587int main() {
11588 double x = 9006104071832581.0;
11589 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11590 return 0;
11591 else
11592 return 1;
11593}
11594
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011597 ac_cv_little_endian_double=yes
11598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011603fi
11604
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605fi
11606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11608$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609if test "$ac_cv_little_endian_double" = yes
11610then
11611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613
11614fi
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11617$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011618if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620else
11621
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623 ac_cv_big_endian_double=no
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626/* end confdefs.h. */
11627
11628#include <string.h>
11629int main() {
11630 double x = 9006104071832581.0;
11631 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11632 return 0;
11633 else
11634 return 1;
11635}
11636
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639 ac_cv_big_endian_double=yes
11640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645fi
11646
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647fi
11648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11650$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651if test "$ac_cv_big_endian_double" = yes
11652then
11653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655
11656fi
11657
11658# Some ARM platforms use a mixed-endian representation for doubles.
11659# While Python doesn't currently have full support for these platforms
11660# (see e.g., issue 1762561), we can at least make sure that float <-> string
11661# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11663$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011664if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666else
11667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669 ac_cv_mixed_endian_double=no
11670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672/* end confdefs.h. */
11673
11674#include <string.h>
11675int main() {
11676 double x = 9006104071832581.0;
11677 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11678 return 0;
11679 else
11680 return 1;
11681}
11682
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685 ac_cv_mixed_endian_double=yes
11686else
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691fi
11692
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011693fi
11694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11696$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697if test "$ac_cv_mixed_endian_double" = yes
11698then
11699
Matthias Kloseb9621712010-04-24 17:59:49 +000011700$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701
11702fi
11703
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011704# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011705# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011706# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011707# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011708# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011709# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011710
11711# This inline assembler syntax may also work for suncc and icc,
11712# so we try it on all platforms.
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11715$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717/* end confdefs.h. */
11718
11719int
11720main ()
11721{
11722
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011723 unsigned short cw;
11724 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11725 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732 have_gcc_asm_for_x87=yes
11733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11738$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011739if test "$have_gcc_asm_for_x87" = yes
11740then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011745
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011746# Detect whether system arithmetic is subject to x87-style double
11747# rounding issues. The result of this test has little meaning on non
11748# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11749# mode is round-to-nearest and double rounding issues are present, and
11750# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11752$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753# $BASECFLAGS may affect the result
11754ac_save_cc="$CC"
11755CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011756if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011757 ac_cv_x87_double_rounding=no
11758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011760/* end confdefs.h. */
11761
11762#include <stdlib.h>
11763#include <math.h>
11764int main() {
11765 volatile double x, y, z;
11766 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11767 x = 0.99999999999999989; /* 1-2**-53 */
11768 y = 1./x;
11769 if (y != 1.)
11770 exit(0);
11771 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11772 x = 1e16;
11773 y = 2.99999;
11774 z = x + y;
11775 if (z != 1e16+4.)
11776 exit(0);
11777 /* both tests show evidence of double rounding */
11778 exit(1);
11779}
11780
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011783 ac_cv_x87_double_rounding=no
11784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011789fi
11790
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11793$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011794if test "$ac_cv_x87_double_rounding" = yes
11795then
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011798
11799fi
11800
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011801# ************************************
11802# * Check for mathematical functions *
11803# ************************************
11804
11805LIBS_SAVE=$LIBS
11806LIBS="$LIBS $LIBM"
11807
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011808for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11809do :
11810 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11811ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011812if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011813 cat >>confdefs.h <<_ACEOF
11814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11815_ACEOF
11816
11817fi
11818done
11819
11820for ac_func in hypot lgamma log1p round tgamma
11821do :
11822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11823ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011824if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011825 cat >>confdefs.h <<_ACEOF
11826#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11827_ACEOF
11828
11829fi
11830done
11831
11832ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11833"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011834if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011835 ac_have_decl=1
11836else
11837 ac_have_decl=0
11838fi
11839
11840cat >>confdefs.h <<_ACEOF
11841#define HAVE_DECL_ISINF $ac_have_decl
11842_ACEOF
11843ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11844"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011845if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011846 ac_have_decl=1
11847else
11848 ac_have_decl=0
11849fi
11850
11851cat >>confdefs.h <<_ACEOF
11852#define HAVE_DECL_ISNAN $ac_have_decl
11853_ACEOF
11854ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11855"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011856if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011857 ac_have_decl=1
11858else
11859 ac_have_decl=0
11860fi
11861
11862cat >>confdefs.h <<_ACEOF
11863#define HAVE_DECL_ISFINITE $ac_have_decl
11864_ACEOF
11865
11866
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011867# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11868# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11870$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011871if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011873else
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011876 ac_cv_tanh_preserves_zero_sign=no
11877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011879/* end confdefs.h. */
11880
11881#include <math.h>
11882#include <stdlib.h>
11883int main() {
11884 /* return 0 if either negative zeros don't exist
11885 on this platform or if negative zeros exist
11886 and tanh(-0.) == -0. */
11887 if (atan2(0., -1.) == atan2(-0., -1.) ||
11888 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11889 else exit(1);
11890}
11891
11892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011894 ac_cv_tanh_preserves_zero_sign=yes
11895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011900fi
11901
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011902fi
11903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11905$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011906if test "$ac_cv_tanh_preserves_zero_sign" = yes
11907then
11908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011910
11911fi
11912
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011913if test "$ac_cv_func_log1p" = yes
11914then
11915 # On some versions of AIX, log1p(-0.) returns 0. instead of
11916 # -0. See issue #9920.
11917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11918$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011919 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011920 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011922
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011923 if test "$cross_compiling" = yes; then :
11924 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011925else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11927/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011928
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011929 #include <math.h>
11930 #include <stdlib.h>
11931 int main() {
11932 /* Fail if the signs of log1p(-0.) and -0. can be
11933 distinguished. */
11934 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11935 return 0;
11936 else
11937 return 1;
11938 }
11939
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011940_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011941if ac_fn_c_try_run "$LINENO"; then :
11942 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011943else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011944 ac_cv_log1p_drops_zero_sign=yes
11945fi
11946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011948fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011949
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011950fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011951
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11953$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11954fi
11955if test "$ac_cv_log1p_drops_zero_sign" = yes
11956then
11957
11958$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11959
11960fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011961
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011962LIBS=$LIBS_SAVE
11963
Mark Dickinsona614f042009-11-28 12:48:43 +000011964# For multiprocessing module, check that sem_open
11965# actually works. For FreeBSD versions <= 7.2,
11966# the kernel module that provides POSIX semaphores
11967# isn't loaded by default, so an attempt to call
11968# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11970$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011971if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011975 ac_cv_posix_semaphores_enabled=yes
11976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011978/* end confdefs.h. */
11979
11980#include <unistd.h>
11981#include <fcntl.h>
11982#include <stdio.h>
11983#include <semaphore.h>
11984#include <sys/stat.h>
11985
11986int main(void) {
11987 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11988 if (a == SEM_FAILED) {
11989 perror("sem_open");
11990 return 1;
11991 }
11992 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011993 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011994 return 0;
11995}
11996
11997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011998if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011999 ac_cv_posix_semaphores_enabled=yes
12000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012005fi
12006
12007
Mark Dickinsona614f042009-11-28 12:48:43 +000012008fi
12009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12011$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012012if test $ac_cv_posix_semaphores_enabled = no
12013then
12014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012016
12017fi
12018
Mark Dickinson10683072009-04-18 21:18:19 +000012019# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12021$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012022if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012026 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012029/* end confdefs.h. */
12030
12031#include <unistd.h>
12032#include <fcntl.h>
12033#include <stdio.h>
12034#include <semaphore.h>
12035#include <sys/stat.h>
12036
12037int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012038 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012039 int count;
12040 int res;
12041 if(a==SEM_FAILED){
12042 perror("sem_open");
12043 return 1;
12044
12045 }
12046 res = sem_getvalue(a, &count);
12047 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012048 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012049 return res==-1 ? 1 : 0;
12050}
12051
Mark Dickinson10683072009-04-18 21:18:19 +000012052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012054 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012060fi
12061
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012063fi
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12066$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012067if test $ac_cv_broken_sem_getvalue = yes
12068then
12069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012071
12072fi
12073
Mark Dickinsonbd792642009-03-18 20:06:12 +000012074# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12076$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012077# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012079 enableval=$enable_big_digits; case $enable_big_digits in
12080yes)
12081 enable_big_digits=30 ;;
12082no)
12083 enable_big_digits=15 ;;
1208415|30)
12085 ;;
12086*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012087 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 +000012088esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12090$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012091
12092cat >>confdefs.h <<_ACEOF
12093#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12094_ACEOF
12095
12096
12097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12099$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012100fi
12101
12102
Guido van Rossumef2255b2000-03-10 22:30:29 +000012103# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012104ac_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 +000012105if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012106
12107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012109
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012110 wchar_h="yes"
12111
Guido van Rossumef2255b2000-03-10 22:30:29 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012114
12115fi
12116
Michael W. Hudson54241132001-12-07 15:38:26 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012119# determine wchar_t size
12120if test "$wchar_h" = yes
12121then
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12125# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12127$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012128if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12132"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 if test "$ac_cv_type_wchar_t" = yes; then
12136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012138as_fn_error 77 "cannot compute sizeof (wchar_t)
12139See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140 else
12141 ac_cv_sizeof_wchar_t=0
12142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012144
Martin v. Löwis11437992002-04-12 09:54:03 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12147$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148
12149
12150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012152#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012153_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012154
Michael W. Hudson54241132001-12-07 15:38:26 +000012155
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012156fi
12157
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12159$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012160have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012163
12164#include <tcl.h>
12165#if TCL_UTF_MAX != 6
12166# error "NOT UCS4_TCL"
12167#endif
12168int
12169main ()
12170{
12171
12172 ;
12173 return 0;
12174}
12175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012177
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012180
12181 have_ucs4_tcl=yes
12182
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12186$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012187
Skip Montanaro6dead952003-09-25 14:50:04 +000012188# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189if test "$wchar_h" = yes
12190then
12191 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12193$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012194 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012196else
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012199 ac_cv_wchar_t_signed=yes
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012202/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012203
12204 #include <wchar.h>
12205 int main()
12206 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012207 /* Success: exit code 0 */
12208 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012209 }
12210
12211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012213 ac_cv_wchar_t_signed=yes
12214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012219fi
12220
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012221fi
12222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12224$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225fi
12226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12228$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012229
12230# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012232 withval=$with_wide_unicode;
12233if test "$withval" != no
12234then unicode_size="4"
12235else unicode_size="2"
12236fi
12237
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239
Georg Brandl52d168a2008-01-07 18:10:24 +000012240case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012241 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012242 *) unicode_size="2" ;;
12243esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012244
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012245fi
12246
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012247
12248
Georg Brandl52d168a2008-01-07 18:10:24 +000012249case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012250 4)
12251 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12252
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012253 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012254 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012256 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012257esac
12258
Michael W. Hudson54241132001-12-07 15:38:26 +000012259
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
Georg Brandl52d168a2008-01-07 18:10:24 +000012261# wchar_t is only usable if it maps to an unsigned type
12262if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012263 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012264then
12265 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012270
Georg Brandl52d168a2008-01-07 18:10:24 +000012271elif test "$ac_cv_sizeof_short" = "$unicode_size"
12272then
12273 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012275
Georg Brandl52d168a2008-01-07 18:10:24 +000012276elif test "$ac_cv_sizeof_long" = "$unicode_size"
12277then
12278 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012280
Georg Brandl52d168a2008-01-07 18:10:24 +000012281else
12282 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12285$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012286
12287# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12289$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012290if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012292else
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 ac_cv_c_bigendian=unknown
12294 # See if we're dealing with a universal compiler.
12295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296/* end confdefs.h. */
12297#ifndef __APPLE_CC__
12298 not a universal capable compiler
12299 #endif
12300 typedef int dummy;
12301
Skip Montanaro6dead952003-09-25 14:50:04 +000012302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_compile "$LINENO"; then :
12304
12305 # Check for potential -arch flags. It is not universal unless
12306 # there are at least two -arch flags with different values.
12307 ac_arch=
12308 ac_prev=
12309 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12310 if test -n "$ac_prev"; then
12311 case $ac_word in
12312 i?86 | x86_64 | ppc | ppc64)
12313 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12314 ac_arch=$ac_word
12315 else
12316 ac_cv_c_bigendian=universal
12317 break
12318 fi
12319 ;;
12320 esac
12321 ac_prev=
12322 elif test "x$ac_word" = "x-arch"; then
12323 ac_prev=arch
12324 fi
12325 done
12326fi
12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12328 if test $ac_cv_c_bigendian = unknown; then
12329 # See if sys/param.h defines the BYTE_ORDER macro.
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012332#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Matthias Kloseb9621712010-04-24 17:59:49 +000012338#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12339 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12340 && LITTLE_ENDIAN)
12341 bogus endian macros
12342 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
12344 ;
12345 return 0;
12346}
12347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012349 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012351/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012352#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012358#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 not big endian
12360 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
12362 ;
12363 return 0;
12364}
12365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012367 ac_cv_c_bigendian=yes
12368else
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012372fi
12373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12374 fi
12375 if test $ac_cv_c_bigendian = unknown; then
12376 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012379#include <limits.h>
12380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381int
12382main ()
12383{
Matthias Kloseb9621712010-04-24 17:59:49 +000012384#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12385 bogus endian macros
12386 #endif
12387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
12393 # It does; now see whether it defined to _BIG_ENDIAN or not.
12394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395/* end confdefs.h. */
12396#include <limits.h>
12397
12398int
12399main ()
12400{
12401#ifndef _BIG_ENDIAN
12402 not big endian
12403 #endif
12404
12405 ;
12406 return 0;
12407}
12408_ACEOF
12409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012411else
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12415fi
12416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12417 fi
12418 if test $ac_cv_c_bigendian = unknown; then
12419 # Compile a test program.
12420 if test "$cross_compiling" = yes; then :
12421 # Try to guess by grepping values from an object file.
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12423/* end confdefs.h. */
12424short int ascii_mm[] =
12425 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12426 short int ascii_ii[] =
12427 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12428 int use_ascii (int i) {
12429 return ascii_mm[i] + ascii_ii[i];
12430 }
12431 short int ebcdic_ii[] =
12432 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12433 short int ebcdic_mm[] =
12434 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12435 int use_ebcdic (int i) {
12436 return ebcdic_mm[i] + ebcdic_ii[i];
12437 }
12438 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440int
12441main ()
12442{
12443return use_ascii (foo) == use_ebcdic (foo);
12444 ;
12445 return 0;
12446}
12447_ACEOF
12448if ac_fn_c_try_compile "$LINENO"; then :
12449 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12450 ac_cv_c_bigendian=yes
12451 fi
12452 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12453 if test "$ac_cv_c_bigendian" = unknown; then
12454 ac_cv_c_bigendian=no
12455 else
12456 # finding both strings is unlikely to happen, but who knows?
12457 ac_cv_c_bigendian=unknown
12458 fi
12459 fi
12460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012466int
12467main ()
12468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 /* Are we little or big endian? From Harbison&Steele. */
12471 union
12472 {
12473 long int l;
12474 char c[sizeof (long int)];
12475 } u;
12476 u.l = 1;
12477 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478
12479 ;
12480 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012481}
Martin v. Löwis11437992002-04-12 09:54:03 +000012482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012484 ac_cv_c_bigendian=no
12485else
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12495$as_echo "$ac_cv_c_bigendian" >&6; }
12496 case $ac_cv_c_bigendian in #(
12497 yes)
12498 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12499;; #(
12500 no)
12501 ;; #(
12502 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012503
Matthias Kloseb9621712010-04-24 17:59:49 +000012504$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 ;; #(
12507 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012508 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012509 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012511
Michael W. Hudson54241132001-12-07 15:38:26 +000012512
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012513# ABI version string for Python extension modules. This appears between the
12514# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12515# from the following attributes which affect the ABI of this Python build (in
12516# this order):
12517#
12518# * The Python implementation (always 'cpython-' for us)
12519# * The major and minor version numbers
12520# * --with-pydebug (adds a 'd')
12521# * --with-pymalloc (adds a 'm')
12522# * --with-wide-unicode (adds a 'u')
12523#
12524# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012525# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12526# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012527
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12529$as_echo_n "checking ABIFLAGS... " >&6; }
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12531$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12533$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012534SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12536$as_echo "$SOABI" >&6; }
12537
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12539$as_echo_n "checking LDVERSION... " >&6; }
12540LDVERSION='$(VERSION)$(ABIFLAGS)'
12541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12542$as_echo "$LDVERSION" >&6; }
12543
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012544# SO is the extension of shared libraries `(including the dot!)
12545# -- usually .so, .sl on HP-UX, .dll on Cygwin
12546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12547$as_echo_n "checking SO... " >&6; }
12548if test -z "$SO"
12549then
12550 case $ac_sys_system in
12551 hp*|HP*)
12552 case `uname -m` in
12553 ia64) SO=.so;;
12554 *) SO=.sl;;
12555 esac
12556 ;;
12557 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012558 Linux*|GNU*)
12559 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012560 *) SO=.so;;
12561 esac
12562else
12563 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012564 echo
12565 echo '====================================================================='
12566 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012567 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012568 echo '+ Do you really mean to change the extension for shared libraries? +'
12569 echo '+ Continuing in 10 seconds to let you to ponder. +'
12570 echo '+ +'
12571 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012572 sleep 10
12573fi
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12575$as_echo "$SO" >&6; }
12576
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012577# Check whether right shifting a negative integer extends the sign bit
12578# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12580$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012581if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012583else
Martin v. Löwis11437992002-04-12 09:54:03 +000012584
Matthias Kloseb9621712010-04-24 17:59:49 +000012585if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012586 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012590
12591int main()
12592{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012593 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012594}
12595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012598 ac_cv_rshift_extends_sign=yes
12599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012604fi
12605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606fi
12607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12609$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012610if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012611then
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012614
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012615fi
12616
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012617# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12619$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012620if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012625/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012626#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012630
12631 FILE *f = fopen("/dev/null", "r");
12632 flockfile(f);
12633 getc_unlocked(f);
12634 funlockfile(f);
12635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012641 ac_cv_have_getc_unlocked=yes
12642else
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 ac_cv_have_getc_unlocked=no
12644fi
12645rm -f core conftest.err conftest.$ac_objext \
12646 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12650$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012651if test "$ac_cv_have_getc_unlocked" = yes
12652then
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012655
12656fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012657
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012658# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012659# save the value of LIBS so we don't actually link Python with readline
12660LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012661
Gregory P. Smith18820942008-09-07 06:24:49 +000012662# On some systems we need to link readline to a termcap compatible
12663# library. NOTE: Keep the precedence of listed libraries synchronised
12664# with setup.py.
12665py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12667$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012668for py_libtermcap in "" ncursesw ncurses curses termcap; do
12669 if test -z "$py_libtermcap"; then
12670 READLINE_LIBS="-lreadline"
12671 else
12672 READLINE_LIBS="-lreadline -l$py_libtermcap"
12673 fi
12674 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012676/* end confdefs.h. */
12677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678/* Override any GCC internal prototype to avoid an error.
12679 Use char because int might match the return type of a GCC
12680 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012681#ifdef __cplusplus
12682extern "C"
12683#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012684char readline ();
12685int
12686main ()
12687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012689 ;
12690 return 0;
12691}
12692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012694 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012696rm -f core conftest.err conftest.$ac_objext \
12697 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012698 if test $py_cv_lib_readline = yes; then
12699 break
12700 fi
12701done
12702# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12703#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012704if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12706$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012707else
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12709$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012712
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012713fi
12714
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012715# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12717$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012718if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012720else
12721 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012722LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012724/* end confdefs.h. */
12725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726/* Override any GCC internal prototype to avoid an error.
12727 Use char because int might match the return type of a GCC
12728 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729#ifdef __cplusplus
12730extern "C"
12731#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012732char rl_callback_handler_install ();
12733int
12734main ()
12735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012737 ;
12738 return 0;
12739}
12740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012742 ac_cv_lib_readline_rl_callback_handler_install=yes
12743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012746rm -f core conftest.err conftest.$ac_objext \
12747 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012748LIBS=$ac_check_lib_save_LIBS
12749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12751$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012752if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012755
12756fi
12757
12758
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012759# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012762#include <readline/readline.h>
12763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012764if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012765 have_readline=yes
12766else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012767 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012768
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012770rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012771if test $have_readline = yes
12772then
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012775#include <readline/readline.h>
12776
12777_ACEOF
12778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012782
12783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012784rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012785
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012787/* end confdefs.h. */
12788#include <readline/readline.h>
12789
12790_ACEOF
12791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012795
12796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012797rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012798
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012799fi
12800
Martin v. Löwis0daad592001-09-30 21:09:59 +000012801# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12803$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012804if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012806else
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012808LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812/* Override any GCC internal prototype to avoid an error.
12813 Use char because int might match the return type of a GCC
12814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815#ifdef __cplusplus
12816extern "C"
12817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012818char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ;
12824 return 0;
12825}
12826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012832rm -f core conftest.err conftest.$ac_objext \
12833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012834LIBS=$ac_check_lib_save_LIBS
12835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12837$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012838if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012841
Martin v. Löwis0daad592001-09-30 21:09:59 +000012842fi
12843
Michael W. Hudson54241132001-12-07 15:38:26 +000012844
Thomas Wouters89d996e2007-09-08 17:39:28 +000012845# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12847$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012848if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012850else
12851 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012852LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012854/* end confdefs.h. */
12855
12856/* Override any GCC internal prototype to avoid an error.
12857 Use char because int might match the return type of a GCC
12858 builtin and then its argument prototype would still apply. */
12859#ifdef __cplusplus
12860extern "C"
12861#endif
12862char rl_completion_display_matches_hook ();
12863int
12864main ()
12865{
12866return rl_completion_display_matches_hook ();
12867 ;
12868 return 0;
12869}
12870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012871if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012872 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876rm -f core conftest.err conftest.$ac_objext \
12877 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012878LIBS=$ac_check_lib_save_LIBS
12879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12881$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012882if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012885
12886fi
12887
12888
Martin v. Löwis0daad592001-09-30 21:09:59 +000012889# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12891$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012892if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012894else
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012896LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900/* Override any GCC internal prototype to avoid an error.
12901 Use char because int might match the return type of a GCC
12902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012903#ifdef __cplusplus
12904extern "C"
12905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012906char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012907int
12908main ()
12909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920rm -f core conftest.err conftest.$ac_objext \
12921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012922LIBS=$ac_check_lib_save_LIBS
12923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12925$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012926if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012929
Guido van Rossum353ae582001-07-10 16:45:32 +000012930fi
12931
Jack Jansendd19cf82001-12-06 22:36:17 +000012932
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012933# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935/* end confdefs.h. */
12936#include <readline/readline.h>
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012939 have_readline=yes
12940else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012942
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012944rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012945if test $have_readline = yes
12946then
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012948/* end confdefs.h. */
12949#include <readline/readline.h>
12950
12951_ACEOF
12952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012956
12957fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012958rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012959
12960fi
12961
Martin v. Löwis82bca632006-02-10 20:49:30 +000012962# End of readline checks: restore LIBS
12963LIBS=$LIBS_no_readline
12964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12966$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012967if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012969else
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012972 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012973else
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012975/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012976
12977int main()
12978{
12979 int val1 = nice(1);
12980 if (val1 != -1 && val1 == nice(2))
12981 exit(0);
12982 exit(1);
12983}
12984
Martin v. Löwis11437992002-04-12 09:54:03 +000012985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012987 ac_cv_broken_nice=yes
12988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012993fi
12994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12998$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012999if test "$ac_cv_broken_nice" = yes
13000then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013003
13004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13007$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013008if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013012 ac_cv_broken_poll=no
13013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015/* end confdefs.h. */
13016
13017#include <poll.h>
13018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019int main()
13020{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013022 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013023
13024 close (42);
13025
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013026 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013028 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013029 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013030 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013031 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013032 return 1;
13033}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013034
13035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013037 ac_cv_broken_poll=yes
13038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013045fi
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13048$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013049if test "$ac_cv_broken_poll" = yes
13050then
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013053
13054fi
13055
Brett Cannon43802422005-02-10 20:48:03 +000013056# 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 +000013057# (which is not required by ISO C or UNIX spec) and/or if we support
13058# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013059ac_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 +000013060#include <$ac_cv_struct_tm>
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013063if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013064
13065cat >>confdefs.h <<_ACEOF
13066#define HAVE_STRUCT_TM_TM_ZONE 1
13067_ACEOF
13068
13069
13070fi
13071
13072if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013075
13076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13078"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013079if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081else
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083fi
13084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013086#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087_ACEOF
13088
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13090$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013091if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013095/* end confdefs.h. */
13096#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097#if !HAVE_DECL_TZNAME
13098extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013099#endif
13100
13101int
13102main ()
13103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013104return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013105 ;
13106 return 0;
13107}
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013110 ac_cv_var_tzname=yes
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013114rm -f core conftest.err conftest.$ac_objext \
13115 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13118$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013119 if test $ac_cv_var_tzname = yes; then
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013122
13123 fi
13124fi
13125
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013126
Martin v. Löwis1d459062005-03-14 21:23:33 +000013127# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13129$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013130if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132else
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013135 ac_cv_working_tzset=no
13136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013139
13140#include <stdlib.h>
13141#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013142#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013143
13144#if HAVE_TZNAME
13145extern char *tzname[];
13146#endif
13147
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013148int main()
13149{
Brett Cannon18367812003-09-19 00:59:16 +000013150 /* Note that we need to ensure that not only does tzset(3)
13151 do 'something' with localtime, but it works as documented
13152 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013153 This includes making sure that tzname is set properly if
13154 tm->tm_zone does not exist since it is the alternative way
13155 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013156
13157 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013158 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013159 */
13160
Martin v. Löwis1d459062005-03-14 21:23:33 +000013161 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013162 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13163
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013164 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013166 if (localtime(&groundhogday)->tm_hour != 0)
13167 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013168#if HAVE_TZNAME
13169 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13170 if (strcmp(tzname[0], "UTC") ||
13171 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13172 exit(1);
13173#endif
Brett Cannon18367812003-09-19 00:59:16 +000013174
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013175 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013176 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013177 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013178 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013179#if HAVE_TZNAME
13180 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13181 exit(1);
13182#endif
Brett Cannon18367812003-09-19 00:59:16 +000013183
13184 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13185 tzset();
13186 if (localtime(&groundhogday)->tm_hour != 11)
13187 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013188#if HAVE_TZNAME
13189 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13190 exit(1);
13191#endif
13192
13193#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013194 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13195 exit(1);
13196 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13197 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013198#endif
Brett Cannon18367812003-09-19 00:59:16 +000013199
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013200 exit(0);
13201}
13202
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013205 ac_cv_working_tzset=yes
13206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013211fi
13212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213fi
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13216$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013217if test "$ac_cv_working_tzset" = yes
13218then
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013221
13222fi
13223
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013224# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13226$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013227if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013233int
13234main ()
13235{
13236
13237struct stat st;
13238st.st_mtim.tv_nsec = 1;
13239
13240 ;
13241 return 0;
13242}
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013245 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13250fi
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13253$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013254if test "$ac_cv_stat_tv_nsec" = yes
13255then
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013258
13259fi
13260
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013261# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13263$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013264if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013266else
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013268/* end confdefs.h. */
13269#include <sys/stat.h>
13270int
13271main ()
13272{
13273
13274struct stat st;
13275st.st_mtimespec.tv_nsec = 1;
13276
13277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013282 ac_cv_stat_tv_nsec2=yes
13283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13287fi
13288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13290$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013291if test "$ac_cv_stat_tv_nsec2" = yes
13292then
13293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013295
13296fi
13297
Jack Jansen666b1e72001-10-31 12:11:48 +000013298# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13300$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013301if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013305/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013306#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013307int
13308main ()
13309{
Jack Jansen666b1e72001-10-31 12:11:48 +000013310
13311 int rtn;
13312 rtn = mvwdelch(0,0,0);
13313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ;
13315 return 0;
13316}
13317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013319 ac_cv_mvwdelch_is_expression=yes
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13324fi
13325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13327$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013328
13329if test "$ac_cv_mvwdelch_is_expression" = yes
13330then
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013333
13334fi
13335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13337$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013338if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013343#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013344int
13345main ()
13346{
Jack Jansen666b1e72001-10-31 12:11:48 +000013347
13348 WINDOW *w;
13349 w->_flags = 0;
13350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 ;
13352 return 0;
13353}
13354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013355if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013356 ac_cv_window_has_flags=yes
13357else
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13361fi
13362
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13364$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013365
Jack Jansen666b1e72001-10-31 12:11:48 +000013366
13367if test "$ac_cv_window_has_flags" = yes
13368then
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013371
13372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13375$as_echo_n "checking for is_term_resized... " >&6; }
13376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377/* end confdefs.h. */
13378#include <curses.h>
13379int
13380main ()
13381{
13382void *x=is_term_resized
13383 ;
13384 return 0;
13385}
13386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013390
Matthias Kloseb159a552010-04-25 21:00:44 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13395$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013396
13397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13401$as_echo_n "checking for resize_term... " >&6; }
13402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403/* end confdefs.h. */
13404#include <curses.h>
13405int
13406main ()
13407{
13408void *x=resize_term
13409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013416
Matthias Kloseb159a552010-04-25 21:00:44 +000013417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013418$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13421$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013422
13423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13427$as_echo_n "checking for resizeterm... " >&6; }
13428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429/* end confdefs.h. */
13430#include <curses.h>
13431int
13432main ()
13433{
13434void *x=resizeterm
13435 ;
13436 return 0;
13437}
13438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013442
Matthias Kloseb159a552010-04-25 21:00:44 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13447$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013448
13449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13453$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013454
13455if test -r /dev/ptmx
13456then
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13458$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013461
Thomas Wouters89f507f2006-12-13 04:49:30 +000013462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13464$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013465fi
13466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13468$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013469
13470if test -r /dev/ptc
13471then
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13473$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013476
Thomas Wouters89f507f2006-12-13 04:49:30 +000013477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13479$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013480fi
13481
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013482if test "$have_long_long" = yes
13483then
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13485$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013486 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013490 ac_cv_have_long_long_format=no
13491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013493/* end confdefs.h. */
13494
13495 #include <stdio.h>
13496 #include <stddef.h>
13497 #include <string.h>
13498
13499 #ifdef HAVE_SYS_TYPES_H
13500 #include <sys/types.h>
13501 #endif
13502
13503 int main()
13504 {
13505 char buffer[256];
13506
13507 if (sprintf(buffer, "%lld", (long long)123) < 0)
13508 return 1;
13509 if (strcmp(buffer, "123"))
13510 return 1;
13511
13512 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13513 return 1;
13514 if (strcmp(buffer, "-123"))
13515 return 1;
13516
13517 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13518 return 1;
13519 if (strcmp(buffer, "123"))
13520 return 1;
13521
13522 return 0;
13523 }
13524
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527 ac_cv_have_long_long_format=yes
13528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533fi
13534
13535
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013536fi
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13539$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013540fi
13541
Mark Dickinson89d7d412009-12-31 20:50:59 +000013542if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013543then
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013546
13547fi
13548
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013549if test $ac_sys_system = Darwin
13550then
13551 LIBS="$LIBS -framework CoreFoundation"
13552fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13555$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013556if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013560 ac_cv_have_size_t_format="cross -- assuming yes"
13561
Thomas Wouters477c8d52006-05-27 19:21:47 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013564/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013565
Thomas Wouters477c8d52006-05-27 19:21:47 +000013566#include <stdio.h>
13567#include <stddef.h>
13568#include <string.h>
13569
Christian Heimes2c181612007-12-17 20:04:13 +000013570#ifdef HAVE_SYS_TYPES_H
13571#include <sys/types.h>
13572#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013573
13574#ifdef HAVE_SSIZE_T
13575typedef ssize_t Py_ssize_t;
13576#elif SIZEOF_VOID_P == SIZEOF_LONG
13577typedef long Py_ssize_t;
13578#else
13579typedef int Py_ssize_t;
13580#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013581
Christian Heimes2c181612007-12-17 20:04:13 +000013582int main()
13583{
13584 char buffer[256];
13585
Thomas Wouters477c8d52006-05-27 19:21:47 +000013586 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13587 return 1;
13588
Thomas Wouters89f507f2006-12-13 04:49:30 +000013589 if (strcmp(buffer, "123"))
13590 return 1;
13591
13592 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13593 return 1;
13594
13595 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013596 return 1;
13597
13598 return 0;
13599}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013600
Thomas Wouters477c8d52006-05-27 19:21:47 +000013601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013602if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013603 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013609fi
13610
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13613$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013614if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013617
13618fi
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013621#ifdef HAVE_SYS_TYPES_H
13622#include <sys/types.h>
13623#endif
13624#ifdef HAVE_SYS_SOCKET_H
13625#include <sys/socket.h>
13626#endif
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013629if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013630
Martin v. Löwis11437992002-04-12 09:54:03 +000013631else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013634
13635fi
13636
Michael W. Hudson54241132001-12-07 15:38:26 +000013637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13639$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013640if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013644 ac_cv_broken_mbstowcs=no
13645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013647/* end confdefs.h. */
13648
13649#include<stdlib.h>
13650int main() {
13651 size_t len = -1;
13652 const char *str = "text";
13653 len = mbstowcs(NULL, str, 0);
13654 return (len != 4);
13655}
13656
13657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013658if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013659 ac_cv_broken_mbstowcs=no
13660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013665fi
13666
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013667fi
13668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13670$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013671if test "$ac_cv_broken_mbstowcs" = yes
13672then
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013675
13676fi
13677
Antoine Pitrou042b1282010-08-13 21:15:58 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13679$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013680if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013681 $as_echo_n "(cached) " >&6
13682else
13683 if test "$cross_compiling" = yes; then :
13684 ac_cv_computed_gotos=no
13685else
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h. */
13688
13689int main(int argc, char **argv)
13690{
13691 static void *targets[1] = { &&LABEL1 };
13692 goto LABEL2;
13693LABEL1:
13694 return 0;
13695LABEL2:
13696 goto *targets[0];
13697 return 1;
13698}
13699
13700_ACEOF
13701if ac_fn_c_try_run "$LINENO"; then :
13702 ac_cv_computed_gotos=yes
13703else
13704 ac_cv_computed_gotos=no
13705fi
13706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13707 conftest.$ac_objext conftest.beam conftest.$ac_ext
13708fi
13709
13710fi
13711
13712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13713$as_echo "$ac_cv_computed_gotos" >&6; }
13714if test "$ac_cv_computed_gotos" = yes
13715then
13716
13717$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13718
13719fi
13720
Antoine Pitroub52ec782009-01-25 16:34:23 +000013721# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13723$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013724
13725# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013726if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013727 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013728if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013729then
13730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13734$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013735fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013736if test "$withval" = no
13737then
13738
13739$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13742$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013743fi
13744
Antoine Pitrou042b1282010-08-13 21:15:58 +000013745else
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13747$as_echo "no value specified" >&6; }
13748fi
13749
Antoine Pitroub52ec782009-01-25 16:34:23 +000013750
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013751case $ac_sys_system in
13752AIX*)
13753
13754$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13755 ;;
13756esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Jesus Cea6a792292010-05-03 21:18:48 +000013759case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013760 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 +000013761esac
13762
Gregory P. Smith138fa432010-12-13 08:00:52 +000013763ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013764if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013765
13766$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13767
13768fi
Jesus Cea6a792292010-05-03 21:18:48 +000013769
13770
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013771
13772
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013773for h in `(cd $srcdir;echo Python/thread_*.h)`
13774do
13775 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13776done
13777
Michael W. Hudson54241132001-12-07 15:38:26 +000013778
Neal Norwitzd24499d2005-12-18 21:36:39 +000013779SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13781$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013782for dir in $SRCDIRS; do
13783 if test ! -d $dir; then
13784 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013785 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013786done
Matthias Kloseb9621712010-04-24 17:59:49 +000013787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13788$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013789
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013791ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013792
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013793ac_config_files="$ac_config_files Modules/ld_so_aix"
13794
Martin v. Löwis11437992002-04-12 09:54:03 +000013795cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796# This file is a shell script that caches the results of configure
13797# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013798# scripts and configure runs, see configure's option --config-cache.
13799# It is not useful on other systems. If it contains results you don't
13800# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801#
Martin v. Löwis11437992002-04-12 09:54:03 +000013802# config.status only pays attention to the cache file if you give it
13803# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804#
Skip Montanaro6dead952003-09-25 14:50:04 +000013805# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013806# loading this file, other *unset* `ac_cv_foo' will be assigned the
13807# following values.
13808
13809_ACEOF
13810
Guido van Rossumf78abae1997-01-21 22:02:36 +000013811# The following way of writing the cache mishandles newlines in values,
13812# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013813# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013814# Ultrix sh set writes to stderr and can't be redirected directly,
13815# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816(
13817 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13818 eval ac_val=\$$ac_var
13819 case $ac_val in #(
13820 *${as_nl}*)
13821 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13823$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 esac
13825 case $ac_var in #(
13826 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13828 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829 esac ;;
13830 esac
13831 done
13832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13835 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 # `set' does not quote correctly, so add quotes: double-quote
13837 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013839 "s/'/'\\\\''/g;
13840 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 *)
13843 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846 esac |
13847 sort
13848) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13854 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13856 :end' >>confcache
13857if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13858 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013859 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13861$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013862 if test ! -f "$cache_file" || test -h "$cache_file"; then
13863 cat confcache >"$cache_file"
13864 else
13865 case $cache_file in #(
13866 */* | ?:*)
13867 mv -f confcache "$cache_file"$$ &&
13868 mv -f "$cache_file"$$ "$cache_file" ;; #(
13869 *)
13870 mv -f confcache "$cache_file" ;;
13871 esac
13872 fi
13873 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013874 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13876$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013877 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013879rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881test "x$prefix" = xNONE && prefix=$ac_default_prefix
13882# Let make expand exec_prefix.
13883test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013885DEFS=-DHAVE_CONFIG_H
13886
Skip Montanaro6dead952003-09-25 14:50:04 +000013887ac_libobjs=
13888ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013889U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013890for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13891 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13895 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13897 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013898done
13899LIBOBJS=$ac_libobjs
13900
13901LTLIBOBJS=$ac_ltlibobjs
13902
13903
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013906: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013907ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013908ac_clean_files_save=$ac_clean_files
13909ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13911$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13912as_write_fail=0
13913cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013914#! $SHELL
13915# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013916# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013917# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013918# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013921ac_cs_recheck=false
13922ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924SHELL=\${CONFIG_SHELL-$SHELL}
13925export SHELL
13926_ASEOF
13927cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13928## -------------------- ##
13929## M4sh Initialization. ##
13930## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932# Be more Bourne compatible
13933DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013934if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 emulate sh
13936 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013938 # is contrary to our usage. Disable this feature.
13939 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013941else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 case `(set -o) 2>/dev/null` in #(
13943 *posix*) :
13944 set -o posix ;; #(
13945 *) :
13946 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013948fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013949
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951as_nl='
13952'
13953export as_nl
13954# Printing a long string crashes Solaris 7 /usr/bin/printf.
13955as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13956as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13957as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13958# Prefer a ksh shell builtin over an external printf program on Solaris,
13959# but without wasting forks for bash or zsh.
13960if test -z "$BASH_VERSION$ZSH_VERSION" \
13961 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13962 as_echo='print -r --'
13963 as_echo_n='print -rn --'
13964elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13965 as_echo='printf %s\n'
13966 as_echo_n='printf %s'
13967else
13968 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13969 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13970 as_echo_n='/usr/ucb/echo -n'
13971 else
13972 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13973 as_echo_n_body='eval
13974 arg=$1;
13975 case $arg in #(
13976 *"$as_nl"*)
13977 expr "X$arg" : "X\\(.*\\)$as_nl";
13978 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13979 esac;
13980 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13981 '
13982 export as_echo_n_body
13983 as_echo_n='sh -c $as_echo_n_body as_echo'
13984 fi
13985 export as_echo_body
13986 as_echo='sh -c $as_echo_body as_echo'
13987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989# The user is always right.
13990if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 PATH_SEPARATOR=:
13992 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13993 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13994 PATH_SEPARATOR=';'
13995 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998
13999# IFS
14000# We need space, tab and new line, in precisely that order. Quoting is
14001# there to prevent editors from complaining about space-tab.
14002# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14003# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004IFS=" "" $as_nl"
14005
14006# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014007as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014008case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014009 *[\\/]* ) as_myself=$0 ;;
14010 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014011for as_dir in $PATH
14012do
14013 IFS=$as_save_IFS
14014 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14016 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019 ;;
14020esac
14021# We did not find ourselves, most probably we were run as `sh COMMAND'
14022# in which case we are not to be found in the path.
14023if test "x$as_myself" = x; then
14024 as_myself=$0
14025fi
14026if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14028 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029fi
14030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031# Unset variables that we do not need and which cause bugs (e.g. in
14032# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14033# suppresses any "Segmentation fault" message there. '((' could
14034# trigger a bug in pdksh 5.2.14.
14035for as_var in BASH_ENV ENV MAIL MAILPATH
14036do eval test x\${$as_var+set} = xset \
14037 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014038done
14039PS1='$ '
14040PS2='> '
14041PS4='+ '
14042
14043# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014044LC_ALL=C
14045export LC_ALL
14046LANGUAGE=C
14047export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049# CDPATH.
14050(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14051
14052
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014053# as_fn_error STATUS ERROR [LINENO LOG_FD]
14054# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014055# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14056# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014057# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014058as_fn_error ()
14059{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014060 as_status=$1; test $as_status -eq 0 && as_status=1
14061 if test "$4"; then
14062 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14063 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014065 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 as_fn_exit $as_status
14067} # as_fn_error
14068
14069
14070# as_fn_set_status STATUS
14071# -----------------------
14072# Set $? to STATUS, without forking.
14073as_fn_set_status ()
14074{
14075 return $1
14076} # as_fn_set_status
14077
14078# as_fn_exit STATUS
14079# -----------------
14080# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14081as_fn_exit ()
14082{
14083 set +e
14084 as_fn_set_status $1
14085 exit $1
14086} # as_fn_exit
14087
14088# as_fn_unset VAR
14089# ---------------
14090# Portably unset VAR.
14091as_fn_unset ()
14092{
14093 { eval $1=; unset $1;}
14094}
14095as_unset=as_fn_unset
14096# as_fn_append VAR VALUE
14097# ----------------------
14098# Append the text in VALUE to the end of the definition contained in VAR. Take
14099# advantage of any shell optimizations that allow amortized linear growth over
14100# repeated appends, instead of the typical quadratic growth present in naive
14101# implementations.
14102if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14103 eval 'as_fn_append ()
14104 {
14105 eval $1+=\$2
14106 }'
14107else
14108 as_fn_append ()
14109 {
14110 eval $1=\$$1\$2
14111 }
14112fi # as_fn_append
14113
14114# as_fn_arith ARG...
14115# ------------------
14116# Perform arithmetic evaluation on the ARGs, and store the result in the
14117# global $as_val. Take advantage of shells that can avoid forks. The arguments
14118# must be portable across $(()) and expr.
14119if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14120 eval 'as_fn_arith ()
14121 {
14122 as_val=$(( $* ))
14123 }'
14124else
14125 as_fn_arith ()
14126 {
14127 as_val=`expr "$@" || test $? -eq 1`
14128 }
14129fi # as_fn_arith
14130
14131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132if expr a : '\(a\)' >/dev/null 2>&1 &&
14133 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14134 as_expr=expr
14135else
14136 as_expr=false
14137fi
14138
14139if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14140 as_basename=basename
14141else
14142 as_basename=false
14143fi
14144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14146 as_dirname=dirname
14147else
14148 as_dirname=false
14149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151as_me=`$as_basename -- "$0" ||
14152$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14153 X"$0" : 'X\(//\)$' \| \
14154 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014155$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 sed '/^.*\/\([^/][^/]*\)\/*$/{
14157 s//\1/
14158 q
14159 }
14160 /^X\/\(\/\/\)$/{
14161 s//\1/
14162 q
14163 }
14164 /^X\/\(\/\).*/{
14165 s//\1/
14166 q
14167 }
14168 s/.*/./; q'`
14169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170# Avoid depending upon Character Ranges.
14171as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14172as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14173as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14174as_cr_digits='0123456789'
14175as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176
14177ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014178case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 xy) ECHO_C='\c';;
14183 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14184 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185 esac;;
14186*)
14187 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014189
Martin v. Löwis11437992002-04-12 09:54:03 +000014190rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191if test -d conf$$.dir; then
14192 rm -f conf$$.dir/conf$$.file
14193else
14194 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if (echo >conf$$.file) 2>/dev/null; then
14198 if ln -s conf$$.file conf$$ 2>/dev/null; then
14199 as_ln_s='ln -s'
14200 # ... but there are two gotchas:
14201 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14202 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14203 # In both cases, we have to default to `cp -p'.
14204 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14205 as_ln_s='cp -p'
14206 elif ln conf$$.file conf$$ 2>/dev/null; then
14207 as_ln_s=ln
14208 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014211else
14212 as_ln_s='cp -p'
14213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14215rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217
14218# as_fn_mkdir_p
14219# -------------
14220# Create "$as_dir" as a directory, including parents if necessary.
14221as_fn_mkdir_p ()
14222{
14223
14224 case $as_dir in #(
14225 -*) as_dir=./$as_dir;;
14226 esac
14227 test -d "$as_dir" || eval $as_mkdir_p || {
14228 as_dirs=
14229 while :; do
14230 case $as_dir in #(
14231 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14232 *) as_qdir=$as_dir;;
14233 esac
14234 as_dirs="'$as_qdir' $as_dirs"
14235 as_dir=`$as_dirname -- "$as_dir" ||
14236$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14237 X"$as_dir" : 'X\(//\)[^/]' \| \
14238 X"$as_dir" : 'X\(//\)$' \| \
14239 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14240$as_echo X"$as_dir" |
14241 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14242 s//\1/
14243 q
14244 }
14245 /^X\(\/\/\)[^/].*/{
14246 s//\1/
14247 q
14248 }
14249 /^X\(\/\/\)$/{
14250 s//\1/
14251 q
14252 }
14253 /^X\(\/\).*/{
14254 s//\1/
14255 q
14256 }
14257 s/.*/./; q'`
14258 test -d "$as_dir" && break
14259 done
14260 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014261 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014262
14263
14264} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014265if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014267else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014268 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014269 as_mkdir_p=false
14270fi
14271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272if test -x / >/dev/null 2>&1; then
14273 as_test_x='test -x'
14274else
14275 if ls -dL / >/dev/null 2>&1; then
14276 as_ls_L_option=L
14277 else
14278 as_ls_L_option=
14279 fi
14280 as_test_x='
14281 eval sh -c '\''
14282 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 case $1 in #(
14286 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289 ???[sx]*):;;*)false;;esac;fi
14290 '\'' sh
14291 '
14292fi
14293as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014296as_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 +000014297
14298# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014299as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
14301
Martin v. Löwis11437992002-04-12 09:54:03 +000014302exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014303## ----------------------------------- ##
14304## Main body of $CONFIG_STATUS script. ##
14305## ----------------------------------- ##
14306_ASEOF
14307test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14310# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014311# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312# values after options handling.
14313ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014314This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014315generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
14317 CONFIG_FILES = $CONFIG_FILES
14318 CONFIG_HEADERS = $CONFIG_HEADERS
14319 CONFIG_LINKS = $CONFIG_LINKS
14320 CONFIG_COMMANDS = $CONFIG_COMMANDS
14321 $ $0 $@
14322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323on `(hostname || uname -n) 2>/dev/null | sed 1q`
14324"
14325
Martin v. Löwis11437992002-04-12 09:54:03 +000014326_ACEOF
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328case $ac_config_files in *"
14329"*) set x $ac_config_files; shift; ac_config_files=$*;;
14330esac
14331
14332case $ac_config_headers in *"
14333"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14334esac
14335
14336
14337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014338# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014339config_files="$ac_config_files"
14340config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014345ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014346\`$as_me' instantiates files and other configuration actions
14347from templates according to the current configuration. Unless the files
14348and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014351
14352 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 --config print configuration, then exit
14355 -q, --quiet, --silent
14356 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 -d, --debug don't remove temporary files
14358 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 --file=FILE[:TEMPLATE]
14360 instantiate the configuration file FILE
14361 --header=FILE[:TEMPLATE]
14362 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014363
14364Configuration files:
14365$config_files
14366
14367Configuration headers:
14368$config_headers
14369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14374ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014375ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014376python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014377configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014380Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014381This config.status script is free software; the Free Software Foundation
14382gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383
14384ac_pwd='$ac_pwd'
14385srcdir='$srcdir'
14386INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014387test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
14389
Matthias Kloseb9621712010-04-24 17:59:49 +000014390cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14391# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014392ac_need_defaults=:
14393while test $# != 0
14394do
14395 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014396 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14398 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014399 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014401 --*=)
14402 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14403 ac_optarg=
14404 ac_shift=:
14405 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 ac_option=$1
14408 ac_optarg=$2
14409 ac_shift=shift
14410 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 esac
14412
Skip Montanaro6dead952003-09-25 14:50:04 +000014413 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014415 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14416 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo "$ac_cs_version"; exit ;;
14419 --config | --confi | --conf | --con | --co | --c )
14420 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 debug=: ;;
14423 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014424 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 case $ac_optarg in
14426 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014427 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 esac
14429 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 ac_need_defaults=false;;
14431 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014432 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 case $ac_optarg in
14434 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14435 esac
14436 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438 --he | --h)
14439 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014440 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014441Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014444 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14445 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14446 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
14448 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014449 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014450Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
14455 esac
14456 shift
14457done
14458
Skip Montanaro6dead952003-09-25 14:50:04 +000014459ac_configure_extra_args=
14460
14461if $ac_cs_silent; then
14462 exec 6>/dev/null
14463 ac_configure_extra_args="$ac_configure_extra_args --silent"
14464fi
14465
14466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014468if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14470 shift
14471 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14472 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014475fi
14476
Martin v. Löwis11437992002-04-12 09:54:03 +000014477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479exec 5>>config.log
14480{
14481 echo
14482 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14483## Running $as_me. ##
14484_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493
14494# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014495for ac_config_target in $ac_config_targets
14496do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497 case $ac_config_target in
14498 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14499 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14500 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014501 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14502 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14504 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014505 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014506 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014508 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 esac
14510done
14511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513# If the user did not use the arguments to specify the items to instantiate,
14514# then the envvar interface is used. Set only those that are not.
14515# We use the long form for the default assignment because of an extremely
14516# bizarre bug on SunOS 4.1.3.
14517if $ac_need_defaults; then
14518 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14519 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14520fi
14521
Skip Montanaro6dead952003-09-25 14:50:04 +000014522# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014524# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525# Hook for its removal unless debugging.
14526# Note that there is a small window in which the directory will not be cleaned:
14527# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014528$debug ||
14529{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014530 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014532 : "${ac_tmp:=$tmp}"
14533 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014536}
Martin v. Löwis11437992002-04-12 09:54:03 +000014537# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014541 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014542} ||
14543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544 tmp=./conf$$-$RANDOM
14545 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014546} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14547ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549# Set up the scripts for CONFIG_FILES section.
14550# No need to generate them if there are no CONFIG_FILES.
14551# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554
14555ac_cr=`echo X | tr X '\015'`
14556# On cygwin, bash can eat \r inside `` if the user requested igncr.
14557# But we know of no other shell where ac_cr would be empty at this
14558# point, so we can use a bashism as a fallback.
14559if test "x$ac_cr" = x; then
14560 eval ac_cr=\$\'\\r\'
14561fi
14562ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14563if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014564 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014565else
14566 ac_cs_awk_cr=$ac_cr
14567fi
14568
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014569echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014570_ACEOF
14571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{
14574 echo "cat >conf$$subs.awk <<_ACEOF" &&
14575 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14576 echo "_ACEOF"
14577} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014578 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14579ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580ac_delim='%!_!# '
14581for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014583 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14586 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 break
14588 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014589 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 else
14591 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593done
Matthias Kloseb9621712010-04-24 17:59:49 +000014594rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014597cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599sed -n '
14600h
14601s/^/S["/; s/!.*/"]=/
14602p
14603g
14604s/^[^!]*!//
14605:repl
14606t repl
14607s/'"$ac_delim"'$//
14608t delim
14609:nl
14610h
14611s/\(.\{148\}\)..*/\1/
14612t more1
14613s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14614p
14615n
14616b repl
14617:more1
14618s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14619p
14620g
14621s/.\{148\}//
14622t nl
14623:delim
14624h
14625s/\(.\{148\}\)..*/\1/
14626t more2
14627s/["\\]/\\&/g; s/^/"/; s/$/"/
14628p
14629b
14630:more2
14631s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14632p
14633g
14634s/.\{148\}//
14635t delim
14636' <conf$$subs.awk | sed '
14637/^[^""]/{
14638 N
14639 s/\n//
14640}
14641' >>$CONFIG_STATUS || ac_write_fail=1
14642rm -f conf$$subs.awk
14643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14644_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014645cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 for (key in S) S_is_set[key] = 1
14647 FS = ""
14648
14649}
14650{
14651 line = $ 0
14652 nfields = split(line, field, "@")
14653 substed = 0
14654 len = length(field[1])
14655 for (i = 2; i < nfields; i++) {
14656 key = field[i]
14657 keylen = length(key)
14658 if (S_is_set[key]) {
14659 value = S[key]
14660 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14661 len += length(value) + length(field[++i])
14662 substed = 1
14663 } else
14664 len += 1 + keylen
14665 }
14666
14667 print line
14668}
14669
14670_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14673if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14674 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14675else
14676 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014677fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14678 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014679_ACEOF
14680
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014681# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14682# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683# trailing colons and then remove the whole line if VPATH becomes empty
14684# (actually we leave an empty line to preserve line numbers).
14685if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014686 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14687h
14688s///
14689s/^/:/
14690s/[ ]*$/:/
14691s/:\$(srcdir):/:/g
14692s/:\${srcdir}:/:/g
14693s/:@srcdir@:/:/g
14694s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014696x
14697s/\(=[ ]*\).*/\1/
14698G
14699s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700s/^[^=]*=[ ]*$//
14701}'
14702fi
14703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014705fi # test -n "$CONFIG_FILES"
14706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707# Set up the scripts for CONFIG_HEADERS section.
14708# No need to generate them if there are no CONFIG_HEADERS.
14709# This happens for instance with `./config.status Makefile'.
14710if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014711cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014712BEGIN {
14713_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715# Transform confdefs.h into an awk script `defines.awk', embedded as
14716# here-document in config.status, that substitutes the proper values into
14717# config.h.in to produce config.h.
14718
14719# Create a delimiter string that does not exist in confdefs.h, to ease
14720# handling of long lines.
14721ac_delim='%!_!# '
14722for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014723 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14724 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 break
14726 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014727 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 else
14729 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14730 fi
14731done
14732
14733# For the awk script, D is an array of macro values keyed by name,
14734# likewise P contains macro parameters if any. Preserve backslash
14735# newline sequences.
14736
14737ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14738sed -n '
14739s/.\{148\}/&'"$ac_delim"'/g
14740t rset
14741:rset
14742s/^[ ]*#[ ]*define[ ][ ]*/ /
14743t def
14744d
14745:def
14746s/\\$//
14747t bsnl
14748s/["\\]/\\&/g
14749s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14750D["\1"]=" \3"/p
14751s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14752d
14753:bsnl
14754s/["\\]/\\&/g
14755s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14756D["\1"]=" \3\\\\\\n"\\/p
14757t cont
14758s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14759t cont
14760d
14761:cont
14762n
14763s/.\{148\}/&'"$ac_delim"'/g
14764t clear
14765:clear
14766s/\\$//
14767t bsnlc
14768s/["\\]/\\&/g; s/^/"/; s/$/"/p
14769d
14770:bsnlc
14771s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14772b cont
14773' <confdefs.h | sed '
14774s/'"$ac_delim"'/"\\\
14775"/g' >>$CONFIG_STATUS || ac_write_fail=1
14776
14777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14778 for (key in D) D_is_set[key] = 1
14779 FS = ""
14780}
14781/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14782 line = \$ 0
14783 split(line, arg, " ")
14784 if (arg[1] == "#") {
14785 defundef = arg[2]
14786 mac1 = arg[3]
14787 } else {
14788 defundef = substr(arg[1], 2)
14789 mac1 = arg[2]
14790 }
14791 split(mac1, mac2, "(") #)
14792 macro = mac2[1]
14793 prefix = substr(line, 1, index(line, defundef) - 1)
14794 if (D_is_set[macro]) {
14795 # Preserve the white space surrounding the "#".
14796 print prefix "define", macro P[macro] D[macro]
14797 next
14798 } else {
14799 # Replace #undef with comments. This is necessary, for example,
14800 # in the case of _POSIX_SOURCE, which is predefined and required
14801 # on some systems where configure will not decide to define it.
14802 if (defundef == "undef") {
14803 print "/*", prefix defundef, macro, "*/"
14804 next
14805 }
14806 }
14807}
14808{ print }
14809_ACAWK
14810_ACEOF
14811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014812 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014813fi # test -n "$CONFIG_HEADERS"
14814
14815
14816eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14817shift
14818for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819do
14820 case $ac_tag in
14821 :[FHLC]) ac_mode=$ac_tag; continue;;
14822 esac
14823 case $ac_mode$ac_tag in
14824 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014825 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 :[FH]-) ac_tag=-:-;;
14827 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14828 esac
14829 ac_save_IFS=$IFS
14830 IFS=:
14831 set x $ac_tag
14832 IFS=$ac_save_IFS
14833 shift
14834 ac_file=$1
14835 shift
14836
14837 case $ac_mode in
14838 :L) ac_source=$1;;
14839 :[FH])
14840 ac_file_inputs=
14841 for ac_f
14842 do
14843 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014844 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845 *) # Look for the file first in the build tree, then in the source tree
14846 # (if the path is not absolute). The absolute path cannot be DOS-style,
14847 # because $ac_f cannot contain `:'.
14848 test -f "$ac_f" ||
14849 case $ac_f in
14850 [\\/$]*) false;;
14851 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14852 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014853 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14856 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 done
14858
14859 # Let's still pretend it is `configure' which instantiates (i.e., don't
14860 # use $as_me), people would be surprised to read:
14861 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 configure_input='Generated from '`
14863 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14864 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014865 if test x"$ac_file" != x-; then
14866 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14868$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 # Neutralize special characters interpreted by sed in replacement strings.
14871 case $configure_input in #(
14872 *\&* | *\|* | *\\* )
14873 ac_sed_conf_input=`$as_echo "$configure_input" |
14874 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14875 *) ac_sed_conf_input=$configure_input;;
14876 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014877
14878 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014879 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14880 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 esac
14882 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 esac
14884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014886$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014887 X"$ac_file" : 'X\(//\)[^/]' \| \
14888 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014890$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14892 s//\1/
14893 q
14894 }
14895 /^X\(\/\/\)[^/].*/{
14896 s//\1/
14897 q
14898 }
14899 /^X\(\/\/\)$/{
14900 s//\1/
14901 q
14902 }
14903 /^X\(\/\).*/{
14904 s//\1/
14905 q
14906 }
14907 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ac_builddir=.
14910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911case "$ac_dir" in
14912.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14913*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 case $ac_top_builddir_sub in
14918 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14919 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14920 esac ;;
14921esac
14922ac_abs_top_builddir=$ac_pwd
14923ac_abs_builddir=$ac_pwd$ac_dir_suffix
14924# for backward compatibility:
14925ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014926
14927case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014929 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 ac_top_srcdir=$ac_top_builddir_sub
14931 ac_abs_top_srcdir=$ac_pwd ;;
14932 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 ac_top_srcdir=$srcdir
14935 ac_abs_top_srcdir=$srcdir ;;
14936 *) # Relative name.
14937 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14938 ac_top_srcdir=$ac_top_build_prefix$srcdir
14939 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014940esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 case $ac_mode in
14945 :F)
14946 #
14947 # CONFIG_FILE
14948 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
14950 case $INSTALL in
14951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014954_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955
Matthias Kloseb9621712010-04-24 17:59:49 +000014956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957# If the template does not know about datarootdir, expand it.
14958# FIXME: This hack should be removed a few years after 2.60.
14959ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014960ac_sed_dataroot='
14961/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962 p
14963 q
14964}
14965/@datadir@/p
14966/@docdir@/p
14967/@infodir@/p
14968/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014969/@mandir@/p'
14970case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971*datarootdir*) ac_datarootdir_seen=yes;;
14972*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14974$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 ac_datarootdir_hack='
14978 s&@datadir@&$datadir&g
14979 s&@docdir@&$docdir&g
14980 s&@infodir@&$infodir&g
14981 s&@localedir@&$localedir&g
14982 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984esac
14985_ACEOF
14986
14987# Neutralize VPATH when `$srcdir' = `.'.
14988# Shell code in configure.ac might set extrasub.
14989# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14991ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014992$extrasub
14993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014995:t
14996/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014997s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014999s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000s&@srcdir@&$ac_srcdir&;t t
15001s&@abs_srcdir@&$ac_abs_srcdir&;t t
15002s&@top_srcdir@&$ac_top_srcdir&;t t
15003s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15004s&@builddir@&$ac_builddir&;t t
15005s&@abs_builddir@&$ac_abs_builddir&;t t
15006s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15007s&@INSTALL@&$ac_INSTALL&;t t
15008$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015009"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015010eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15011 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015014 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15015 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15016 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 { $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 +000015018which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015020which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015021
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015022 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015024 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15025 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015027 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 ;;
15029 :H)
15030 #
15031 # CONFIG_HEADER
15032 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 {
15035 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015036 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15037 } >"$ac_tmp/config.h" \
15038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15039 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15041$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015044 mv "$ac_tmp/config.h" "$ac_file" \
15045 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 fi
15047 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015049 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15050 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054
15055 esac
15056
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015057
15058 case $ac_file$ac_mode in
15059 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15060
15061 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062done # for ac_tag
15063
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015067ac_clean_files=$ac_clean_files_save
15068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015070 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073# configure is writing to config.log, and then calls config.status.
15074# config.status does its own redirection, appending to config.log.
15075# Unfortunately, on DOS this fails, as config.log is still kept open
15076# by configure, so config.status won't be able to write to it; its
15077# output is simply discarded. So we exec the FD to /dev/null,
15078# effectively closing config.log, so it can be properly (re)opened and
15079# appended to by config.status. When coming back to configure, we
15080# need to make the FD available again.
15081if test "$no_create" != yes; then
15082 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015083 ac_config_status_args=
15084 test "$silent" = yes &&
15085 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015087 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 exec 5>>config.log
15089 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15090 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015091 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015092fi
15093if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15095$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015096fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015097
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015098
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015099echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015100if test ! -f Modules/Setup
15101then
15102 cp $srcdir/Modules/Setup.dist Modules/Setup
15103fi
15104
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015105echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015106if test ! -f Modules/Setup.local
15107then
15108 echo "# Edit this file for local setup changes" >Modules/Setup.local
15109fi
15110
15111echo "creating Makefile"
15112$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15113 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015114 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015115mv config.c Modules