blob: 5c41087fbf2711c861f155737339e2d7245ddcd4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandlfe09a542011-03-06 10:26:32 +01004# 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
Georg Brandl1ca2e792011-03-05 20:51:24 +0100647HAS_HG
648HGBRANCH
649HGTAG
650HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
652AR
653RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000654USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000655GNULD
656LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000657LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000658RUNSHARED
659INSTSONAME
660LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000661PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000662BLDLIBRARY
663DLLLIBRARY
664LDLIBRARY
665LIBRARY
666BUILDEXEEXT
667EGREP
668GREP
669CPP
670MAINCC
671CXX
672OBJEXT
673EXEEXT
674ac_ct_CC
675CPPFLAGS
676LDFLAGS
677CFLAGS
678CC
679EXPORT_MACOSX_DEPLOYMENT_TARGET
680CONFIGURE_MACOSX_DEPLOYMENT_TARGET
681SGI_ABI
682MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000683FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000684FRAMEWORKUNIXTOOLSPREFIX
685FRAMEWORKALTINSTALLLAST
686FRAMEWORKALTINSTALLFIRST
687FRAMEWORKINSTALLLAST
688FRAMEWORKINSTALLFIRST
689PYTHONFRAMEWORKINSTALLDIR
690PYTHONFRAMEWORKPREFIX
691PYTHONFRAMEWORKDIR
692PYTHONFRAMEWORKIDENTIFIER
693PYTHONFRAMEWORK
694LIPO_32BIT_FLAGS
695ARCH_RUN_32BIT
696UNIVERSALSDK
697CONFIG_ARGS
698SOVERSION
699VERSION
700target_alias
701host_alias
702build_alias
703LIBS
704ECHO_T
705ECHO_N
706ECHO_C
707DEFS
708mandir
709localedir
710libdir
711psdir
712pdfdir
713dvidir
714htmldir
715infodir
716docdir
717oldincludedir
718includedir
719localstatedir
720sharedstatedir
721sysconfdir
722datadir
723datarootdir
724libexecdir
725sbindir
726bindir
727program_transform_name
728prefix
729exec_prefix
730PACKAGE_URL
731PACKAGE_BUGREPORT
732PACKAGE_STRING
733PACKAGE_VERSION
734PACKAGE_TARNAME
735PACKAGE_NAME
736PATH_SEPARATOR
737SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000739ac_user_opts='
740enable_option_checking
741enable_universalsdk
742with_universal_archs
743with_framework_name
744enable_framework
745with_gcc
746with_cxx_main
747with_suffix
748enable_shared
749enable_profiling
750with_pydebug
751with_libs
752with_system_expat
753with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000754enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000755with_dbmliborder
756with_signal_module
757with_dec_threads
758with_threads
759with_thread
760enable_ipv6
761with_doc_strings
762with_tsc
763with_pymalloc
764with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000765with_fpectl
766with_libm
767with_libc
768enable_big_digits
769with_wide_unicode
770with_computed_gotos
771'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000780CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784ac_init_help=
785ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_unrecognized_opts=
787ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# The variables have the same names as the options, with
789# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802x_includes=NONE
803x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819includedir='${prefix}/include'
820oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 ac_prev=
839 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858
859 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000890 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
912 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
948 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 no_create=yes ;;
1007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001120 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 export $ac_envvar ;;
1179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001185 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
1188 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189done
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001193 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194fi
1195
Matthias Kloseb9621712010-04-24 17:59:49 +00001196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001223done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
1227# FIXME: To remove some day.
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# FIXME: To remove some day.
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
1242
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246test "$silent" = yes && exec 6>/dev/null
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001252 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001254 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 srcdir=..
1287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001323\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001337 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
1377
1378 cat <<\_ACEOF
1379_ACEOF
1380fi
1381
1382if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001383 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001384 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 cat <<\_ACEOF
1387
1388Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1391 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001392 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001393 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-framework[=INSTALLDIR]
1395 Build (MacOSX|Darwin) framework
1396 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001397 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001398 --enable-loadable-sqlite-extensions
1399 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --enable-ipv6 Enable ipv6 (with ipv4) support
1401 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001402 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Optional Packages:
1406 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1407 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001408 --with-universal-archs=ARCH
1409 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001410 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001411 --with-framework-name=FRAMEWORK
1412 specify an alternate name of the framework built
1413 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-cxx-main=<compiler>
1416 compile main() and link python executable with C++
1417 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-suffix=.exe set executable suffix
1419 --with-pydebug build with Py_DEBUG defined
1420 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001421 --with-system-expat build pyexpat module using an installed expat
1422 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001423 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001424 --with-dbmliborder=db1:db2:...
1425 order to check db backends for dbm. Valid value is a
1426 colon separated string with the backend names
1427 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with-signal-module disable/enable signal module
1429 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001441 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001442 --with(out)-computed-gotos
1443 Use computed gotos in evaluation loop (enabled by
1444 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandle2e15612009-05-20 18:25:10 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001522python configure 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
1574# ac_fn_c_try_cpp LINENO
1575# ----------------------
1576# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_cpp ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 if { { ac_try="$ac_cpp conftest.$ac_ext"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1588 ac_status=$?
1589 if test -s conftest.err; then
1590 grep -v '^ *+' conftest.err >conftest.er1
1591 cat conftest.er1 >&5
1592 mv -f conftest.er1 conftest.err
1593 fi
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001595 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1597 test ! -s conftest.err
1598 }; then :
1599 ac_retval=0
1600else
1601 $as_echo "$as_me: failed program was:" >&5
1602sed 's/^/| /' conftest.$ac_ext >&5
1603
1604 ac_retval=1
1605fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001606 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 as_fn_set_status $ac_retval
1608
1609} # ac_fn_c_try_cpp
1610
1611# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1612# -------------------------------------------------------
1613# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1614# the include files in INCLUDES and setting the cache variable VAR
1615# accordingly.
1616ac_fn_c_check_header_mongrel ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001619 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1621$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001622if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 $as_echo_n "(cached) " >&6
1624fi
1625eval ac_res=\$$3
1626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1627$as_echo "$ac_res" >&6; }
1628else
1629 # Is the header compilable?
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1631$as_echo_n "checking $2 usability... " >&6; }
1632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1633/* end confdefs.h. */
1634$4
1635#include <$2>
1636_ACEOF
1637if ac_fn_c_try_compile "$LINENO"; then :
1638 ac_header_compiler=yes
1639else
1640 ac_header_compiler=no
1641fi
1642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1644$as_echo "$ac_header_compiler" >&6; }
1645
1646# Is the header present?
1647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1648$as_echo_n "checking $2 presence... " >&6; }
1649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1650/* end confdefs.h. */
1651#include <$2>
1652_ACEOF
1653if ac_fn_c_try_cpp "$LINENO"; then :
1654 ac_header_preproc=yes
1655else
1656 ac_header_preproc=no
1657fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001658rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1660$as_echo "$ac_header_preproc" >&6; }
1661
1662# So? What about this header?
1663case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1664 yes:no: )
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1666$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1669 ;;
1670 no:yes:* )
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1672$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1674$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1676$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1678$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1680$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001681( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001682## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001683## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 ) | sed "s/^/$as_me: WARNING: /" >&2
1685 ;;
1686esac
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001689if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 $as_echo_n "(cached) " >&6
1691else
1692 eval "$3=\$ac_header_compiler"
1693fi
1694eval ac_res=\$$3
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1696$as_echo "$ac_res" >&6; }
1697fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001698 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001699
1700} # ac_fn_c_check_header_mongrel
1701
1702# ac_fn_c_try_run LINENO
1703# ----------------------
1704# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1705# that executables *can* be run.
1706ac_fn_c_try_run ()
1707{
1708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1709 if { { ac_try="$ac_link"
1710case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_link") 2>&5
1717 ac_status=$?
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1720 { { case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_try") 2>&5
1727 ac_status=$?
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; }; }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: program exited with status $ac_status" >&5
1733 $as_echo "$as_me: failed program was:" >&5
1734sed 's/^/| /' conftest.$ac_ext >&5
1735
1736 ac_retval=$ac_status
1737fi
1738 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 as_fn_set_status $ac_retval
1741
1742} # ac_fn_c_try_run
1743
1744# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1745# -------------------------------------------------------
1746# Tests whether HEADER exists and can be compiled using the include files in
1747# INCLUDES, setting the cache variable VAR accordingly.
1748ac_fn_c_check_header_compile ()
1749{
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001753if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 $as_echo_n "(cached) " >&6
1755else
1756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 eval "$3=yes"
1763else
1764 eval "$3=no"
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767fi
1768eval ac_res=\$$3
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1770$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001772
1773} # ac_fn_c_check_header_compile
1774
1775# ac_fn_c_try_link LINENO
1776# -----------------------
1777# Try to link conftest.$ac_ext, and return whether this succeeded.
1778ac_fn_c_try_link ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1781 rm -f conftest.$ac_objext conftest$ac_exeext
1782 if { { ac_try="$ac_link"
1783case "(($ac_try" in
1784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1785 *) ac_try_echo=$ac_try;;
1786esac
1787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1788$as_echo "$ac_try_echo"; } >&5
1789 (eval "$ac_link") 2>conftest.err
1790 ac_status=$?
1791 if test -s conftest.err; then
1792 grep -v '^ *+' conftest.err >conftest.er1
1793 cat conftest.er1 >&5
1794 mv -f conftest.er1 conftest.err
1795 fi
1796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1797 test $ac_status = 0; } && {
1798 test -z "$ac_c_werror_flag" ||
1799 test ! -s conftest.err
1800 } && test -s conftest$ac_exeext && {
1801 test "$cross_compiling" = yes ||
1802 $as_test_x conftest$ac_exeext
1803 }; then :
1804 ac_retval=0
1805else
1806 $as_echo "$as_me: failed program was:" >&5
1807sed 's/^/| /' conftest.$ac_ext >&5
1808
1809 ac_retval=1
1810fi
1811 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1812 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1813 # interfere with the next link command; also delete a directory that is
1814 # left behind by Apple's compiler. We do this before executing the actions.
1815 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001817 as_fn_set_status $ac_retval
1818
1819} # ac_fn_c_try_link
1820
1821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001884if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001963 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001964int
1965main ()
1966{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002188if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002256if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002301
2302} # ac_fn_c_check_member
2303
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2315if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002347
2348} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002353It was created by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002390 $as_echo "PATH: $as_dir"
2391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Kloseb9621712010-04-24 17:59:49 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002515 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Kloseb9621712010-04-24 17:59:49 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Kloseb9621712010-04-24 17:59:49 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597else
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602do
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
2612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002703
2704
Martin v. Löwis11437992002-04-12 09:54:03 +00002705
Benjamin Petersond23f8222009-04-05 19:13:16 +00002706if test "$prefix" != "/"; then
2707 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2708fi
2709
2710
Martin v. Löwis11437992002-04-12 09:54:03 +00002711
2712
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002713# We don't use PACKAGE_ variables, and they cause conflicts
2714# with other autoconf-based packages that include Python.h
2715grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2716rm confdefs.h
2717mv confdefs.h.new confdefs.h
2718
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002719
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002720VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002721
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002722# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002723
2724SOVERSION=1.0
2725
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002726# The later defininition of _XOPEN_SOURCE disables certain features
2727# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2728
Matthias Kloseb9621712010-04-24 17:59:49 +00002729$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002730
2731
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002732# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2733# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2734# them.
2735
Matthias Kloseb9621712010-04-24 17:59:49 +00002736$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002737
2738
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002739# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2740# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2741# them.
2742
Matthias Kloseb9621712010-04-24 17:59:49 +00002743$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002744
2745
Martin v. Löwisd6320502004-08-12 13:45:08 +00002746# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2747# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2748
Matthias Kloseb9621712010-04-24 17:59:49 +00002749$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002750
2751
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002752# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2753# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2754# them.
2755
Matthias Kloseb9621712010-04-24 17:59:49 +00002756$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002757
2758
2759
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002760define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002761
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002762# Arguments passed to configure.
2763
2764CONFIG_ARGS="$ac_configure_args"
2765
Matthias Kloseb9621712010-04-24 17:59:49 +00002766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2767$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002769if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771 case $enableval in
2772 yes)
2773 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774 if test ! -d "${enableval}"
2775 then
2776 enableval=/
2777 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002778 ;;
2779 esac
2780 case $enableval in
2781 no)
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784 ;;
2785 *)
2786 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787 if test ! -d "${UNIVERSALSDK}"
2788 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002789 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002791 ;;
2792 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002793
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795else
2796
2797 UNIVERSALSDK=
2798 enable_universalsdk=
2799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002801
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002802if test -n "${UNIVERSALSDK}"
2803then
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2805$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806else
Matthias Kloseb9621712010-04-24 17:59:49 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002809fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002811
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002812
2813
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002815
Matthias Kloseb9621712010-04-24 17:59:49 +00002816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2817$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818
2819# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002820if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2823$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002824 UNIVERSAL_ARCHS="$withval"
2825
2826else
2827
Matthias Kloseb9621712010-04-24 17:59:49 +00002828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2829$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002830
2831fi
2832
2833
2834
2835
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002836
2837# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002838if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002839 withval=$with_framework_name;
2840 PYTHONFRAMEWORK=${withval}
2841 PYTHONFRAMEWORKDIR=${withval}.framework
2842 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2843
2844else
2845
2846 PYTHONFRAMEWORK=Python
2847 PYTHONFRAMEWORKDIR=Python.framework
2848 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2849
2850fi
2851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002852# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002853if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002854 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002855 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002857 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 esac
2859 case $enableval in
2860 no)
2861 PYTHONFRAMEWORK=
2862 PYTHONFRAMEWORKDIR=no-framework
2863 PYTHONFRAMEWORKPREFIX=
2864 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002865 FRAMEWORKINSTALLFIRST=
2866 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002867 FRAMEWORKALTINSTALLFIRST=
2868 FRAMEWORKALTINSTALLLAST=
2869 if test "x${prefix}" = "xNONE"; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2871 else
2872 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002874 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002875 ;;
2876 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002877 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002879 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002880 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002881 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2882 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002883 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002884
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002885 if test "x${prefix}" = "xNONE" ; then
2886 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002887
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002888 else
2889 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2890 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002891
2892 case "${enableval}" in
2893 /System*)
2894 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2895 if test "${prefix}" = "NONE" ; then
2896 # See below
2897 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2898 fi
2899 ;;
2900
2901 /Library*)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 ;;
2904
2905 */Library/Frameworks)
2906 MDIR="`dirname "${enableval}"`"
2907 MDIR="`dirname "${MDIR}"`"
2908 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2909
2910 if test "${prefix}" = "NONE"; then
2911 # User hasn't specified the
2912 # --prefix option, but wants to install
2913 # the framework in a non-default location,
2914 # ensure that the compatibility links get
2915 # installed relative to that prefix as well
2916 # instead of in /usr/local.
2917 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2918 fi
2919 ;;
2920
2921 *)
2922 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2923 ;;
2924 esac
2925
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002927
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002928 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002932 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002934 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2935
2936 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2937
Jack Jansene578a632001-08-15 01:27:14 +00002938 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Guido van Rossum563e7081996-09-10 18:20:48 +00002940else
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Jack Jansene578a632001-08-15 01:27:14 +00002942 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002943 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002944 PYTHONFRAMEWORKPREFIX=
2945 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002946 FRAMEWORKINSTALLFIRST=
2947 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002948 FRAMEWORKALTINSTALLFIRST=
2949 FRAMEWORKALTINSTALLLAST=
2950 if test "x${prefix}" = "xNONE" ; then
2951 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2952 else
2953 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2954 fi
Jack Jansene578a632001-08-15 01:27:14 +00002955 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958fi
2959
Thomas Wouters477c8d52006-05-27 19:21:47 +00002960
2961
Michael W. Hudson54241132001-12-07 15:38:26 +00002962
2963
2964
2965
Jack Jansene578a632001-08-15 01:27:14 +00002966
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002967
2968
2969
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002970
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002971
Jack Jansene578a632001-08-15 01:27:14 +00002972##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002973## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002974## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002975##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976# Set name for machine-dependent library files
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2979$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002980if test -z "$MACHDEP"
2981then
Guido van Rossum563e7081996-09-10 18:20:48 +00002982 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002983 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002984 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002985 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_md_system=`echo $ac_sys_system |
2990 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2991 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002992 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002993 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002994
Guido van Rossum07397971997-04-29 21:49:50 +00002995 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002996 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002997 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002998 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002999 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003000 esac
3001fi
Guido van Rossum91922671997-10-09 20:24:13 +00003002
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003003# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3004# disable features if it is defined, without any means to access these
3005# features as extensions. For these systems, we skip the definition of
3006# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3007# some feature, make sure there is no alternative way to access this
3008# feature. Also, when using wildcards, make sure you have verified the
3009# need for not defining _XOPEN_SOURCE on all systems matching the
3010# wildcard, and that the wildcard does not include future systems
3011# (which may remove their limitations).
3012case $ac_sys_system/$ac_sys_release in
3013 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3014 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003015 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003016 # In addition, Stefan Krah confirms that issue #1244610 exists through
3017 # OpenBSD 4.6, but is fixed in 4.7.
3018 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003019 define_xopen_source=no
3020 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3021 # also defined. This can be overridden by defining _BSD_SOURCE
3022 # As this has a different meaning on Linux, only define it on OpenBSD
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003025
3026 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003027 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003028 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3029 # also defined. This can be overridden by defining _BSD_SOURCE
3030 # As this has a different meaning on Linux, only define it on OpenBSD
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003033
3034 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003035 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3036 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3037 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003038 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 +00003039 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003040 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3041 # request to enable features supported by the standard as a request
3042 # to disable features not supported by the standard. The best way
3043 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3044 # entirely and define __EXTENSIONS__ instead.
3045 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003046 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003047 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3048 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003049 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003050 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 define_xopen_source=no;;
3052 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003053 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003054 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003055 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003056 # On FreeBSD 4, the math functions C89 does not cover are never defined
3057 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3058 FreeBSD/4.*)
3059 define_xopen_source=no;;
3060 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3061 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3062 # identifies itself as Darwin/7.*
3063 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3064 # disables platform specific features beyond repair.
3065 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3066 # has no effect, don't bother defining them
3067 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003068 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003069 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003070 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003071 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3072 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3073 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003074 AIX/4)
3075 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003076 AIX/5)
3077 if test `uname -r` -eq 1; then
3078 define_xopen_source=no
3079 fi
3080 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003081 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3082 # defining NI_NUMERICHOST.
3083 QNX/6.3.2)
3084 define_xopen_source=no
3085 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003086
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003087esac
3088
3089if test $define_xopen_source = yes
3090then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003093
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003094
3095 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3096 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3097 # several APIs are not declared. Since this is also needed in some
3098 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003101
3102
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003103
Matthias Kloseb9621712010-04-24 17:59:49 +00003104$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
3106
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003107fi
3108
Guido van Rossum91922671997-10-09 20:24:13 +00003109#
3110# SGI compilers allow the specification of the both the ABI and the
3111# ISA on the command line. Depending on the values of these switches,
3112# different and often incompatable code will be generated.
3113#
3114# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3115# thus supply support for various ABI/ISA combinations. The MACHDEP
3116# variable is also adjusted.
3117#
3118
3119if test ! -z "$SGI_ABI"
3120then
3121 CC="cc $SGI_ABI"
3122 LDFLAGS="$SGI_ABI $LDFLAGS"
3123 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3126$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003127
Jack Jansen6b08a402004-06-03 12:41:45 +00003128# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3129# it may influence the way we can build extensions, so distutils
3130# needs to check it
3131
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132
Jack Jansen6b08a402004-06-03 12:41:45 +00003133CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3137$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003138ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3140$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003141
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003143
3144# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3145# for debug/optimization stuff. BASECFLAGS is for flags that are required
3146# just to get things to compile and link. Users are free to override OPT
3147# when running configure or make. The build should not break if they do.
3148# BASECFLAGS should generally not be messed with, however.
3149
3150# XXX shouldn't some/most/all of this code be merged with the stuff later
3151# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3153$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003156if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003158 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003159 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003160 without_gcc=yes;;
3161 yes) CC=gcc
3162 without_gcc=no;;
3163 *) CC=$withval
3164 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003165 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003166else
Martin v. Löwis11437992002-04-12 09:54:03 +00003167
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003168 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003169 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003170 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003171 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003172 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173fi
3174
Matthias Kloseb9621712010-04-24 17:59:49 +00003175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3176$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003177
Guido van Rossum8b131c51995-03-09 14:10:13 +00003178# If the user switches compilers, we can't believe the cache
3179if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3180then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003181 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003182(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003183fi
3184
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003185# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3186# when the compiler supports them, but we don't always want -O2, and
3187# we set -g later.
3188if test -z "$CFLAGS"; then
3189 CFLAGS=
3190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003191ac_ext=c
3192ac_cpp='$CPP $CPPFLAGS'
3193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3195ac_compiler_gnu=$ac_cv_c_compiler_gnu
3196if test -n "$ac_tool_prefix"; then
3197 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3198set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3200$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003201if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003203else
3204 if test -n "$CC"; then
3205 ac_cv_prog_CC="$CC" # Let the user override the test.
3206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3208for as_dir in $PATH
3209do
3210 IFS=$as_save_IFS
3211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 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 +00003214 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003215 $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 +00003216 break 2
3217 fi
3218done
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003221
Jack Jansendd19cf82001-12-06 22:36:17 +00003222fi
3223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003224CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003225if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3227$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003228else
Matthias Kloseb9621712010-04-24 17:59:49 +00003229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3230$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003231fi
3232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233
Martin v. Löwis11437992002-04-12 09:54:03 +00003234fi
3235if test -z "$ac_cv_prog_CC"; then
3236 ac_ct_CC=$CC
3237 # Extract the first word of "gcc", so it can be a program name with args.
3238set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3240$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003241if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003242 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003243else
3244 if test -n "$ac_ct_CC"; then
3245 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3246else
3247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248for as_dir in $PATH
3249do
3250 IFS=$as_save_IFS
3251 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 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 +00003254 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 $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 +00003256 break 2
3257 fi
3258done
Matthias Kloseb9621712010-04-24 17:59:49 +00003259 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003261
3262fi
3263fi
3264ac_ct_CC=$ac_cv_prog_ac_ct_CC
3265if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3267$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003268else
Matthias Kloseb9621712010-04-24 17:59:49 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3270$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003271fi
3272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 if test "x$ac_ct_CC" = x; then
3274 CC=""
3275 else
3276 case $cross_compiling:$ac_tool_warned in
3277yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280ac_tool_warned=yes ;;
3281esac
3282 CC=$ac_ct_CC
3283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003284else
3285 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003286fi
3287
Jack Jansendd19cf82001-12-06 22:36:17 +00003288if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 if test -n "$ac_tool_prefix"; then
3290 # 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 +00003291set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003294if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003296else
3297 if test -n "$CC"; then
3298 ac_cv_prog_CC="$CC" # Let the user override the test.
3299else
Martin v. Löwis11437992002-04-12 09:54:03 +00003300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 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 +00003307 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 $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 +00003309 break 2
3310 fi
3311done
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003313IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003314
3315fi
3316fi
3317CC=$ac_cv_prog_CC
3318if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3320$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
Matthias Kloseb9621712010-04-24 17:59:49 +00003322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003324fi
3325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326
Martin v. Löwis11437992002-04-12 09:54:03 +00003327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003328fi
3329if test -z "$CC"; then
3330 # Extract the first word of "cc", so it can be a program name with args.
3331set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3333$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003334if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003336else
3337 if test -n "$CC"; then
3338 ac_cv_prog_CC="$CC" # Let the user override the test.
3339else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003340 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3342for as_dir in $PATH
3343do
3344 IFS=$as_save_IFS
3345 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347 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 +00003348 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3349 ac_prog_rejected=yes
3350 continue
3351 fi
3352 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003353 $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 +00003354 break 2
3355 fi
3356done
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003358IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003359
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test $ac_prog_rejected = yes; then
3361 # We found a bogon in the path, so make sure we never use it.
3362 set dummy $ac_cv_prog_CC
3363 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003364 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365 # We chose a different compiler from the bogus one.
3366 # However, it has the same basename, so the bogon will be chosen
3367 # first if we set CC to just the basename; use the full file name.
3368 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003369 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370 fi
3371fi
3372fi
3373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3377$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378else
Matthias Kloseb9621712010-04-24 17:59:49 +00003379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3380$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003381fi
3382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
3385if test -z "$CC"; then
3386 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003387 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 do
3389 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3390set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003393if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003395else
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398else
Martin v. Löwis11437992002-04-12 09:54:03 +00003399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3400for as_dir in $PATH
3401do
3402 IFS=$as_save_IFS
3403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003405 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 +00003406 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 $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 +00003408 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003410done
Matthias Kloseb9621712010-04-24 17:59:49 +00003411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003412IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003413
3414fi
3415fi
3416CC=$ac_cv_prog_CC
3417if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3419$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003420else
Matthias Kloseb9621712010-04-24 17:59:49 +00003421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3422$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003423fi
3424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003425
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 test -n "$CC" && break
3427 done
3428fi
3429if test -z "$CC"; then
3430 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003431 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003432do
3433 # Extract the first word of "$ac_prog", so it can be a program name with args.
3434set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3436$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003437if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003439else
3440 if test -n "$ac_ct_CC"; then
3441 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3442else
3443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3444for as_dir in $PATH
3445do
3446 IFS=$as_save_IFS
3447 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449 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 +00003450 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 $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 +00003452 break 2
3453 fi
3454done
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003457
Martin v. Löwis11437992002-04-12 09:54:03 +00003458fi
3459fi
3460ac_ct_CC=$ac_cv_prog_ac_ct_CC
3461if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3463$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464else
Matthias Kloseb9621712010-04-24 17:59:49 +00003465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3466$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003467fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 test -n "$ac_ct_CC" && break
3471done
Michael W. Hudson54241132001-12-07 15:38:26 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 if test "x$ac_ct_CC" = x; then
3474 CC=""
3475 else
3476 case $cross_compiling:$ac_tool_warned in
3477yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3479$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480ac_tool_warned=yes ;;
3481esac
3482 CC=$ac_ct_CC
3483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003484fi
3485
3486fi
3487
3488
Matthias Kloseb9621712010-04-24 17:59:49 +00003489test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003491as_fn_error $? "no acceptable C compiler found in \$PATH
3492See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003493
3494# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003495$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3496set X $ac_compile
3497ac_compiler=$2
3498for ac_option in --version -v -V -qversion; do
3499 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500case "(($ac_try" in
3501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3502 *) ac_try_echo=$ac_try;;
3503esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3505$as_echo "$ac_try_echo"; } >&5
3506 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003508 if test -s conftest.err; then
3509 sed '10a\
3510... rest of stderr output deleted ...
3511 10q' conftest.err >conftest.er1
3512 cat conftest.er1 >&5
3513 fi
3514 rm -f conftest.er1 conftest.err
3515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3516 test $ac_status = 0; }
3517done
Martin v. Löwis11437992002-04-12 09:54:03 +00003518
Matthias Kloseb9621712010-04-24 17:59:49 +00003519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003520/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003521
Martin v. Löwis11437992002-04-12 09:54:03 +00003522int
3523main ()
3524{
3525
3526 ;
3527 return 0;
3528}
3529_ACEOF
3530ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003531ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003532# Try to create an executable without -o first, disregard a.out.
3533# It will help us diagnose broken compilers, and finding out an intuition
3534# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3536$as_echo_n "checking whether the C compiler works... " >&6; }
3537ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3538
3539# The possible output files:
3540ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542ac_rmfiles=
3543for ac_file in $ac_files
3544do
3545 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3548 esac
3549done
3550rm -f $ac_rmfiles
3551
Matthias Kloseb9621712010-04-24 17:59:49 +00003552if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3558$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3562 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3564# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3565# in a Makefile. We should not override ac_cv_exeext if it was cached,
3566# so that the user can short-circuit this test for compilers unknown to
3567# Autoconf.
3568for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003569do
3570 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003573 ;;
3574 [ab].out )
3575 # We found the default executable, but exeext='' is most
3576 # certainly right.
3577 break;;
3578 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 then :; else
3581 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3582 fi
3583 # We set ac_cv_exeext here because the later test for it is not
3584 # safe: cross compilers may not add the suffix if given an `-o'
3585 # argument, so we may need to know it at that point already.
3586 # Even if this section looks crufty: it has the advantage of
3587 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003588 break;;
3589 * )
3590 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 esac
3592done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593test "$ac_cv_exeext" = no && ac_cv_exeext=
3594
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003595else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596 ac_file=''
3597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003598if test -z "$ac_file"; then :
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
3601$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003602sed 's/^/| /' conftest.$ac_ext >&5
3603
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003606as_fn_error 77 "C compiler cannot create executables
3607See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003608else
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3610$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3613$as_echo_n "checking for C compiler default output file name... " >&6; }
3614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3615$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617
Matthias Kloseb9621712010-04-24 17:59:49 +00003618rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003619ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3621$as_echo_n "checking for suffix of executables... " >&6; }
3622if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623case "(($ac_try" in
3624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3625 *) ac_try_echo=$ac_try;;
3626esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3628$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3632 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003633 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3634# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3635# work properly (i.e., refer to `conftest.exe'), while it won't with
3636# `rm'.
3637for ac_file in conftest.exe conftest conftest.*; do
3638 test -f "$ac_file" || continue
3639 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003641 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3642 break;;
3643 * ) break;;
3644 esac
3645done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003646else
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003649as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3650See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003652rm -f conftest conftest$ac_cv_exeext
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3654$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003655
3656rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003657EXEEXT=$ac_cv_exeext
3658ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3660/* end confdefs.h. */
3661#include <stdio.h>
3662int
3663main ()
3664{
3665FILE *f = fopen ("conftest.out", "w");
3666 return ferror (f) || fclose (f) != 0;
3667
3668 ;
3669 return 0;
3670}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003672ac_clean_files="$ac_clean_files conftest.out"
3673# Check that the compiler produces executables we can run. If not, either
3674# the compiler is broken, or we cross compile.
3675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3676$as_echo_n "checking whether we are cross compiling... " >&6; }
3677if test "$cross_compiling" != yes; then
3678 { { ac_try="$ac_link"
3679case "(($ac_try" in
3680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3681 *) ac_try_echo=$ac_try;;
3682esac
3683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3684$as_echo "$ac_try_echo"; } >&5
3685 (eval "$ac_link") 2>&5
3686 ac_status=$?
3687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3688 test $ac_status = 0; }
3689 if { ac_try='./conftest$ac_cv_exeext'
3690 { { case "(($ac_try" in
3691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3692 *) ac_try_echo=$ac_try;;
3693esac
3694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3695$as_echo "$ac_try_echo"; } >&5
3696 (eval "$ac_try") 2>&5
3697 ac_status=$?
3698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3699 test $ac_status = 0; }; }; then
3700 cross_compiling=no
3701 else
3702 if test "$cross_compiling" = maybe; then
3703 cross_compiling=yes
3704 else
3705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003707as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003708If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003709See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 fi
3711 fi
3712fi
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3714$as_echo "$cross_compiling" >&6; }
3715
3716rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3717ac_clean_files=$ac_clean_files_save
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3719$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003720if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
3722else
3723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003724/* end confdefs.h. */
3725
3726int
3727main ()
3728{
3729
3730 ;
3731 return 0;
3732}
3733_ACEOF
3734rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003735if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736case "(($ac_try" in
3737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3738 *) ac_try_echo=$ac_try;;
3739esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3741$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3745 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746 for ac_file in conftest.o conftest.obj conftest.*; do
3747 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3751 break;;
3752 esac
3753done
3754else
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003756sed 's/^/| /' conftest.$ac_ext >&5
3757
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003760as_fn_error $? "cannot compute suffix of object files: cannot compile
3761See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003763rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3766$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767OBJEXT=$ac_cv_objext
3768ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3770$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003771if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003773else
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777int
3778main ()
3779{
3780#ifndef __GNUC__
3781 choke me
3782#endif
3783
3784 ;
3785 return 0;
3786}
3787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_compiler_gnu=yes
3790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003794ac_cv_c_compiler_gnu=$ac_compiler_gnu
3795
3796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3798$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3799if test $ac_compiler_gnu = yes; then
3800 GCC=yes
3801else
3802 GCC=
3803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804ac_test_CFLAGS=${CFLAGS+set}
3805ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3807$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003808if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003810else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 ac_save_c_werror_flag=$ac_c_werror_flag
3812 ac_c_werror_flag=yes
3813 ac_cv_prog_cc_g=no
3814 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818int
3819main ()
3820{
3821
3822 ;
3823 return 0;
3824}
3825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003826if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003827 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828else
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 CFLAGS=""
3830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831/* end confdefs.h. */
3832
3833int
3834main ()
3835{
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003841if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842
Matthias Kloseb9621712010-04-24 17:59:49 +00003843else
3844 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847/* end confdefs.h. */
3848
3849int
3850main ()
3851{
3852
3853 ;
3854 return 0;
3855}
3856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003857if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3865 ac_c_werror_flag=$ac_save_c_werror_flag
3866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3868$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003869if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003871elif test $ac_cv_prog_cc_g = yes; then
3872 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003873 CFLAGS="-g -O2"
3874 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003876 fi
3877else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003878 if test "$GCC" = yes; then
3879 CFLAGS="-O2"
3880 else
3881 CFLAGS=
3882 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3885$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003886if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003888else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003890ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003892/* end confdefs.h. */
3893#include <stdarg.h>
3894#include <stdio.h>
3895#include <sys/types.h>
3896#include <sys/stat.h>
3897/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3898struct buf { int x; };
3899FILE * (*rcsopen) (struct buf *, struct stat *, int);
3900static char *e (p, i)
3901 char **p;
3902 int i;
3903{
3904 return p[i];
3905}
3906static char *f (char * (*g) (char **, int), char **p, ...)
3907{
3908 char *s;
3909 va_list v;
3910 va_start (v,p);
3911 s = g (p, va_arg (v,int));
3912 va_end (v);
3913 return s;
3914}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003915
3916/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3917 function prototypes and stuff, but not '\xHH' hex character constants.
3918 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3921 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003923int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3926 inside strings and character constants. */
3927#define FOO(x) 'x'
3928int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3929
Skip Montanaro6dead952003-09-25 14:50:04 +00003930int test (int i, double x);
3931struct s1 {int (*f) (int a);};
3932struct s2 {int (*f) (double a);};
3933int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3934int argc;
3935char **argv;
3936int
3937main ()
3938{
3939return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3940 ;
3941 return 0;
3942}
3943_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3945 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003946do
3947 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951rm -f core conftest.err conftest.$ac_objext
3952 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003953done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003955CC=$ac_save_CC
3956
3957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958# AC_CACHE_VAL
3959case "x$ac_cv_prog_cc_c89" in
3960 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3962$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3965$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003966 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3969$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003970esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003971if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003974
Martin v. Löwis11437992002-04-12 09:54:03 +00003975ac_ext=c
3976ac_cpp='$CPP $CPPFLAGS'
3977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3979ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003981
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003982
3983
Matthias Kloseb9621712010-04-24 17:59:49 +00003984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3985$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003988if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990
3991 case $withval in
3992 no) with_cxx_main=no
3993 MAINCC='$(CC)';;
3994 yes) with_cxx_main=yes
3995 MAINCC='$(CXX)';;
3996 *) with_cxx_main=yes
3997 MAINCC=$withval
3998 if test -z "$CXX"
3999 then
4000 CXX=$withval
4001 fi;;
4002 esac
4003else
4004
4005 with_cxx_main=no
4006 MAINCC='$(CC)'
4007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008fi
4009
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4011$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004012
4013preset_cxx="$CXX"
4014if test -z "$CXX"
4015then
4016 case "$CC" in
4017 gcc) # Extract the first word of "g++", so it can be a program name with args.
4018set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4020$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004021if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023else
4024 case $CXX in
4025 [\\/]* | ?:[\\/]*)
4026 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4027 ;;
4028 *)
4029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030for as_dir in notfound
4031do
4032 IFS=$as_save_IFS
4033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035 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 +00004036 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004038 break 2
4039 fi
4040done
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043
4044 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4045 ;;
4046esac
4047fi
4048CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004049if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4051$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004052else
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004056
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004057 ;;
4058 cc) # Extract the first word of "c++", so it can be a program name with args.
4059set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4061$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004062if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064else
4065 case $CXX in
4066 [\\/]* | ?:[\\/]*)
4067 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4068 ;;
4069 *)
4070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4071for as_dir in notfound
4072do
4073 IFS=$as_save_IFS
4074 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 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 +00004077 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004079 break 2
4080 fi
4081done
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004084
4085 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4086 ;;
4087esac
4088fi
4089CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004090if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4092$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004093else
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4095$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004098 ;;
4099 esac
4100 if test "$CXX" = "notfound"
4101 then
4102 CXX=""
4103 fi
4104fi
4105if test -z "$CXX"
4106then
4107 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4108do
4109 # Extract the first word of "$ac_prog", so it can be a program name with args.
4110set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4112$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004113if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004115else
4116 if test -n "$CXX"; then
4117 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4118else
4119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120for as_dir in $PATH
4121do
4122 IFS=$as_save_IFS
4123 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 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 +00004126 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128 break 2
4129 fi
4130done
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004133
4134fi
4135fi
4136CXX=$ac_cv_prog_CXX
4137if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4139$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004140else
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143fi
4144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004146 test -n "$CXX" && break
4147done
4148test -n "$CXX" || CXX="notfound"
4149
4150 if test "$CXX" = "notfound"
4151 then
4152 CXX=""
4153 fi
4154fi
4155if test "$preset_cxx" != "$CXX"
4156then
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004158
4159 By default, distutils will build C++ extension modules with \"$CXX\".
4160 If this is not intended, then set CXX on the configure command line.
4161 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004162$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004163
4164 By default, distutils will build C++ extension modules with \"$CXX\".
4165 If this is not intended, then set CXX on the configure command line.
4166 " >&2;}
4167fi
4168
4169
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004170# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004171
4172ac_ext=c
4173ac_cpp='$CPP $CPPFLAGS'
4174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4176ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4178$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004179# On Suns, sometimes $CPP names a directory.
4180if test -n "$CPP" && test -d "$CPP"; then
4181 CPP=
4182fi
4183if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004184 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004186else
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 # Double quotes because CPP needs to be expanded
4188 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4189 do
4190 ac_preproc_ok=false
4191for ac_c_preproc_warn_flag in '' yes
4192do
4193 # Use a header file that comes with gcc, so configuring glibc
4194 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004195 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4196 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004197 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004200/* end confdefs.h. */
4201#ifdef __STDC__
4202# include <limits.h>
4203#else
4204# include <assert.h>
4205#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004206 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004209
Matthias Kloseb9621712010-04-24 17:59:49 +00004210else
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Broken: fails on valid input.
4212continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004213fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004214rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004220#include <ac_nonexistent.h>
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004223 # Broken: success on invalid input.
4224continue
4225else
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 # Passes both tests.
4227ac_preproc_ok=:
4228break
4229fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004230rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004231
4232done
4233# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004234rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 break
4237fi
4238
4239 done
4240 ac_cv_prog_CPP=$CPP
4241
4242fi
4243 CPP=$ac_cv_prog_CPP
4244else
4245 ac_cv_prog_CPP=$CPP
4246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4248$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004249ac_preproc_ok=false
4250for ac_c_preproc_warn_flag in '' yes
4251do
4252 # Use a header file that comes with gcc, so configuring glibc
4253 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004254 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4255 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 # On the NeXT, cc -E runs the code through the compiler's parser,
4257 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004259/* end confdefs.h. */
4260#ifdef __STDC__
4261# include <limits.h>
4262#else
4263# include <assert.h>
4264#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004265 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004268
Matthias Kloseb9621712010-04-24 17:59:49 +00004269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Broken: fails on valid input.
4271continue
4272fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004273rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004279#include <ac_nonexistent.h>
4280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004281if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # Broken: success on invalid input.
4283continue
4284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 # Passes both tests.
4286ac_preproc_ok=:
4287break
4288fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004289rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004290
4291done
4292# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004293rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004294if $ac_preproc_ok; then :
4295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296else
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004299as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4300See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004301fi
4302
4303ac_ext=c
4304ac_cpp='$CPP $CPPFLAGS'
4305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4307ac_compiler_gnu=$ac_cv_c_compiler_gnu
4308
4309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4311$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004312if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004314else
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 # Loop through the user's path and test for each of PROGNAME-LIST
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4320do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 for ac_prog in grep ggrep; do
4324 for ac_exec_ext in '' $ac_executable_extensions; do
4325 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4326 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4327# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 # Check for GNU $ac_path_GREP
4329case `"$ac_path_GREP" --version 2>&1` in
4330*GNU*)
4331 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4332*)
4333 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 while :
4336 do
4337 cat "conftest.in" "conftest.in" >"conftest.tmp"
4338 mv "conftest.tmp" "conftest.in"
4339 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4342 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4345 # Best one so far, save it but keep looking for a better one
4346 ac_cv_path_GREP="$ac_path_GREP"
4347 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004348 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 # 10*(2^10) chars as input seems more than enough
4350 test $ac_count -gt 10 && break
4351 done
4352 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4353esac
4354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 $ac_path_GREP_found && break 3
4356 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004361 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 +00004362 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363else
4364 ac_cv_path_GREP=$GREP
4365fi
4366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4369$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 GREP="$ac_cv_path_GREP"
4371
4372
Matthias Kloseb9621712010-04-24 17:59:49 +00004373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4374$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004375if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377else
4378 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4379 then ac_cv_path_EGREP="$GREP -E"
4380 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004383 # Loop through the user's path and test for each of PROGNAME-LIST
4384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4386do
4387 IFS=$as_save_IFS
4388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 for ac_prog in egrep; do
4390 for ac_exec_ext in '' $ac_executable_extensions; do
4391 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4392 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4393# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 # Check for GNU $ac_path_EGREP
4395case `"$ac_path_EGREP" --version 2>&1` in
4396*GNU*)
4397 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4398*)
4399 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401 while :
4402 do
4403 cat "conftest.in" "conftest.in" >"conftest.tmp"
4404 mv "conftest.tmp" "conftest.in"
4405 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4408 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4411 # Best one so far, save it but keep looking for a better one
4412 ac_cv_path_EGREP="$ac_path_EGREP"
4413 ac_path_EGREP_max=$ac_count
4414 fi
4415 # 10*(2^10) chars as input seems more than enough
4416 test $ac_count -gt 10 && break
4417 done
4418 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4419esac
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 $ac_path_EGREP_found && break 3
4422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004427 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 +00004428 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429else
4430 ac_cv_path_EGREP=$EGREP
4431fi
4432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 fi
4434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4436$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004438
4439
Matthias Kloseb9621712010-04-24 17:59:49 +00004440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4441$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004442if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 $as_echo_n "(cached) " >&6
4444else
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004446/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004447#include <stdlib.h>
4448#include <stdarg.h>
4449#include <string.h>
4450#include <float.h>
4451
4452int
4453main ()
4454{
4455
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460if ac_fn_c_try_compile "$LINENO"; then :
4461 ac_cv_header_stdc=yes
4462else
4463 ac_cv_header_stdc=no
4464fi
4465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4466
4467if test $ac_cv_header_stdc = yes; then
4468 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4470/* end confdefs.h. */
4471#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004472
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004473_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004476
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004477else
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004479fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004480rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004481
Matthias Kloseb9621712010-04-24 17:59:49 +00004482fi
4483
4484if test $ac_cv_header_stdc = yes; then
4485 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487/* end confdefs.h. */
4488#include <stdlib.h>
4489
4490_ACEOF
4491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4492 $EGREP "free" >/dev/null 2>&1; then :
4493
4494else
4495 ac_cv_header_stdc=no
4496fi
4497rm -f conftest*
4498
4499fi
4500
4501if test $ac_cv_header_stdc = yes; then
4502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4503 if test "$cross_compiling" = yes; then :
4504 :
4505else
4506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4507/* end confdefs.h. */
4508#include <ctype.h>
4509#include <stdlib.h>
4510#if ((' ' & 0x0FF) == 0x020)
4511# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4512# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4513#else
4514# define ISLOWER(c) \
4515 (('a' <= (c) && (c) <= 'i') \
4516 || ('j' <= (c) && (c) <= 'r') \
4517 || ('s' <= (c) && (c) <= 'z'))
4518# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4519#endif
4520
4521#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4522int
4523main ()
4524{
4525 int i;
4526 for (i = 0; i < 256; i++)
4527 if (XOR (islower (i), ISLOWER (i))
4528 || toupper (i) != TOUPPER (i))
4529 return 2;
4530 return 0;
4531}
4532_ACEOF
4533if ac_fn_c_try_run "$LINENO"; then :
4534
4535else
4536 ac_cv_header_stdc=no
4537fi
4538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4539 conftest.$ac_objext conftest.beam conftest.$ac_ext
4540fi
4541
4542fi
4543fi
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4545$as_echo "$ac_cv_header_stdc" >&6; }
4546if test $ac_cv_header_stdc = yes; then
4547
4548$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4549
4550fi
4551
4552# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4553for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4554 inttypes.h stdint.h unistd.h
4555do :
4556 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4557ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4558"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004559if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004560 cat >>confdefs.h <<_ACEOF
4561#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4562_ACEOF
4563
4564fi
4565
4566done
4567
4568
4569
4570 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 +00004571if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 MINIX=yes
4573else
4574 MINIX=
4575fi
4576
4577
4578 if test "$MINIX" = yes; then
4579
4580$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4581
4582
4583$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4584
4585
4586$as_echo "#define _MINIX 1" >>confdefs.h
4587
4588 fi
4589
4590
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4592$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004593if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 $as_echo_n "(cached) " >&6
4595else
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598
4599# define __EXTENSIONS__ 1
4600 $ac_includes_default
4601int
4602main ()
4603{
4604
4605 ;
4606 return 0;
4607}
4608_ACEOF
4609if ac_fn_c_try_compile "$LINENO"; then :
4610 ac_cv_safe_to_define___extensions__=yes
4611else
4612 ac_cv_safe_to_define___extensions__=no
4613fi
4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615fi
4616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4617$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4618 test $ac_cv_safe_to_define___extensions__ = yes &&
4619 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4620
4621 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4622
4623 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4624
4625 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4626
4627 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4628
4629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631# Check for unsupported systems
4632case $ac_sys_system/$ac_sys_release in
4633atheos*|Linux*/1*)
4634 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4635 echo See README for details.
4636 exit 1;;
4637esac
4638
4639
Matthias Kloseb9621712010-04-24 17:59:49 +00004640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4641$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642
4643# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004644if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004645 withval=$with_suffix;
4646 case $withval in
4647 no) EXEEXT=;;
4648 yes) EXEEXT=.exe;;
4649 *) EXEEXT=$withval;;
4650 esac
4651fi
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4654$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655
4656# Test whether we're running on a non-case-sensitive system, in which
4657# case we give a warning if no ext is given
4658
Matthias Kloseb9621712010-04-24 17:59:49 +00004659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4660$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004661if test ! -d CaseSensitiveTestDir; then
4662mkdir CaseSensitiveTestDir
4663fi
4664
4665if test -d casesensitivetestdir
4666then
Matthias Kloseb9621712010-04-24 17:59:49 +00004667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4668$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669 BUILDEXEEXT=.exe
4670else
Matthias Kloseb9621712010-04-24 17:59:49 +00004671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004673 BUILDEXEEXT=$EXEEXT
4674fi
4675rmdir CaseSensitiveTestDir
4676
4677case $MACHDEP in
4678bsdos*)
4679 case $CC in
4680 gcc) CC="$CC -D_HAVE_BSDI";;
4681 esac;;
4682esac
4683
4684case $ac_sys_system in
4685hp*|HP*)
4686 case $CC in
4687 cc|*/cc) CC="$CC -Ae";;
4688 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689esac
4690
4691
4692
Matthias Kloseb9621712010-04-24 17:59:49 +00004693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4694$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695if test -z "$LIBRARY"
4696then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004697 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4700$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004701
4702# LDLIBRARY is the name of the library to link against (as opposed to the
4703# name of the library into which to insert object files). BLDLIBRARY is also
4704# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4705# is blank as the main program is not linked directly against LDLIBRARY.
4706# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4707# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4708# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4709# DLLLIBRARY is the shared (i.e., DLL) library.
4710#
4711# RUNSHARED is used to run shared python without installed libraries
4712#
4713# INSTSONAME is the name of the shared library that will be use to install
4714# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004715#
4716# LDVERSION is the shared library version number, normally the Python version
4717# with the ABI build flags appended.
4718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720
4721
4722
4723
4724
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004726LDLIBRARY="$LIBRARY"
4727BLDLIBRARY='$(LDLIBRARY)'
4728INSTSONAME='$(LDLIBRARY)'
4729DLLLIBRARY=''
4730LDLIBRARYDIR=''
4731RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004732LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733
4734# LINKCC is the command that links the python executable -- default is $(CC).
4735# If CXX is set, and if it is needed to link a main function that was
4736# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4737# python might then depend on the C++ runtime
4738# This is altered for AIX in order to build the export list before
4739# linking.
4740
Matthias Kloseb9621712010-04-24 17:59:49 +00004741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4742$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743if test -z "$LINKCC"
4744then
4745 LINKCC='$(PURIFY) $(MAINCC)'
4746 case $ac_sys_system in
4747 AIX*)
4748 exp_extra="\"\""
4749 if test $ac_sys_release -ge 5 -o \
4750 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4751 exp_extra="."
4752 fi
4753 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 QNX*)
4755 # qcc must be used because the other compilers do not
4756 # support -N.
4757 LINKCC=qcc;;
4758 esac
4759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4761$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762
4763# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4764# make sure we default having it set to "no": this is used by
4765# distutils.unixccompiler to know if it should add --enable-new-dtags
4766# to linker command lines, and failing to detect GNU ld simply results
4767# in the same bahaviour as before.
4768
Matthias Kloseb9621712010-04-24 17:59:49 +00004769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4770$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004771ac_prog=ld
4772if test "$GCC" = yes; then
4773 ac_prog=`$CC -print-prog-name=ld`
4774fi
4775case `"$ac_prog" -V 2>&1 < /dev/null` in
4776 *GNU*)
4777 GNULD=yes;;
4778 *)
4779 GNULD=no;;
4780esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4782$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4785$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004786if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004787 $as_echo_n "(cached) " >&6
4788else
4789 ac_cv_c_inline=no
4790for ac_kw in inline __inline__ __inline; do
4791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792/* end confdefs.h. */
4793#ifndef __cplusplus
4794typedef int foo_t;
4795static $ac_kw foo_t static_foo () {return 0; }
4796$ac_kw foo_t foo () {return 0; }
4797#endif
4798
4799_ACEOF
4800if ac_fn_c_try_compile "$LINENO"; then :
4801 ac_cv_c_inline=$ac_kw
4802fi
4803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4804 test "$ac_cv_c_inline" != no && break
4805done
4806
4807fi
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4809$as_echo "$ac_cv_c_inline" >&6; }
4810
4811case $ac_cv_c_inline in
4812 inline | yes) ;;
4813 *)
4814 case $ac_cv_c_inline in
4815 no) ac_val=;;
4816 *) ac_val=$ac_cv_c_inline;;
4817 esac
4818 cat >>confdefs.h <<_ACEOF
4819#ifndef __cplusplus
4820#define inline $ac_val
4821#endif
4822_ACEOF
4823 ;;
4824esac
4825
4826if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004827
4828$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004829
4830
4831fi
4832
4833
Matthias Kloseb9621712010-04-24 17:59:49 +00004834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4835$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838 enableval=$enable_shared;
4839fi
4840
4841
4842if test -z "$enable_shared"
4843then
4844 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004845 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846 enable_shared="yes";;
4847 *)
4848 enable_shared="no";;
4849 esac
4850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4852$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853
Matthias Kloseb9621712010-04-24 17:59:49 +00004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4855$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004856# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 enableval=$enable_profiling; ac_save_cc="$CC"
4859 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861 ac_enable_profiling="no"
4862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864/* end confdefs.h. */
4865int main() { return 0; }
4866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004868 ac_enable_profiling="yes"
4869else
Matthias Kloseb9621712010-04-24 17:59:49 +00004870 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874fi
4875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 CC="$ac_save_cc"
4877fi
4878
Matthias Kloseb9621712010-04-24 17:59:49 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4880$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881
4882case "$ac_enable_profiling" in
4883 "yes")
4884 BASECFLAGS="-pg $BASECFLAGS"
4885 LDFLAGS="-pg $LDFLAGS"
4886 ;;
4887esac
4888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4890$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891
4892# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4893# library that we build, but we do not want to link against it (we
4894# will find it with a -framework option). For this reason there is an
4895# extra variable BLDLIBRARY against which Python and the extension
4896# modules are linked, BLDLIBRARY. This is normally the same as
4897# LDLIBRARY, but empty for MacOSX framework builds.
4898if test "$enable_framework"
4899then
4900 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4901 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4902 BLDLIBRARY=''
4903else
4904 BLDLIBRARY='$(LDLIBRARY)'
4905fi
4906
4907# Other platforms follow
4908if test $enable_shared = "yes"; then
4909
Matthias Kloseb9621712010-04-24 17:59:49 +00004910$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911
4912 case $ac_sys_system in
4913 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004914 LDLIBRARY='libpython$(LDVERSION).dll.a'
4915 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 ;;
4917 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004918 LDLIBRARY='libpython$(LDVERSION).so'
4919 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4921 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004922 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004923 then
4924 PY3LIBRARY=libpython3.so
4925 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926 ;;
4927 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004928 LDLIBRARY='libpython$(LDVERSION).so'
4929 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4931 case $ac_sys_system in
4932 FreeBSD*)
4933 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4934 ;;
4935 esac
4936 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004937 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004938 then
4939 PY3LIBRARY=libpython3.so
4940 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 ;;
4942 hp*|HP*)
4943 case `uname -m` in
4944 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004945 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ;;
4947 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 ;;
4950 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004951 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4953 ;;
4954 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004955 LDLIBRARY='libpython$(LDVERSION).so'
4956 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4958 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004960 LDLIBRARY='libpython$(LDVERSION).dylib'
4961 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4963 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004964 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004965 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004966 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4967 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968
4969 esac
4970else # shared is disabled
4971 case $ac_sys_system in
4972 CYGWIN*)
4973 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004974 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 ;;
4976 esac
4977fi
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4980$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982if test -n "$ac_tool_prefix"; then
4983 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4984set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004987if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989else
4990 if test -n "$RANLIB"; then
4991 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4992else
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5000 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002 break 2
5003 fi
5004done
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006IFS=$as_save_IFS
5007
5008fi
5009fi
5010RANLIB=$ac_cv_prog_RANLIB
5011if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5013$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014else
Matthias Kloseb9621712010-04-24 17:59:49 +00005015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017fi
5018
5019
5020fi
5021if test -z "$ac_cv_prog_RANLIB"; then
5022 ac_ct_RANLIB=$RANLIB
5023 # Extract the first word of "ranlib", so it can be a program name with args.
5024set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005027if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029else
5030 if test -n "$ac_ct_RANLIB"; then
5031 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5040 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 break 2
5043 fi
5044done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046IFS=$as_save_IFS
5047
5048fi
5049fi
5050ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5051if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5053$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054else
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057fi
5058
5059 if test "x$ac_ct_RANLIB" = x; then
5060 RANLIB=":"
5061 else
5062 case $cross_compiling:$ac_tool_warned in
5063yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066ac_tool_warned=yes ;;
5067esac
5068 RANLIB=$ac_ct_RANLIB
5069 fi
5070else
5071 RANLIB="$ac_cv_prog_RANLIB"
5072fi
5073
5074
5075for ac_prog in ar aal
5076do
5077 # Extract the first word of "$ac_prog", so it can be a program name with args.
5078set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5080$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005081if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083else
5084 if test -n "$AR"; then
5085 ac_cv_prog_AR="$AR" # Let the user override the test.
5086else
5087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088for as_dir in $PATH
5089do
5090 IFS=$as_save_IFS
5091 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5094 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005096 break 2
5097 fi
5098done
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100IFS=$as_save_IFS
5101
5102fi
5103fi
5104AR=$ac_cv_prog_AR
5105if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5107$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108else
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5110$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111fi
5112
5113
5114 test -n "$AR" && break
5115done
5116test -n "$AR" || AR="ar"
5117
5118
5119# tweak ARFLAGS only if the user didn't set it on the command line
5120
5121if test -z "$ARFLAGS"
5122then
5123 ARFLAGS="rc"
5124fi
5125
5126
Georg Brandl1ca2e792011-03-05 20:51:24 +01005127
5128
5129# Extract the first word of "hg", so it can be a program name with args.
5130set dummy hg; ac_word=$2
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5132$as_echo_n "checking for $ac_word... " >&6; }
5133if ${ac_cv_prog_HAS_HG+:} false; then :
5134 $as_echo_n "(cached) " >&6
5135else
5136 if test -n "$HAS_HG"; then
5137 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5138else
5139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142 IFS=$as_save_IFS
5143 test -z "$as_dir" && as_dir=.
5144 for ac_exec_ext in '' $ac_executable_extensions; do
5145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5146 ac_cv_prog_HAS_HG="found"
5147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148 break 2
5149 fi
5150done
5151 done
5152IFS=$as_save_IFS
5153
5154 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5155fi
5156fi
5157HAS_HG=$ac_cv_prog_HAS_HG
5158if test -n "$HAS_HG"; then
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5160$as_echo "$HAS_HG" >&6; }
5161else
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167if test $HAS_HG = found
5168then
5169 HGVERSION="hg id -i \$(srcdir)"
5170 HGTAG="hg id -t \$(srcdir)"
5171 HGBRANCH="hg id -b \$(srcdir)"
5172else
5173 HGVERSION=""
5174 HGTAG=""
5175 HGBRANCH=""
5176fi
5177
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178case $MACHDEP in
5179bsdos*|hp*|HP*)
5180 # install -d does not work on BSDI or HP-UX
5181 if test -z "$INSTALL"
5182 then
5183 INSTALL="${srcdir}/install-sh -c"
5184 fi
5185esac
5186ac_aux_dir=
5187for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005188 if test -f "$ac_dir/install-sh"; then
5189 ac_aux_dir=$ac_dir
5190 ac_install_sh="$ac_aux_dir/install-sh -c"
5191 break
5192 elif test -f "$ac_dir/install.sh"; then
5193 ac_aux_dir=$ac_dir
5194 ac_install_sh="$ac_aux_dir/install.sh -c"
5195 break
5196 elif test -f "$ac_dir/shtool"; then
5197 ac_aux_dir=$ac_dir
5198 ac_install_sh="$ac_aux_dir/shtool install -c"
5199 break
5200 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201done
5202if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005203 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204fi
5205
5206# These three variables are undocumented and unsupported,
5207# and are intended to be withdrawn in a future Autoconf release.
5208# They can cause serious problems if a builder's source tree is in a directory
5209# whose full name contains unusual characters.
5210ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5211ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5212ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5213
5214
5215# Find a good install program. We prefer a C program (faster),
5216# so one script is as good as another. But avoid the broken or
5217# incompatible versions:
5218# SysV /etc/install, /usr/sbin/install
5219# SunOS /usr/etc/install
5220# IRIX /sbin/install
5221# AIX /bin/install
5222# AmigaOS /C/install, which installs bootblocks on floppy discs
5223# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5224# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5225# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5226# OS/2's system install, which has a completely different semantic
5227# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005228# Reject install programs that cannot install multiple files.
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5230$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005232if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005233 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234else
5235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236for as_dir in $PATH
5237do
5238 IFS=$as_save_IFS
5239 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 # Account for people who put trailing slashes in PATH elements.
5241case $as_dir/ in #((
5242 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005243 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005244 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245 /usr/ucb/* ) ;;
5246 *)
5247 # OSF1 and SCO ODT 3.0 have their own names for install.
5248 # Don't use installbsd from OSF since it installs stuff as root
5249 # by default.
5250 for ac_prog in ginstall scoinst install; do
5251 for ac_exec_ext in '' $ac_executable_extensions; do
5252 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5253 if test $ac_prog = install &&
5254 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5255 # AIX install. It has an incompatible calling convention.
5256 :
5257 elif test $ac_prog = install &&
5258 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5259 # program-specific install script used by HP pwplus--don't use.
5260 :
5261 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005262 rm -rf conftest.one conftest.two conftest.dir
5263 echo one > conftest.one
5264 echo two > conftest.two
5265 mkdir conftest.dir
5266 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5267 test -s conftest.one && test -s conftest.two &&
5268 test -s conftest.dir/conftest.one &&
5269 test -s conftest.dir/conftest.two
5270 then
5271 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5272 break 3
5273 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 fi
5275 fi
5276 done
5277 done
5278 ;;
5279esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005280
5281 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282IFS=$as_save_IFS
5283
Matthias Kloseb9621712010-04-24 17:59:49 +00005284rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005285
5286fi
5287 if test "${ac_cv_path_install+set}" = set; then
5288 INSTALL=$ac_cv_path_install
5289 else
5290 # As a last resort, use the slow shell script. Don't cache a
5291 # value for INSTALL within a source directory, because that will
5292 # break other packages using the cache if that directory is
5293 # removed, or if the value is a relative name.
5294 INSTALL=$ac_install_sh
5295 fi
5296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5298$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299
5300# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5301# It thinks the first close brace ends the variable substitution.
5302test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5303
5304test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5305
5306test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5307
5308
5309# Not every filesystem supports hard links
5310
5311if test -z "$LN" ; then
5312 case $ac_sys_system in
5313 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 *) LN=ln;;
5315 esac
5316fi
5317
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005318# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005319
5320ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5324$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325
5326# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005327if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328 withval=$with_pydebug;
5329if test "$withval" != no
5330then
5331
Matthias Kloseb9621712010-04-24 17:59:49 +00005332$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333
Matthias Kloseb9621712010-04-24 17:59:49 +00005334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5335$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005337 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005338else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5339$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340fi
5341else
Matthias Kloseb9621712010-04-24 17:59:49 +00005342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344fi
5345
5346
5347# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5348# merged with this chunk of code?
5349
5350# Optimizer/debugger flags
5351# ------------------------
5352# (The following bit of code is complicated enough - please keep things
5353# indented properly. Just pretend you're editing Python code. ;-)
5354
5355# There are two parallel sets of case statements below, one that checks to
5356# see if OPT was set and one that does BASECFLAGS setting based upon
5357# compiler and platform. BASECFLAGS tweaks need to be made even if the
5358# user set OPT.
5359
5360# tweak OPT based on compiler and platform, only if the user didn't set
5361# it on the command line
5362
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005363if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364then
5365 case $GCC in
5366 yes)
5367 if test "$CC" != 'g++' ; then
5368 STRICT_PROTO="-Wstrict-prototypes"
5369 fi
5370 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5371 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5372 WRAP="-fwrapv"
5373 fi
5374 case $ac_cv_prog_cc_g in
5375 yes)
5376 if test "$Py_DEBUG" = 'true' ; then
5377 # Optimization messes up debuggers, so turn it off for
5378 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005379 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380 else
5381 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5382 fi
5383 ;;
5384 *)
5385 OPT="-O3 -Wall $STRICT_PROTO"
5386 ;;
5387 esac
5388 case $ac_sys_system in
5389 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5390 ;;
5391 esac
5392 ;;
5393
5394 *)
5395 OPT="-O"
5396 ;;
5397 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398fi
5399
5400
5401
5402# The -arch flags for universal builds on OSX
5403UNIVERSAL_ARCH_FLAGS=
5404
5405
5406# tweak BASECFLAGS based on compiler and platform
5407case $GCC in
5408yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005409 # Python doesn't violate C99 aliasing rules, but older versions of
5410 # GCC produce warnings for legal Python code. Enable
5411 # -fno-strict-aliasing on versions of GCC that support but produce
5412 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5414$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 ac_save_cc="$CC"
5416 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005417 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005418 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005420else
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005423
Matthias Kloseb159a552010-04-25 21:00:44 +00005424
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005425int
5426main ()
5427{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005428
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005429 ;
5430 return 0;
5431}
Matthias Kloseb159a552010-04-25 21:00:44 +00005432
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005434if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005435
5436 CC="$ac_save_cc -fstrict-aliasing"
5437 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005439/* end confdefs.h. */
5440
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005441 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005442int
5443main ()
5444{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005445double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005446 ;
5447 return 0;
5448}
Matthias Kloseb159a552010-04-25 21:00:44 +00005449
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005451if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005452
5453 ac_cv_no_strict_aliasing=no
5454
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455else
Matthias Kloseb159a552010-04-25 21:00:44 +00005456
5457 ac_cv_no_strict_aliasing=yes
5458
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005459fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005461
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005462else
Matthias Kloseb159a552010-04-25 21:00:44 +00005463
5464 ac_cv_no_strict_aliasing=no
5465
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005468fi
5469
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005470 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5473$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005474 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475 then
5476 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5477 fi
5478
5479 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5480 # support. Without this, treatment of subnormals doesn't follow
5481 # the standard.
5482 case $ac_sys_machine in
5483 alpha*)
5484 BASECFLAGS="$BASECFLAGS -mieee"
5485 ;;
5486 esac
5487
5488 case $ac_sys_system in
5489 SCO_SV*)
5490 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5491 ;;
5492 # is there any other compiler on Darwin besides gcc?
5493 Darwin*)
5494 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5495 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005496 if test "${CC}" = gcc
5497 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5499$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005500 case "${UNIVERSALSDK}" in
5501 */MacOSX10.4u.sdk)
5502 # Build using 10.4 SDK, force usage of gcc when the
5503 # compiler is gcc, otherwise the user will get very
5504 # confusing error messages when building on OSX 10.6
5505 CC=gcc-4.0
5506 CPP=cpp-4.0
5507 ;;
5508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5510$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005511 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512
5513
5514 if test "${enable_universalsdk}"; then
5515 UNIVERSAL_ARCH_FLAGS=""
5516 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5517 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5518 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005519 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5521 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005522 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005523 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
5525 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5526 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005527 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005528 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005530 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5531 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005532 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005533 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005534
5535 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5536 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005537 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005538 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005541 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 +00005542
5543 fi
5544
5545
Ronald Oussoren666028b2010-04-18 19:07:43 +00005546 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5547 if test "${UNIVERSALSDK}" != "/"
5548 then
5549 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5550 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005551 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552 fi
5553 fi
5554
5555 # Calculate the right deployment target for this build.
5556 #
5557 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5558 if test ${cur_target} '>' 10.2; then
5559 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005560 if test ${enable_universalsdk}; then
5561 if test "${UNIVERSAL_ARCHS}" = "all"; then
5562 # Ensure that the default platform for a
5563 # 4-way universal build is OSX 10.5,
5564 # that's the first OS release where
5565 # 4-way builds make sense.
5566 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005567
5568 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5569 cur_target='10.5'
5570
5571 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5572 cur_target='10.5'
5573
5574 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5575 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005576 fi
5577 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005578 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005579 # On Intel macs default to a deployment
5580 # target of 10.4, that's the first OSX
5581 # release with Intel support.
5582 cur_target="10.4"
5583 fi
5584 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 fi
5586 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5587
5588 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5589 # environment with a value that is the same as what we'll use
5590 # in the Makefile to ensure that we'll get the same compiler
5591 # environment during configure and build time.
5592 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5593 export MACOSX_DEPLOYMENT_TARGET
5594 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5595
5596 ;;
5597 OSF*)
5598 BASECFLAGS="$BASECFLAGS -mieee"
5599 ;;
5600 esac
5601 ;;
5602
5603*)
5604 case $ac_sys_system in
5605 OpenUNIX*|UnixWare*)
5606 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5607 ;;
5608 OSF*)
5609 BASECFLAGS="$BASECFLAGS -ieee -std"
5610 ;;
5611 SCO_SV*)
5612 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5613 ;;
5614 esac
5615 ;;
5616esac
5617
5618if test "$Py_DEBUG" = 'true'; then
5619 :
5620else
5621 OPT="-DNDEBUG $OPT"
5622fi
5623
5624if test "$ac_arch_flags"
5625then
5626 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5627fi
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check whether GCC supports PyArg_ParseTuple format
5630if test "$GCC" = "yes"
5631then
Matthias Kloseb9621712010-04-24 17:59:49 +00005632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5633$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634 save_CFLAGS=$CFLAGS
5635 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637/* end confdefs.h. */
5638
5639 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640int
5641main ()
5642{
5643
5644 ;
5645 return 0;
5646}
Matthias Kloseb159a552010-04-25 21:00:44 +00005647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005649if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
Matthias Kloseb159a552010-04-25 21:00:44 +00005651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
Matthias Kloseb159a552010-04-25 21:00:44 +00005654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005655$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657else
Matthias Kloseb159a552010-04-25 21:00:44 +00005658
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005660$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
5662fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5664 CFLAGS=$save_CFLAGS
5665fi
5666
5667# On some compilers, pthreads are available without further options
5668# (e.g. MacOS X). On some of these systems, the compiler will not
5669# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5670# So we have to see first whether pthreads are available without
5671# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5673$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005674if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676else
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 ac_cv_pthread_is_default=no
5679else
Matthias Kloseb9621712010-04-24 17:59:49 +00005680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681/* end confdefs.h. */
5682
5683#include <pthread.h>
5684
5685void* routine(void* p){return NULL;}
5686
5687int main(){
5688 pthread_t p;
5689 if(pthread_create(&p,NULL,routine,NULL)!=0)
5690 return 1;
5691 (void)pthread_detach(p);
5692 return 0;
5693}
5694
5695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698 ac_cv_pthread_is_default=yes
5699 ac_cv_kthread=no
5700 ac_cv_pthread=no
5701
5702else
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707fi
5708
5709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710fi
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5713$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715
5716if test $ac_cv_pthread_is_default = yes
5717then
5718 ac_cv_kpthread=no
5719else
5720# -Kpthread, if available, provides the right #defines
5721# and linker options to make pthread_create available
5722# Some compilers won't report that they do not support -Kpthread,
5723# so we need to run a program to see whether it really made the
5724# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5726$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005727if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
5730 ac_save_cc="$CC"
5731CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 ac_cv_kpthread=no
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736/* end confdefs.h. */
5737
5738#include <pthread.h>
5739
5740void* routine(void* p){return NULL;}
5741
5742int main(){
5743 pthread_t p;
5744 if(pthread_create(&p,NULL,routine,NULL)!=0)
5745 return 1;
5746 (void)pthread_detach(p);
5747 return 0;
5748}
5749
5750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_kpthread=yes
5753else
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758fi
5759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760CC="$ac_save_cc"
5761fi
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5764$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
5767if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5768then
5769# -Kthread, if available, provides the right #defines
5770# and linker options to make pthread_create available
5771# Some compilers won't report that they do not support -Kthread,
5772# so we need to run a program to see whether it really made the
5773# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5775$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005776if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
5779 ac_save_cc="$CC"
5780CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 ac_cv_kthread=no
5783else
Matthias Kloseb9621712010-04-24 17:59:49 +00005784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785/* end confdefs.h. */
5786
5787#include <pthread.h>
5788
5789void* routine(void* p){return NULL;}
5790
5791int main(){
5792 pthread_t p;
5793 if(pthread_create(&p,NULL,routine,NULL)!=0)
5794 return 1;
5795 (void)pthread_detach(p);
5796 return 0;
5797}
5798
5799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 ac_cv_kthread=yes
5802else
Matthias Kloseb9621712010-04-24 17:59:49 +00005803 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807fi
5808
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809CC="$ac_save_cc"
5810fi
5811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5813$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
5815
5816if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5817then
5818# -pthread, if available, provides the right #defines
5819# and linker options to make pthread_create available
5820# Some compilers won't report that they do not support -pthread,
5821# so we need to run a program to see whether it really made the
5822# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5824$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005825if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827else
5828 ac_save_cc="$CC"
5829CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005830if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 ac_cv_pthread=no
5832else
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834/* end confdefs.h. */
5835
5836#include <pthread.h>
5837
5838void* routine(void* p){return NULL;}
5839
5840int main(){
5841 pthread_t p;
5842 if(pthread_create(&p,NULL,routine,NULL)!=0)
5843 return 1;
5844 (void)pthread_detach(p);
5845 return 0;
5846}
5847
5848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 ac_cv_pthread=yes
5851else
Matthias Kloseb9621712010-04-24 17:59:49 +00005852 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856fi
5857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858CC="$ac_save_cc"
5859fi
5860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5862$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863fi
5864
5865# If we have set a CC compiler flag for thread support then
5866# check if it works for CXX, too.
5867ac_cv_cxx_thread=no
5868if test ! -z "$CXX"
5869then
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5871$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872ac_save_cxx="$CXX"
5873
5874if test "$ac_cv_kpthread" = "yes"
5875then
5876 CXX="$CXX -Kpthread"
5877 ac_cv_cxx_thread=yes
5878elif test "$ac_cv_kthread" = "yes"
5879then
5880 CXX="$CXX -Kthread"
5881 ac_cv_cxx_thread=yes
5882elif test "$ac_cv_pthread" = "yes"
5883then
5884 CXX="$CXX -pthread"
5885 ac_cv_cxx_thread=yes
5886fi
5887
5888if test $ac_cv_cxx_thread = yes
5889then
5890 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5891 $CXX -c conftest.$ac_ext 2>&5
5892 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5893 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5894 then
5895 ac_cv_cxx_thread=yes
5896 else
5897 ac_cv_cxx_thread=no
5898 fi
5899 rm -fr conftest*
5900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5902$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903fi
5904CXX="$ac_save_cxx"
5905
5906
5907# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5909$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005910if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912else
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914/* end confdefs.h. */
5915#include <stdlib.h>
5916#include <stdarg.h>
5917#include <string.h>
5918#include <float.h>
5919
5920int
5921main ()
5922{
5923
5924 ;
5925 return 0;
5926}
5927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005928if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ac_cv_header_stdc=yes
5930else
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5934
5935if test $ac_cv_header_stdc = yes; then
5936 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938/* end confdefs.h. */
5939#include <string.h>
5940
5941_ACEOF
5942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005943 $EGREP "memchr" >/dev/null 2>&1; then :
5944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945else
5946 ac_cv_header_stdc=no
5947fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005948rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
5950fi
5951
5952if test $ac_cv_header_stdc = yes; then
5953 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955/* end confdefs.h. */
5956#include <stdlib.h>
5957
5958_ACEOF
5959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $EGREP "free" >/dev/null 2>&1; then :
5961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
5963 ac_cv_header_stdc=no
5964fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005965rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966
5967fi
5968
5969if test $ac_cv_header_stdc = yes; then
5970 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 :
5973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975/* end confdefs.h. */
5976#include <ctype.h>
5977#include <stdlib.h>
5978#if ((' ' & 0x0FF) == 0x020)
5979# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5980# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5981#else
5982# define ISLOWER(c) \
5983 (('a' <= (c) && (c) <= 'i') \
5984 || ('j' <= (c) && (c) <= 'r') \
5985 || ('s' <= (c) && (c) <= 'z'))
5986# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5987#endif
5988
5989#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5990int
5991main ()
5992{
5993 int i;
5994 for (i = 0; i < 256; i++)
5995 if (XOR (islower (i), ISLOWER (i))
5996 || toupper (i) != TOUPPER (i))
5997 return 2;
5998 return 0;
5999}
6000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006001if ac_fn_c_try_run "$LINENO"; then :
6002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003else
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010fi
6011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6013$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014if test $ac_cv_header_stdc = yes; then
6015
Matthias Kloseb9621712010-04-24 17:59:49 +00006016$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017
6018fi
6019
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006020for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6021fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006022ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006023shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006024unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006025sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6026sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006027sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6028sys/stat.h sys/termio.h sys/time.h \
6029sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6030libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006031bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006032do :
6033 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6034ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006035if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006036 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006037#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006038_ACEOF
6039
6040fi
6041
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042done
6043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006045for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6048$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006049if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006051else
Matthias Kloseb9621712010-04-24 17:59:49 +00006052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006053/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054#include <sys/types.h>
6055#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006056
Martin v. Löwis11437992002-04-12 09:54:03 +00006057int
6058main ()
6059{
6060if ((DIR *) 0)
6061return 0;
6062 ;
6063 return 0;
6064}
6065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006067 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006068else
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006073eval ac_res=\$$as_ac_Header
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6075$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006076if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006078#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006079_ACEOF
6080
6081ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006082fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006084done
6085# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6086if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6088$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006089if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091else
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096/* Override any GCC internal prototype to avoid an error.
6097 Use char because int might match the return type of a GCC
6098 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006099#ifdef __cplusplus
6100extern "C"
6101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006102char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006103int
6104main ()
6105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006107 ;
6108 return 0;
6109}
6110_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111for ac_lib in '' dir; do
6112 if test -z "$ac_lib"; then
6113 ac_res="none required"
6114 else
6115 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006116 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006121rm -f core conftest.err conftest.$ac_objext \
6122 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006123 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006127if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129else
6130 ac_cv_search_opendir=no
6131fi
6132rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006133LIBS=$ac_func_search_save_LIBS
6134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6136$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006138if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006142
Michael W. Hudson54241132001-12-07 15:38:26 +00006143else
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6145$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006146if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006148else
6149 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153/* Override any GCC internal prototype to avoid an error.
6154 Use char because int might match the return type of a GCC
6155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006156#ifdef __cplusplus
6157extern "C"
6158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006159char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 ;
6165 return 0;
6166}
6167_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168for ac_lib in '' x; do
6169 if test -z "$ac_lib"; then
6170 ac_res="none required"
6171 else
6172 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006173 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006178rm -f core conftest.err conftest.$ac_objext \
6179 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006180 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006184if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186else
6187 ac_cv_search_opendir=no
6188fi
6189rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006190LIBS=$ac_func_search_save_LIBS
6191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6193$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006195if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198fi
6199
6200fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006201
Matthias Kloseb9621712010-04-24 17:59:49 +00006202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6203$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006204if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206else
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210int
6211main ()
6212{
6213return makedev(0, 0);
6214 ;
6215 return 0;
6216}
6217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006218if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219 ac_cv_header_sys_types_h_makedev=yes
6220else
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006223rm -f core conftest.err conftest.$ac_objext \
6224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6228$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229
6230if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006231ac_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 +00006232if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235
6236fi
6237
6238
6239
6240 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 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 +00006242if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006243
Matthias Kloseb9621712010-04-24 17:59:49 +00006244$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245
6246fi
6247
6248
6249 fi
6250fi
6251
Michael W. Hudson54241132001-12-07 15:38:26 +00006252
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006253# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006254for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006255do :
6256 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006257#ifdef HAVE_CURSES_H
6258#include <curses.h>
6259#endif
6260
Matthias Kloseb9621712010-04-24 17:59:49 +00006261"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006262if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006264#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006265_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006266
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006267fi
6268
6269done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006270
6271
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006273for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006274do :
6275 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 +00006276#ifdef HAVE_ASM_TYPES_H
6277#include <asm/types.h>
6278#endif
6279#ifdef HAVE_SYS_SOCKET_H
6280#include <sys/socket.h>
6281#endif
6282
Matthias Kloseb9621712010-04-24 17:59:49 +00006283"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006284if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006285 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006286#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006287_ACEOF
6288
6289fi
6290
6291done
6292
6293
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006295was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6297$as_echo_n "checking for clock_t in time.h... " >&6; }
6298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006301
6302_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006305 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006306else
Martin v. Löwis11437992002-04-12 09:54:03 +00006307
6308
Matthias Kloseb9621712010-04-24 17:59:49 +00006309$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006310
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006311
Guido van Rossum627b2d71993-12-24 10:39:16 +00006312fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006313rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006314
Matthias Kloseb9621712010-04-24 17:59:49 +00006315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6316$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006317
Neal Norwitz11690112002-07-30 01:08:28 +00006318# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6320$as_echo_n "checking for makedev... " >&6; }
6321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006322/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006323
Jesus Cea740f53a2010-04-28 11:35:30 +00006324#if defined(MAJOR_IN_MKDEV)
6325#include <sys/mkdev.h>
6326#elif defined(MAJOR_IN_SYSMACROS)
6327#include <sys/sysmacros.h>
6328#else
6329#include <sys/types.h>
6330#endif
6331
Neal Norwitz11690112002-07-30 01:08:28 +00006332int
6333main ()
6334{
Jesus Cea740f53a2010-04-28 11:35:30 +00006335
6336 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006337 ;
6338 return 0;
6339}
Matthias Kloseb159a552010-04-25 21:00:44 +00006340
Neal Norwitz11690112002-07-30 01:08:28 +00006341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006342if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006343 ac_cv_has_makedev=yes
6344else
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006347rm -f core conftest.err conftest.$ac_objext \
6348 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006349if test "$ac_cv_has_makedev" = "no"; then
6350 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006352/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006353
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006354#define _OSF_SOURCE 1
6355#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006356
Neal Norwitz11690112002-07-30 01:08:28 +00006357int
6358main ()
6359{
6360 makedev(0, 0)
6361 ;
6362 return 0;
6363}
6364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006365if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006366 ac_cv_has_makedev=yes
6367else
Matthias Kloseb9621712010-04-24 17:59:49 +00006368 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006370rm -f core conftest.err conftest.$ac_objext \
6371 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006372 if test "$ac_cv_has_makedev" = "yes"; then
6373
Matthias Kloseb9621712010-04-24 17:59:49 +00006374$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006375
6376 fi
6377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6379$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006380if test "$ac_cv_has_makedev" = "yes"; then
6381
Matthias Kloseb9621712010-04-24 17:59:49 +00006382$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006383
6384fi
6385
Martin v. Löwis399a6892002-10-04 10:22:02 +00006386# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6387# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6388# defined, but the compiler does not support pragma redefine_extname,
6389# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6390# structures (such as rlimit64) without declaring them. As a
6391# work-around, disable LFS on such configurations
6392
6393use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6395$as_echo_n "checking Solaris LFS bug... " >&6; }
6396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006397/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006398
6399#define _LARGEFILE_SOURCE 1
6400#define _FILE_OFFSET_BITS 64
6401#include <sys/resource.h>
6402
Martin v. Löwis399a6892002-10-04 10:22:02 +00006403int
6404main ()
6405{
6406struct rlimit foo;
6407 ;
6408 return 0;
6409}
6410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006412 sol_lfs_bug=no
6413else
Matthias Kloseb9621712010-04-24 17:59:49 +00006414 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6418$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006419if test "$sol_lfs_bug" = "yes"; then
6420 use_lfs=no
6421fi
6422
6423if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006424# Two defines needed to enable largefile support on various platforms
6425# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006426case $ac_sys_system/$ac_sys_release in
6427AIX*)
6428
6429$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6430
6431 ;;
6432esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006435
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006438
Martin v. Löwis399a6892002-10-04 10:22:02 +00006439fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006440
Guido van Rossum84e7b241996-08-19 21:59:00 +00006441# Add some code to confdefs.h so that the test for off_t works on SCO
6442cat >> confdefs.h <<\EOF
6443#if defined(SCO_DS)
6444#undef _OFF_T
6445#endif
6446EOF
6447
Guido van Rossumef2255b2000-03-10 22:30:29 +00006448# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006449ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006450if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452else
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454cat >>confdefs.h <<_ACEOF
6455#define mode_t int
6456_ACEOF
6457
6458fi
6459
Matthias Kloseb9621712010-04-24 17:59:49 +00006460ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006461if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463else
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006467_ACEOF
6468
6469fi
6470
Matthias Kloseb9621712010-04-24 17:59:49 +00006471ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006472if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474else
Martin v. Löwis11437992002-04-12 09:54:03 +00006475
6476cat >>confdefs.h <<_ACEOF
6477#define pid_t int
6478_ACEOF
6479
6480fi
6481
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006482
Martin v. Löwis11437992002-04-12 09:54:03 +00006483cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006484#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006488if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490else
Martin v. Löwis11437992002-04-12 09:54:03 +00006491
6492cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006494_ACEOF
6495
6496fi
6497
Matthias Kloseb9621712010-04-24 17:59:49 +00006498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6499$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006500if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006501 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006502else
Matthias Kloseb9621712010-04-24 17:59:49 +00006503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006509 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510 ac_cv_type_uid_t=yes
6511else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512 ac_cv_type_uid_t=no
6513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006514rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6518$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006519if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520
Matthias Kloseb9621712010-04-24 17:59:49 +00006521$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525
6526fi
6527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6529case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006530 no|yes) ;; #(
6531 *)
6532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006534
6535
6536cat >>confdefs.h <<_ACEOF
6537#define uint32_t $ac_cv_c_uint32_t
6538_ACEOF
6539;;
6540 esac
6541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6543case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006544 no|yes) ;; #(
6545 *)
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006548
6549
6550cat >>confdefs.h <<_ACEOF
6551#define uint64_t $ac_cv_c_uint64_t
6552_ACEOF
6553;;
6554 esac
6555
Matthias Kloseb9621712010-04-24 17:59:49 +00006556ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6557case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006558 no|yes) ;; #(
6559 *)
6560
6561cat >>confdefs.h <<_ACEOF
6562#define int32_t $ac_cv_c_int32_t
6563_ACEOF
6564;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006565esac
6566
Matthias Kloseb9621712010-04-24 17:59:49 +00006567ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6568case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006569 no|yes) ;; #(
6570 *)
6571
6572cat >>confdefs.h <<_ACEOF
6573#define int64_t $ac_cv_c_int64_t
6574_ACEOF
6575;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006576esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006579if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006580
Matthias Kloseb9621712010-04-24 17:59:49 +00006581$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006582
6583fi
6584
Jack Jansendd19cf82001-12-06 22:36:17 +00006585
Michael W. Hudson54241132001-12-07 15:38:26 +00006586# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006587# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588# The cast to long int works around a bug in the HP C Compiler
6589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6591# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6593$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006594if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006596else
Matthias Kloseb9621712010-04-24 17:59:49 +00006597 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 +00006598
Martin v. Löwis11437992002-04-12 09:54:03 +00006599else
Matthias Kloseb9621712010-04-24 17:59:49 +00006600 if test "$ac_cv_type_int" = yes; then
6601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006603as_fn_error 77 "cannot compute sizeof (int)
6604See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006605 else
6606 ac_cv_sizeof_int=0
6607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006609
Martin v. Löwis11437992002-04-12 09:54:03 +00006610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6612$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613
6614
6615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006617#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006618_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006619
6620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621# The cast to long int works around a bug in the HP C Compiler
6622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6626$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006627if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006629else
Matthias Kloseb9621712010-04-24 17:59:49 +00006630 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 +00006631
Martin v. Löwis11437992002-04-12 09:54:03 +00006632else
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 if test "$ac_cv_type_long" = yes; then
6634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006636as_fn_error 77 "cannot compute sizeof (long)
6637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638 else
6639 ac_cv_sizeof_long=0
6640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6645$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646
6647
6648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006650#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006651_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006652
6653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654# The cast to long int works around a bug in the HP C Compiler
6655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6659$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006660if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006662else
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 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 +00006664
Martin v. Löwis11437992002-04-12 09:54:03 +00006665else
Matthias Kloseb9621712010-04-24 17:59:49 +00006666 if test "$ac_cv_type_void_p" = yes; then
6667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006669as_fn_error 77 "cannot compute sizeof (void *)
6670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 else
6672 ac_cv_sizeof_void_p=0
6673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6678$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679
6680
6681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006683#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006685
6686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687# The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6692$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006693if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 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 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 if test "$ac_cv_type_short" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006702as_fn_error 77 "cannot compute sizeof (short)
6703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704 else
6705 ac_cv_sizeof_short=0
6706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6711$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712
6713
6714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006716#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006717_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006718
6719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720# The cast to long int works around a bug in the HP C Compiler
6721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6725$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006726if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 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 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731else
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 if test "$ac_cv_type_float" = yes; then
6733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006735as_fn_error 77 "cannot compute sizeof (float)
6736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737 else
6738 ac_cv_sizeof_float=0
6739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6744$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745
6746
6747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751
6752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6758$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006759if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 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 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 if test "$ac_cv_type_double" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006768as_fn_error 77 "cannot compute sizeof (double)
6769See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770 else
6771 ac_cv_sizeof_double=0
6772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6777$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778
6779
6780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784
6785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786# The cast to long int works around a bug in the HP C Compiler
6787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6791$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006792if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 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 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 if test "$ac_cv_type_fpos_t" = yes; then
6799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006801as_fn_error 77 "cannot compute sizeof (fpos_t)
6802See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803 else
6804 ac_cv_sizeof_fpos_t=0
6805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6810$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811
6812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006815#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006817
Michael W. Hudson54241132001-12-07 15:38:26 +00006818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6824$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006825if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 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 +00006829
Martin v. Löwis18e16552006-02-15 17:27:45 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 if test "$ac_cv_type_size_t" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006834as_fn_error 77 "cannot compute sizeof (size_t)
6835See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836 else
6837 ac_cv_sizeof_size_t=0
6838 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840
Martin v. Löwis18e16552006-02-15 17:27:45 +00006841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6843$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844
6845
6846
Martin v. Löwis18e16552006-02-15 17:27:45 +00006847cat >>confdefs.h <<_ACEOF
6848#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6849_ACEOF
6850
6851
Christian Heimes400adb02008-02-01 08:12:03 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6857$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006858if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 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 +00006862
Christian Heimes400adb02008-02-01 08:12:03 +00006863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 if test "$ac_cv_type_pid_t" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006867as_fn_error 77 "cannot compute sizeof (pid_t)
6868See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006869 else
6870 ac_cv_sizeof_pid_t=0
6871 fi
6872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873
Christian Heimes400adb02008-02-01 08:12:03 +00006874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6876$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006877
6878
6879
6880cat >>confdefs.h <<_ACEOF
6881#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6882_ACEOF
6883
6884
Michael W. Hudson54241132001-12-07 15:38:26 +00006885
Matthias Kloseb9621712010-04-24 17:59:49 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6887$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006888have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006890/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892int
6893main ()
6894{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006895long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006896 ;
6897 return 0;
6898}
6899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006901
6902
Matthias Kloseb9621712010-04-24 17:59:49 +00006903$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006904
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006905 have_long_long=yes
6906
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6910$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006911if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912# The cast to long int works around a bug in the HP C Compiler
6913# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6914# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6915# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6917$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006918if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006919 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 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 +00006922
Martin v. Löwis11437992002-04-12 09:54:03 +00006923else
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 if test "$ac_cv_type_long_long" = yes; then
6925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006927as_fn_error 77 "cannot compute sizeof (long long)
6928See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929 else
6930 ac_cv_sizeof_long_long=0
6931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6936$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937
6938
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006941#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006942_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006943
Michael W. Hudson54241132001-12-07 15:38:26 +00006944
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006945fi
6946
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6948$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006949have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951/* end confdefs.h. */
6952
6953int
6954main ()
6955{
6956long double x; x = (long double)0;
6957 ;
6958 return 0;
6959}
6960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006961if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006962
6963
Matthias Kloseb9621712010-04-24 17:59:49 +00006964$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965
6966 have_long_double=yes
6967
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6971$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973# The cast to long int works around a bug in the HP C Compiler
6974# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6975# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6976# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6978$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006979if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981else
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 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 +00006983
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 if test "$ac_cv_type_long_double" = yes; then
6986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006988as_fn_error 77 "cannot compute sizeof (long double)
6989See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006990 else
6991 ac_cv_sizeof_long_double=0
6992 fi
6993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006994
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6997$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006998
6999
7000
7001cat >>confdefs.h <<_ACEOF
7002#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7003_ACEOF
7004
7005
7006fi
7007
7008
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7010$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007011have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007013/* end confdefs.h. */
7014
7015int
7016main ()
7017{
7018_Bool x; x = (_Bool)0;
7019 ;
7020 return 0;
7021}
7022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007024
7025
Matthias Kloseb9621712010-04-24 17:59:49 +00007026$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007027
7028 have_c99_bool=yes
7029
Thomas Woutersb2137042007-02-01 18:02:27 +00007030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7033$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007034if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035# The cast to long int works around a bug in the HP C Compiler
7036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7040$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007041if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 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 +00007045
Thomas Woutersb2137042007-02-01 18:02:27 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if test "$ac_cv_type__Bool" = yes; then
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007050as_fn_error 77 "cannot compute sizeof (_Bool)
7051See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007052 else
7053 ac_cv_sizeof__Bool=0
7054 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056
Thomas Woutersb2137042007-02-01 18:02:27 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7059$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060
7061
7062
Thomas Woutersb2137042007-02-01 18:02:27 +00007063cat >>confdefs.h <<_ACEOF
7064#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7065_ACEOF
7066
7067
7068fi
7069
Matthias Kloseb9621712010-04-24 17:59:49 +00007070ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007071 #include <stdint.h>
7072 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007073 #ifdef HAVE_INTTYPES_H
7074 #include <inttypes.h>
7075 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007076"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007077if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007078
7079cat >>confdefs.h <<_ACEOF
7080#define HAVE_UINTPTR_T 1
7081_ACEOF
7082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083# The cast to long int works around a bug in the HP C Compiler
7084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7086# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7088$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007089if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007090 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007091else
Matthias Kloseb9621712010-04-24 17:59:49 +00007092 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 +00007093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094else
Matthias Kloseb9621712010-04-24 17:59:49 +00007095 if test "$ac_cv_type_uintptr_t" = yes; then
7096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007098as_fn_error 77 "cannot compute sizeof (uintptr_t)
7099See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007100 else
7101 ac_cv_sizeof_uintptr_t=0
7102 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7107$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108
7109
7110
Martin v. Löwis11437992002-04-12 09:54:03 +00007111cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007112#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007113_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007114
Michael W. Hudson54241132001-12-07 15:38:26 +00007115
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007116fi
7117
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007119# The cast to long int works around a bug in the HP C Compiler
7120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7122# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7124$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007125if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127else
Matthias Kloseb9621712010-04-24 17:59:49 +00007128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007129#ifdef HAVE_SYS_TYPES_H
7130#include <sys/types.h>
7131#endif
7132
Matthias Kloseb9621712010-04-24 17:59:49 +00007133"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 if test "$ac_cv_type_off_t" = yes; then
7137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007139as_fn_error 77 "cannot compute sizeof (off_t)
7140See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007141 else
7142 ac_cv_sizeof_off_t=0
7143 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7148$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007150
7151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007153#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007154_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007155
Michael W. Hudson54241132001-12-07 15:38:26 +00007156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7159$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007160if test "$have_long_long" = yes
7161then
7162if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007163 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007164
Matthias Kloseb9621712010-04-24 17:59:49 +00007165$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7168$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007172fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7175$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007176fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178# The cast to long int works around a bug in the HP C Compiler
7179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7181# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7183$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007184if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188#ifdef HAVE_SYS_TYPES_H
7189#include <sys/types.h>
7190#endif
7191#ifdef HAVE_TIME_H
7192#include <time.h>
7193#endif
7194
Matthias Kloseb9621712010-04-24 17:59:49 +00007195"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if test "$ac_cv_type_time_t" = yes; then
7199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007201as_fn_error 77 "cannot compute sizeof (time_t)
7202See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203 else
7204 ac_cv_sizeof_time_t=0
7205 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007207
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7210$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212
7213
Martin v. Löwis11437992002-04-12 09:54:03 +00007214cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007215#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
7219
Trent Mick635f6fb2000-08-23 21:33:05 +00007220# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007221ac_save_cc="$CC"
7222if test "$ac_cv_kpthread" = "yes"
7223then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007224elif test "$ac_cv_kthread" = "yes"
7225then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007226elif test "$ac_cv_pthread" = "yes"
7227then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007228fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007229
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7231$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007232have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007234/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007235
7236 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007237int
7238main ()
7239{
Guido van Rossum12580492000-09-24 16:47:19 +00007240pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007241 ;
7242 return 0;
7243}
Matthias Kloseb159a552010-04-25 21:00:44 +00007244
Martin v. Löwis11437992002-04-12 09:54:03 +00007245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007246if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007247 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7251$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007252if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7255# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7256# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7258$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007259if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261else
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007263#ifdef HAVE_PTHREAD_H
7264#include <pthread.h>
7265#endif
7266
Matthias Kloseb9621712010-04-24 17:59:49 +00007267"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269else
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 if test "$ac_cv_type_pthread_t" = yes; then
7271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007273as_fn_error 77 "cannot compute sizeof (pthread_t)
7274See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275 else
7276 ac_cv_sizeof_pthread_t=0
7277 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279
Trent Mick635f6fb2000-08-23 21:33:05 +00007280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7282$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007284
7285
Martin v. Löwis11437992002-04-12 09:54:03 +00007286cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007287#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007288_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007290
Trent Mick635f6fb2000-08-23 21:33:05 +00007291fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007292CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007293
Michael W. Hudson54241132001-12-07 15:38:26 +00007294
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007295case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007296 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007297 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7298 ;;
7299 Darwin/*)
7300 OTHER_LIBTOOL_OPT=""
7301 ;;
7302esac
7303
7304
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007305ARCH_RUN_32BIT=""
7306
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007307case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007308 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007309 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7310 if test "${enable_universalsdk}"; then
7311 :
7312 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007313 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007314 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007315 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007316 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007317 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007318 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007319 if test ${gcc_version} '<' 4.0
7320 then
7321 LIBTOOL_CRUFT="-lcc_dynamic"
7322 else
7323 LIBTOOL_CRUFT=""
7324 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007326 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007330
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331 #include <unistd.h>
7332 int main(int argc, char*argv[])
7333 {
7334 if (sizeof(long) == 4) {
7335 return 0;
7336 } else {
7337 return 1;
7338 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007339 }
7340
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007342if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007343 ac_osx_32bit=yes
7344else
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7348 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349fi
7350
7351
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007353 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354 i386)
7355 MACOSX_DEFAULT_ARCH="i386"
7356 ;;
7357 ppc)
7358 MACOSX_DEFAULT_ARCH="ppc"
7359 ;;
7360 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007361 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007362 ;;
7363 esac
7364 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007365 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007366 i386)
7367 MACOSX_DEFAULT_ARCH="x86_64"
7368 ;;
7369 ppc)
7370 MACOSX_DEFAULT_ARCH="ppc64"
7371 ;;
7372 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007373 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007374 ;;
7375 esac
7376
7377 #ARCH_RUN_32BIT="true"
7378 fi
7379
7380 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007383esac
7384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7386$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007387if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007388then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007389 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007390 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007391 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007392
Matthias Kloseb9621712010-04-24 17:59:49 +00007393$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7396$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007397 if test $enable_shared = "yes"
7398 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007399 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 +00007400 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007404fi
7405
Matthias Kloseb9621712010-04-24 17:59:49 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7407$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007408case $ac_sys_system/$ac_sys_release in
7409 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007410
Matthias Kloseb9621712010-04-24 17:59:49 +00007411$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7414$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007415 ;;
7416 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007419 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007420esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007421
Guido van Rossum0a516c91994-09-12 10:58:40 +00007422# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007423
Michael W. Hudson54241132001-12-07 15:38:26 +00007424
7425
7426
7427
Benjamin Peterson99f03762010-04-11 22:15:28 +00007428
Thomas Wouters477c8d52006-05-27 19:21:47 +00007429
Georg Brandlb1441c72009-01-03 22:33:39 +00007430
Thomas Wouters477c8d52006-05-27 19:21:47 +00007431cat >>confdefs.h <<_ACEOF
7432#define SHLIB_EXT "$SO"
7433_ACEOF
7434
Guido van Rossum0a516c91994-09-12 10:58:40 +00007435# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007436# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007437# (Shared libraries in this instance are shared modules to be loaded into
7438# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7440$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007441if test -z "$LDSHARED"
7442then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007444 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007445 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007446 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007447 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007448 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007449 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007450 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007451 if test "$GCC" = "yes" ; then
7452 LDSHARED='$(CC) -shared'
7453 LDCXXSHARED='$(CXX) -shared'
7454 else
7455 LDSHARED='$(CC) -G'
7456 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007457 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007458 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007459 if test "$GCC" = "yes" ; then
7460 LDSHARED='$(CC) -shared'
7461 LDCXXSHARED='$(CXX) -shared'
7462 else
7463 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007464 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007465 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007466 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007467 LDSHARED='$(CC) -bundle'
7468 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007469 if test "$enable_framework" ; then
7470 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007471 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7472 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007473 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007474 else
7475 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007476 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007477 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007478 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007480 LDSHARED='$(CC) -bundle'
7481 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007482 if test "$enable_framework" ; then
7483 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007484 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7485 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007486 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007487 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007488 # No framework, use the Python app as bundle-loader
7489 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007490 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007491 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 Darwin/*)
7494 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7495 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007496
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007497 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007498 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007499 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007500 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007501 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007502 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7503 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007504 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007505 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007506 LDSHARED='$(CC) -bundle'
7507 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007508 if test "$enable_framework" ; then
7509 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007510 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7511 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007513 else
7514 # No framework, use the Python app as bundle-loader
7515 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7516 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007517 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007518 fi
7519 fi
7520 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 Linux*|GNU*|QNX*)
7522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared';;
7524 BSD/OS*/4*)
7525 LDSHARED="gcc -shared"
7526 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007527 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007529 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007530 LDSHARED='$(CC) -shared'
7531 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007532 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007533 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007534 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007535 OpenBSD*)
7536 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7537 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007538 LDSHARED='$(CC) -shared $(CCSHARED)'
7539 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007540 else
7541 case `uname -r` in
7542 [01].* | 2.[0-7] | 2.[0-7].*)
7543 LDSHARED="ld -Bshareable ${LDFLAGS}"
7544 ;;
7545 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007546 LDSHARED='$(CC) -shared $(CCSHARED)'
7547 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007548 ;;
7549 esac
7550 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007552 LDSHARED='$(CC) -shared'
7553 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007554 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007555 if test "$GCC" = "yes" ; then
7556 LDSHARED='$(CC) -shared'
7557 LDCXXSHARED='$(CXX) -shared'
7558 else
7559 LDSHARED='$(CC) -G'
7560 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007561 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562 SCO_SV*)
7563 LDSHARED='$(CC) -Wl,-G,-Bexport'
7564 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7565 CYGWIN*)
7566 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7567 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007568 *) LDSHARED="ld";;
7569 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7572$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007573LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007574BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007575# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007576# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7578$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007579if test -z "$CCSHARED"
7580then
Guido van Rossum07397971997-04-29 21:49:50 +00007581 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007582 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007583 then CCSHARED="-fPIC";
7584 elif test `uname -p` = sparc;
7585 then CCSHARED="-xcode=pic32";
7586 else CCSHARED="-Kpic";
7587 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007588 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007589 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007590 else CCSHARED="+z";
7591 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007592 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007593 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007594 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007595 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007596 if test "$GCC" = "yes"
7597 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007598 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007599 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007600 SCO_SV*)
7601 if test "$GCC" = "yes"
7602 then CCSHARED="-fPIC"
7603 else CCSHARED="-Kpic -belf"
7604 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007605 IRIX*/6*) case $CC in
7606 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007607 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007608 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007609 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7612$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007613# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007614# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7616$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617if test -z "$LINKFORSHARED"
7618then
Guido van Rossum07397971997-04-29 21:49:50 +00007619 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007620 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007621 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007622 LINKFORSHARED="-Wl,-E -Wl,+s";;
7623# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007624 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007625 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007626 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007628 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007629 if test "$enable_framework"
7630 then
Jack Jansenda49e192005-01-07 13:08:22 +00007631 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007632 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007633 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007634 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007635 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007636 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007637 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007638 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7639 then
7640 LINKFORSHARED="-Wl,--export-dynamic"
7641 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007642 SunOS/5*) case $CC in
7643 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007644 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007645 then
7646 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007647 fi;;
7648 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007649 CYGWIN*)
7650 if test $enable_shared = "no"
7651 then
7652 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7653 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007654 QNX*)
7655 # -Wl,-E causes the symbols to be added to the dynamic
7656 # symbol table so that they can be found when a module
7657 # is loaded. -N 2048K causes the stack size to be set
7658 # to 2048 kilobytes so that the stack doesn't overflow
7659 # when running test_compile.py.
7660 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007661 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7664$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007665
Michael W. Hudson54241132001-12-07 15:38:26 +00007666
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7669$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007670if test ! "$LIBRARY" = "$LDLIBRARY"
7671then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007672 case $ac_sys_system in
7673 CYGWIN*)
7674 # Cygwin needs CCSHARED when building extension DLLs
7675 # but not when building the interpreter DLL.
7676 CFLAGSFORSHARED='';;
7677 *)
7678 CFLAGSFORSHARED='$(CCSHARED)'
7679 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7682$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007683
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7685# library (with --enable-shared).
7686# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007687# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7688# if it is not required, since it creates a dependency of the shared library
7689# to LIBS. This, in turn, means that applications linking the shared libpython
7690# don't need to link LIBS explicitly. The default should be only changed
7691# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007692
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7694$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007695case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007696 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007697 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007698esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7700$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007701
7702
Guido van Rossum627b2d71993-12-24 10:39:16 +00007703# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7705$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007706if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007707 $as_echo_n "(cached) " >&6
7708else
7709 ac_check_lib_save_LIBS=$LIBS
7710LIBS="-lsendfile $LIBS"
7711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7712/* end confdefs.h. */
7713
7714/* Override any GCC internal prototype to avoid an error.
7715 Use char because int might match the return type of a GCC
7716 builtin and then its argument prototype would still apply. */
7717#ifdef __cplusplus
7718extern "C"
7719#endif
7720char sendfile ();
7721int
7722main ()
7723{
7724return sendfile ();
7725 ;
7726 return 0;
7727}
7728_ACEOF
7729if ac_fn_c_try_link "$LINENO"; then :
7730 ac_cv_lib_sendfile_sendfile=yes
7731else
7732 ac_cv_lib_sendfile_sendfile=no
7733fi
7734rm -f core conftest.err conftest.$ac_objext \
7735 conftest$ac_exeext conftest.$ac_ext
7736LIBS=$ac_check_lib_save_LIBS
7737fi
7738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7739$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007740if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007741 cat >>confdefs.h <<_ACEOF
7742#define HAVE_LIBSENDFILE 1
7743_ACEOF
7744
7745 LIBS="-lsendfile $LIBS"
7746
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7750$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007751if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007753else
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007755LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759/* Override any GCC internal prototype to avoid an error.
7760 Use char because int might match the return type of a GCC
7761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007762#ifdef __cplusplus
7763extern "C"
7764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007765char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007766int
7767main ()
7768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ;
7771 return 0;
7772}
7773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779rm -f core conftest.err conftest.$ac_objext \
7780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7784$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007785if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 cat >>confdefs.h <<_ACEOF
7787#define HAVE_LIBDL 1
7788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007790 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792fi
7793 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7795$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007796if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007798else
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007800LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804/* Override any GCC internal prototype to avoid an error.
7805 Use char because int might match the return type of a GCC
7806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807#ifdef __cplusplus
7808extern "C"
7809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007810char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007811int
7812main ()
7813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 ;
7816 return 0;
7817}
7818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007819if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824rm -f core conftest.err conftest.$ac_objext \
7825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007826LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7829$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007830if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 cat >>confdefs.h <<_ACEOF
7832#define HAVE_LIBDLD 1
7833_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007835 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837fi
7838 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007839
Georg Brandlb1441c72009-01-03 22:33:39 +00007840# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007841if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7843$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007844if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007846else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007847 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851/* Override any GCC internal prototype to avoid an error.
7852 Use char because int might match the return type of a GCC
7853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007854#ifdef __cplusplus
7855extern "C"
7856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007857char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ;
7863 return 0;
7864}
7865_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866for ac_lib in '' pthread rt posix4; do
7867 if test -z "$ac_lib"; then
7868 ac_res="none required"
7869 else
7870 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007871 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876rm -f core conftest.err conftest.$ac_objext \
7877 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007878 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007882if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884else
7885 ac_cv_search_sem_init=no
7886fi
7887rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007888LIBS=$ac_func_search_save_LIBS
7889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7891$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007893if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007895
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007896fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007897 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007898 # posix4 on Solaris 2.6
7899 # pthread (first!) on Linux
7900fi
7901
Martin v. Löwis19d17342003-06-14 21:03:05 +00007902# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7904$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007905if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907else
7908 ac_check_lib_save_LIBS=$LIBS
7909LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007911/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913/* Override any GCC internal prototype to avoid an error.
7914 Use char because int might match the return type of a GCC
7915 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007916#ifdef __cplusplus
7917extern "C"
7918#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007920int
7921main ()
7922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007924 ;
7925 return 0;
7926}
7927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007929 ac_cv_lib_intl_textdomain=yes
7930else
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933rm -f core conftest.err conftest.$ac_objext \
7934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007935LIBS=$ac_check_lib_save_LIBS
7936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7938$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007939if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007940
Matthias Kloseb9621712010-04-24 17:59:49 +00007941$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007942
Brett Cannonc6d936e2009-06-07 20:09:53 +00007943 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007944fi
7945
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007946
7947# checks for system dependent C++ extensions support
7948case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7950$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007952/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007953
Georg Brandl59e87bd2011-02-15 19:48:59 +00007954 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007955int
7956main ()
7957{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007958loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ;
7960 return 0;
7961}
Matthias Kloseb159a552010-04-25 21:00:44 +00007962
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007964if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007965
Matthias Kloseb159a552010-04-25 21:00:44 +00007966
Matthias Kloseb9621712010-04-24 17:59:49 +00007967$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
Matthias Kloseb159a552010-04-25 21:00:44 +00007969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007970$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007971
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007972else
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007975$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007976
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978rm -f core conftest.err conftest.$ac_objext \
7979 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007980 *) ;;
7981esac
7982
Guido van Rossum70c7f481998-03-26 18:44:10 +00007983# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7985$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007986if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007988else
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007990LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994/* Override any GCC internal prototype to avoid an error.
7995 Use char because int might match the return type of a GCC
7996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007997#ifdef __cplusplus
7998extern "C"
7999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008000char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ;
8006 return 0;
8007}
8008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008014rm -f core conftest.err conftest.$ac_objext \
8015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008016LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8019$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008020if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008021 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008022fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008023 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8025$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008026if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008028else
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008030LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034/* Override any GCC internal prototype to avoid an error.
8035 Use char because int might match the return type of a GCC
8036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037#ifdef __cplusplus
8038extern "C"
8039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008040char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ;
8046 return 0;
8047}
8048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008051else
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008056LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8059$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008060if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008061 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008062fi
8063 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008064
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8066$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008069if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8072$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008073LIBS="$withval $LIBS"
8074
8075else
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078fi
8079
Guido van Rossum7f43da71994-08-01 12:15:30 +00008080
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008081if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008082 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8083set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8085$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008086if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088else
8089 case $PKG_CONFIG in
8090 [\\/]* | ?:[\\/]*)
8091 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8092 ;;
8093 *)
8094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8095for as_dir in $PATH
8096do
8097 IFS=$as_save_IFS
8098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8101 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103 break 2
8104 fi
8105done
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107IFS=$as_save_IFS
8108
8109 ;;
8110esac
8111fi
8112PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8113if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8115$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116else
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119fi
8120
8121
8122fi
8123if test -z "$ac_cv_path_PKG_CONFIG"; then
8124 ac_pt_PKG_CONFIG=$PKG_CONFIG
8125 # Extract the first word of "pkg-config", so it can be a program name with args.
8126set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8128$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008129if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008131else
8132 case $ac_pt_PKG_CONFIG in
8133 [\\/]* | ?:[\\/]*)
8134 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8135 ;;
8136 *)
8137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8138for as_dir in $PATH
8139do
8140 IFS=$as_save_IFS
8141 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8144 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008146 break 2
8147 fi
8148done
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150IFS=$as_save_IFS
8151
8152 ;;
8153esac
8154fi
8155ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8156if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8158$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008159else
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8161$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008162fi
8163
8164 if test "x$ac_pt_PKG_CONFIG" = x; then
8165 PKG_CONFIG=""
8166 else
8167 case $cross_compiling:$ac_tool_warned in
8168yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008171ac_tool_warned=yes ;;
8172esac
8173 PKG_CONFIG=$ac_pt_PKG_CONFIG
8174 fi
8175else
8176 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8177fi
8178
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008179
8180# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8182$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008183
8184# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008185if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008186 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008187else
8188 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008189fi
8190
8191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8193$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008194
8195# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8197$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008198
8199# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008200if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008201 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008202else
8203 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008204fi
8205
8206
8207if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008208 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8209else
8210 LIBFFI_INCLUDEDIR=""
8211fi
8212
8213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8215$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008216
Benjamin Peterson076ed002010-10-31 17:11:02 +00008217# Check for support for loadable sqlite extensions
8218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8219$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8220# Check whether --enable-loadable-sqlite-extensions was given.
8221if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8222 enableval=$enable_loadable_sqlite_extensions;
8223else
8224 enable_loadable_sqlite_extensions="no"
8225fi
8226
8227
8228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8229$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8230
Matthias Klose55708cc2009-04-30 08:06:49 +00008231# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8233$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008234
8235# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008236if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008237 withval=$with_dbmliborder;
8238if test x$with_dbmliborder = xyes
8239then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008240as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008241else
8242 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8243 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8244 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008245 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008246 fi
8247 done
8248fi
8249fi
8250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8252$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008253
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008254# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008255
8256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8258$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 withval=$with_signal_module;
8263fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008264
8265
8266if test -z "$with_signal_module"
8267then with_signal_module="yes"
8268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8270$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008271
8272if test "${with_signal_module}" = "yes"; then
8273 USE_SIGNAL_MODULE=""
8274 SIGNAL_OBJS=""
8275else
8276 USE_SIGNAL_MODULE="#"
8277 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8278fi
8279
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008280# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008281
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008282USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8285$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
Guido van Rossumec2f0731997-01-22 20:54:01 +00008287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008289if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8292$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008293LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008294if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008295 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008296fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300fi
8301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
8303# Templates for things AC_DEFINEd more than once.
8304# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008305
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307
8308
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8310$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 withval=$with_threads;
8315fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008316
8317
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008318# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008321if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322 withval=$with_thread; with_threads=$with_thread
8323fi
8324
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008325
8326if test -z "$with_threads"
8327then with_threads="yes"
8328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8330$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008331
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008332
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008333if test "$with_threads" = "no"
8334then
8335 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008336elif test "$ac_cv_pthread_is_default" = yes
8337then
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008339
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008340 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008342
8343 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008344 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008345elif test "$ac_cv_kpthread" = "yes"
8346then
8347 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008348 if test "$ac_cv_cxx_thread" = "yes"; then
8349 CXX="$CXX -Kpthread"
8350 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008353 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008354 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008355elif test "$ac_cv_kthread" = "yes"
8356then
8357 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008358 if test "$ac_cv_cxx_thread" = "yes"; then
8359 CXX="$CXX -Kthread"
8360 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008362
8363 posix_threads=yes
8364 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008365elif test "$ac_cv_pthread" = "yes"
8366then
8367 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008368 if test "$ac_cv_cxx_thread" = "yes"; then
8369 CXX="$CXX -pthread"
8370 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008372
8373 posix_threads=yes
8374 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008375else
8376 if test ! -z "$with_threads" -a -d "$with_threads"
8377 then LDFLAGS="$LDFLAGS -L$with_threads"
8378 fi
8379 if test ! -z "$withval" -a -d "$withval"
8380 then LDFLAGS="$LDFLAGS -L$withval"
8381 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382
8383 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008384 # define _POSIX_THREADS in unistd.h. Some apparently don't
8385 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8387$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008389/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008390
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008391#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008392#ifdef _POSIX_THREADS
8393yes
8394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008399 unistd_defines_pthreads=yes
8400else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 unistd_defines_pthreads=no
8402fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008403rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8406$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 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 +00008411if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008418
8419 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008420 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008421else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 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 +00008424if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008431
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008432 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008433else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008434
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008435 # Just looking for pthread_create in libpthread is not enough:
8436 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8437 # So we really have to include pthread.h, and then link.
8438 _libs=$LIBS
8439 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8441$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008443/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008444#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008445
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008446void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008450
8451pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ;
8453 return 0;
8454}
8455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8459$as_echo "yes" >&6; }
8460 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008461
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008462 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008463 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008464else
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008466 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008468if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008470
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008471 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008472 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008473else
Guido van Rossumad678af1998-10-02 14:42:15 +00008474
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8476$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008477if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008479else
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008481LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485/* Override any GCC internal prototype to avoid an error.
8486 Use char because int might match the return type of a GCC
8487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008488#ifdef __cplusplus
8489extern "C"
8490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008491char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008492int
8493main ()
8494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 ;
8497 return 0;
8498}
8499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008502else
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505rm -f core conftest.err conftest.$ac_objext \
8506 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008507LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8510$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008511if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008513
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008514 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008515 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008516 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008517else
Greg Steinadf63d62000-07-05 10:38:09 +00008518
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8520$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008521if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008523else
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008525LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529/* Override any GCC internal prototype to avoid an error.
8530 Use char because int might match the return type of a GCC
8531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008532#ifdef __cplusplus
8533extern "C"
8534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008535char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008536int
8537main ()
8538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 ;
8541 return 0;
8542}
8543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549rm -f core conftest.err conftest.$ac_objext \
8550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008551LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8554$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008555if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008557
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008558 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008559 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008560 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008561else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8564$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008565if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008567else
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008569LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573/* Override any GCC internal prototype to avoid an error.
8574 Use char because int might match the return type of a GCC
8575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008576#ifdef __cplusplus
8577extern "C"
8578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008579char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008580int
8581main ()
8582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ;
8585 return 0;
8586}
8587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593rm -f core conftest.err conftest.$ac_objext \
8594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008595LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8598$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008599if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008602 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008603 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008604 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008605else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8608$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008609if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008611else
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617/* Override any GCC internal prototype to avoid an error.
8618 Use char because int might match the return type of a GCC
8619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008620#ifdef __cplusplus
8621extern "C"
8622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008623char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ;
8629 return 0;
8630}
8631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008634else
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637rm -f core conftest.err conftest.$ac_objext \
8638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8642$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008643if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008646 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008647 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008648 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008649else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008650
Martin v. Löwis130fb172001-07-19 11:00:41 +00008651 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008652fi
8653
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008655fi
8656
Guido van Rossum0be3e491997-05-22 20:33:33 +00008657fi
8658
Guido van Rossum49545951997-12-02 19:28:29 +00008659fi
8660
Guido van Rossumb93a8621998-05-07 13:27:32 +00008661fi
8662
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664rm -f core conftest.err conftest.$ac_objext \
8665 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666fi
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
8669fi
8670
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008671
Michael W. Hudson54241132001-12-07 15:38:26 +00008672
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8674$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008675if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008677else
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008679LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683/* Override any GCC internal prototype to avoid an error.
8684 Use char because int might match the return type of a GCC
8685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686#ifdef __cplusplus
8687extern "C"
8688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008689char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008690int
8691main ()
8692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ;
8695 return 0;
8696}
8697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008700else
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703rm -f core conftest.err conftest.$ac_objext \
8704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8708$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008709if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008711
Martin v. Löwis130fb172001-07-19 11:00:41 +00008712 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008713 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008714 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008715fi
8716
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008717
Neal Norwitza978ab02002-11-02 16:58:05 +00008718 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8720$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008721if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008723else
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729/* Override any GCC internal prototype to avoid an error.
8730 Use char because int might match the return type of a GCC
8731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008732#ifdef __cplusplus
8733extern "C"
8734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008735char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008736int
8737main ()
8738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ;
8741 return 0;
8742}
8743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746else
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749rm -f core conftest.err conftest.$ac_objext \
8750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8754$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008755if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008757
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008758 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008759 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008760 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008761fi
8762
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008763 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008764
Martin v. Löwis130fb172001-07-19 11:00:41 +00008765 if test "$USE_THREAD_MODULE" != "#"
8766 then
8767 # If the above checks didn't disable threads, (at least) OSF1
8768 # needs this '-threads' argument during linking.
8769 case $ac_sys_system in
8770 OSF1) LDLAST=-threads;;
8771 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008772 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008775if test "$posix_threads" = "yes"; then
8776 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779
8780 fi
8781
8782 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8783 case $ac_sys_system/$ac_sys_release in
8784 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008785$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008786
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 ;;
8788 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008789$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790
8791 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008792 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008793$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008794
8795 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008796 AIX/6)
8797$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8798
8799 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 esac
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8803$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008804 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808 ac_cv_pthread_system_supported=no
8809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008811/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812#include <pthread.h>
8813 void *foo(void *parm) {
8814 return NULL;
8815 }
8816 main() {
8817 pthread_attr_t attr;
8818 pthread_t id;
8819 if (pthread_attr_init(&attr)) exit(-1);
8820 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8821 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8822 exit(0);
8823 }
8824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008825if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008826 ac_cv_pthread_system_supported=yes
8827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008832fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835fi
8836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8838$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839 if test "$ac_cv_pthread_system_supported" = "yes"; then
8840
Matthias Kloseb9621712010-04-24 17:59:49 +00008841$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008842
8843 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 for ac_func in pthread_sigmask
8845do :
8846 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008847if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008848 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008849#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008851 case $ac_sys_system in
8852 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008855
8856 ;;
8857 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008858fi
8859done
8860
8861fi
8862
8863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8867$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008874 ipv6=no
8875 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8877$as_echo "yes" >&6; }
8878 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879
8880 ipv6=yes
8881 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8888$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008889 ipv6=no
8890
8891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894 /* AF_INET6 available check */
8895#include <sys/types.h>
8896#include <sys/socket.h>
8897main()
8898{
8899 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8900 exit(1);
8901 else
8902 exit(0);
8903}
8904
Martin v. Löwis11437992002-04-12 09:54:03 +00008905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008906if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8909$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008912else
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921fi
8922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008924if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8926$as_echo_n "checking if RFC2553 API is available... " >&6; }
8927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
8930 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008931#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008936 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ;
8938 return 0;
8939}
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
Martin v. Löwis11437992002-04-12 09:54:03 +00008941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008942if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008943
8944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008945$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008946 ipv6=yes
8947
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008948else
Matthias Kloseb159a552010-04-25 21:00:44 +00008949
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008951$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008952 ipv6=no
8953
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008956fi
8957
8958if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008960
8961fi
8962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963fi
8964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965
8966ipv6type=unknown
8967ipv6lib=none
8968ipv6trylibc=no
8969
8970if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8972$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008973 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8974 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975 case $i in
8976 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980#include <netinet/in.h>
8981#ifdef IPV6_INRIA_VERSION
8982yes
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <netinet/in.h>
8997#ifdef __KAME__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=inet6
9005 ipv6libdir=/usr/local/v6/lib
9006 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <features.h>
9016#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009025rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026
9027 ;;
9028 linux-inet6)
9029 if test -d /usr/inet6; then
9030 ipv6type=$i
9031 ipv6lib=inet6
9032 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009033 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034 fi
9035 ;;
9036 solaris)
9037 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009038 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i
9040 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041 fi
9042 fi
9043 ;;
9044 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048#include <sys/param.h>
9049#ifdef _TOSHIBA_INET6
9050yes
9051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055 ipv6type=$i;
9056 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009057 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ;;
9062 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066#include </usr/local/v6/include/sys/v6config.h>
9067#ifdef __V6D__
9068yes
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 ipv6type=$i;
9074 ipv6lib=v6;
9075 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009076 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009078rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079
9080 ;;
9081 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085#include <sys/param.h>
9086#ifdef _ZETA_MINAMI_INET6
9087yes
9088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092 ipv6type=$i;
9093 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009094 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097
9098 ;;
9099 esac
9100 if test "$ipv6type" != "unknown"; then
9101 break
9102 fi
9103 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9105$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106fi
9107
9108if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9109 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9110 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9111 echo "using lib$ipv6lib"
9112 else
9113 if test $ipv6trylibc = "yes"; then
9114 echo "using libc"
9115 else
9116 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9117 echo "You need to fetch lib$ipv6lib.a from appropriate"
9118 echo 'ipv6 kit and compile beforehand.'
9119 exit 1
9120 fi
9121 fi
9122fi
9123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9125$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009127/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009128
9129 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009130int
9131main ()
9132{
9133FSIORefNum fRef = 0
9134 ;
9135 return 0;
9136}
Matthias Kloseb159a552010-04-25 21:00:44 +00009137
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009139if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009140
Matthias Kloseb159a552010-04-25 21:00:44 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9145$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009146
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009147else
Matthias Kloseb159a552010-04-25 21:00:44 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009151
9152fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9154
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9157$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009160if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161 withval=$with_doc_strings;
9162fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009163
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009164
9165if test -z "$with_doc_strings"
9166then with_doc_strings="yes"
9167fi
9168if test "$with_doc_strings" != "no"
9169then
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009172
9173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9175$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009176
Antoine Pitrou042b1282010-08-13 21:15:58 +00009177# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9179$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009182if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009184if test "$withval" != no
9185then
9186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9190$as_echo "yes" >&6; }
9191else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009193fi
9194else
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009197fi
9198
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009199
9200# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9202$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009205if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 withval=$with_pymalloc;
9207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009208
Neil Schemenauera35c6882001-02-27 04:45:05 +00009209
Neil Schemenauer16c22972002-03-22 15:34:49 +00009210if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009211then
9212 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009213 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009214fi
9215if test "$with_pymalloc" != "no"
9216then
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Matthias Kloseb9621712010-04-24 17:59:49 +00009218$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009219
9220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9222$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009223
Benjamin Peterson05159c42009-12-03 03:01:27 +00009224# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9226$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009227
9228# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009230 withval=$with_valgrind;
9231else
9232 with_valgrind=no
9233fi
9234
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9236$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009237if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 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 +00009239if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009242
9243else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009244 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009245
9246fi
9247
9248
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009249 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009250fi
9251
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009252# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009253
Guido van Rossum98935bf2001-09-05 19:13:16 +00009254DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009255
Guido van Rossume97ee181999-12-20 21:27:22 +00009256# the dlopen() function means we might want to use dynload_shlib.o. some
9257# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009258for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009259do :
9260 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009261if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009263#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009265
Guido van Rossume97ee181999-12-20 21:27:22 +00009266fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009267done
Guido van Rossume97ee181999-12-20 21:27:22 +00009268
Michael W. Hudson54241132001-12-07 15:38:26 +00009269
Guido van Rossume97ee181999-12-20 21:27:22 +00009270# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9271# loading of modules.
9272
Matthias Kloseb9621712010-04-24 17:59:49 +00009273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9274$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009275if test -z "$DYNLOADFILE"
9276then
9277 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009278 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9279 if test "$ac_cv_func_dlopen" = yes
9280 then DYNLOADFILE="dynload_shlib.o"
9281 else DYNLOADFILE="dynload_aix.o"
9282 fi
9283 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009284 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009285 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9286 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009287 *)
9288 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9289 # out any dynamic loading
9290 if test "$ac_cv_func_dlopen" = yes
9291 then DYNLOADFILE="dynload_shlib.o"
9292 else DYNLOADFILE="dynload_stub.o"
9293 fi
9294 ;;
9295 esac
9296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9298$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009299if test "$DYNLOADFILE" != "dynload_stub.o"
9300then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009303
9304fi
9305
Neil Schemenauer4e425612001-06-19 15:44:15 +00009306# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9307
Michael W. Hudson54241132001-12-07 15:38:26 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9310$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009311if test -z "$MACHDEP_OBJS"
9312then
Jack Jansene578a632001-08-15 01:27:14 +00009313 MACHDEP_OBJS=$extra_machdep_objs
9314else
9315 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9318$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009319
Guido van Rossum627b2d71993-12-24 10:39:16 +00009320# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009321for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009322 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
9323 fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009324 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009325 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009326 initgroups kill killpg lchmod lchown linkat lstat mbrtowc mkdirat mkfifo \
9327 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
9328 pthread_init putenv readlink readlinkat realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009329 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009330 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009331 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009332 sigaction siginterrupt sigrelse snprintf strftime strlcpy symlinkat \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009333 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009334 truncate uname unlinkat unsetenv utimensat utimes waitpid wait3 wait4 \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009335 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009336do :
9337 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9338ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009339if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009341#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009342_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009343
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009344fi
9345done
9346
Michael W. Hudson54241132001-12-07 15:38:26 +00009347
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348# For some functions, having a definition is not sufficient, since
9349# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9351$as_echo_n "checking for chroot... " >&6; }
9352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009353/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355int
9356main ()
9357{
9358void *x=chroot
9359 ;
9360 return 0;
9361}
9362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366
Matthias Kloseb159a552010-04-25 21:00:44 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009368$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369else
Matthias Kloseb9621712010-04-24 17:59:49 +00009370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372
9373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9376$as_echo_n "checking for link... " >&6; }
9377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009378/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380int
9381main ()
9382{
9383void *x=link
9384 ;
9385 return 0;
9386}
9387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389
Matthias Kloseb9621712010-04-24 17:59:49 +00009390$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391
Matthias Kloseb159a552010-04-25 21:00:44 +00009392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009393$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009394else
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397
9398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9401$as_echo_n "checking for symlink... " >&6; }
9402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009403/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009405int
9406main ()
9407{
9408void *x=symlink
9409 ;
9410 return 0;
9411}
9412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416
Matthias Kloseb159a552010-04-25 21:00:44 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009418$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419else
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009422
9423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9426$as_echo_n "checking for fchdir... " >&6; }
9427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429#include <unistd.h>
9430int
9431main ()
9432{
9433void *x=fchdir
9434 ;
9435 return 0;
9436}
9437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009439
Matthias Kloseb9621712010-04-24 17:59:49 +00009440$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441
Matthias Kloseb159a552010-04-25 21:00:44 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009443$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009444else
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9446$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447
9448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9451$as_echo_n "checking for fsync... " >&6; }
9452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009453/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454#include <unistd.h>
9455int
9456main ()
9457{
9458void *x=fsync
9459 ;
9460 return 0;
9461}
9462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009466
Matthias Kloseb159a552010-04-25 21:00:44 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009468$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009469else
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009472
9473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9476$as_echo_n "checking for fdatasync... " >&6; }
9477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009478/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479#include <unistd.h>
9480int
9481main ()
9482{
9483void *x=fdatasync
9484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009491
Matthias Kloseb159a552010-04-25 21:00:44 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009493$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009494else
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009497
9498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9501$as_echo_n "checking for epoll... " >&6; }
9502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009503/* end confdefs.h. */
9504#include <sys/epoll.h>
9505int
9506main ()
9507{
9508void *x=epoll_create
9509 ;
9510 return 0;
9511}
9512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009514
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516
Matthias Kloseb159a552010-04-25 21:00:44 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009518$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009522
9523fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9526$as_echo_n "checking for kqueue... " >&6; }
9527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009528/* end confdefs.h. */
9529
9530#include <sys/types.h>
9531#include <sys/event.h>
9532
9533int
9534main ()
9535{
9536int x=kqueue()
9537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009544
Matthias Kloseb159a552010-04-25 21:00:44 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009546$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009547else
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9549$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009550
9551fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009553# On some systems (eg. FreeBSD 5), we would find a definition of the
9554# functions ctermid_r, setgroups in the library, but no prototype
9555# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9556# address to avoid compiler warnings and potential miscompilations
9557# because of the missing prototypes.
9558
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9560$as_echo_n "checking for ctermid_r... " >&6; }
9561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009562/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009563
Martin v. Löwisd5843682002-11-21 20:41:28 +00009564#include <stdio.h>
9565
Martin v. Löwisd5843682002-11-21 20:41:28 +00009566int
9567main ()
9568{
9569void* p = ctermid_r
9570 ;
9571 return 0;
9572}
9573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009575
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009577
Matthias Kloseb159a552010-04-25 21:00:44 +00009578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009579$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009580else
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009583
9584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9586
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9588$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009589if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009590 $as_echo_n "(cached) " >&6
9591else
9592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009593/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009594#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009595int
9596main ()
9597{
9598void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009599
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605 ac_cv_flock_decl=yes
9606else
9607 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009608
9609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009611
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009612fi
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9614$as_echo "$ac_cv_flock_decl" >&6; }
9615if test "x${ac_cv_flock_decl}" = xyes; then
9616 for ac_func in flock
9617do :
9618 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009619if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009620 cat >>confdefs.h <<_ACEOF
9621#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009622_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009623
Antoine Pitroua3000072010-09-07 14:52:42 +00009624else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009626$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009627if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009628 $as_echo_n "(cached) " >&6
9629else
9630 ac_check_lib_save_LIBS=$LIBS
9631LIBS="-lbsd $LIBS"
9632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9633/* end confdefs.h. */
9634
9635/* Override any GCC internal prototype to avoid an error.
9636 Use char because int might match the return type of a GCC
9637 builtin and then its argument prototype would still apply. */
9638#ifdef __cplusplus
9639extern "C"
9640#endif
9641char flock ();
9642int
9643main ()
9644{
9645return flock ();
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650if ac_fn_c_try_link "$LINENO"; then :
9651 ac_cv_lib_bsd_flock=yes
9652else
9653 ac_cv_lib_bsd_flock=no
9654fi
9655rm -f core conftest.err conftest.$ac_objext \
9656 conftest$ac_exeext conftest.$ac_ext
9657LIBS=$ac_check_lib_save_LIBS
9658fi
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9660$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009661if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009662 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009663
9664
9665$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9666
9667
9668fi
9669
9670
9671fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672done
9673
Antoine Pitroua3000072010-09-07 14:52:42 +00009674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9677$as_echo_n "checking for getpagesize... " >&6; }
9678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009680
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681#include <unistd.h>
9682
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009683int
9684main ()
9685{
9686void* p = getpagesize
9687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694
Matthias Kloseb159a552010-04-25 21:00:44 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009697else
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009700
9701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009703
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704for ac_prog in true
9705do
9706 # Extract the first word of "$ac_prog", so it can be a program name with args.
9707set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009710if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712else
9713 if test -n "$TRUE"; then
9714 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9715else
9716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9717for as_dir in $PATH
9718do
9719 IFS=$as_save_IFS
9720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 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 +00009723 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 $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 +00009725 break 2
9726 fi
9727done
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009730
9731fi
9732fi
9733TRUE=$ac_cv_prog_TRUE
9734if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9736$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740fi
9741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743 test -n "$TRUE" && break
9744done
9745test -n "$TRUE" || TRUE="/bin/true"
9746
9747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9749$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009750if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009752else
9753 ac_check_lib_save_LIBS=$LIBS
9754LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758/* Override any GCC internal prototype to avoid an error.
9759 Use char because int might match the return type of a GCC
9760 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009761#ifdef __cplusplus
9762extern "C"
9763#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009764char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765int
9766main ()
9767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009774 ac_cv_lib_c_inet_aton=yes
9775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009778rm -f core conftest.err conftest.$ac_objext \
9779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009780LIBS=$ac_check_lib_save_LIBS
9781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9783$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009784if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009785 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786else
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9788$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009789if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009791else
9792 ac_check_lib_save_LIBS=$LIBS
9793LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009795/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797/* Override any GCC internal prototype to avoid an error.
9798 Use char because int might match the return type of a GCC
9799 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800#ifdef __cplusplus
9801extern "C"
9802#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804int
9805main ()
9806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009807return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808 ;
9809 return 0;
9810}
9811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009813 ac_cv_lib_resolv_inet_aton=yes
9814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009817rm -f core conftest.err conftest.$ac_objext \
9818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009819LIBS=$ac_check_lib_save_LIBS
9820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9822$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009823if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009824 cat >>confdefs.h <<_ACEOF
9825#define HAVE_LIBRESOLV 1
9826_ACEOF
9827
9828 LIBS="-lresolv $LIBS"
9829
9830fi
9831
9832
9833fi
9834
9835
Christian Heimesd0764e22007-12-04 15:00:33 +00009836# On Tru64, chflags seems to be present, but calling it will
9837# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9839$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009840if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009842else
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009844 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009847/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009848[
Christian Heimesd0764e22007-12-04 15:00:33 +00009849#include <sys/stat.h>
9850#include <unistd.h>
9851int main(int argc, char*argv[])
9852{
9853 if(chflags(argv[0], 0) != 0)
9854 return 1;
9855 return 0;
9856}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009857]
Christian Heimesd0764e22007-12-04 15:00:33 +00009858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009860 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009861else
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009866fi
9867
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9871$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009872if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009874if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009875 ac_cv_have_chflags="yes"
9876else
9877 ac_cv_have_chflags="no"
9878fi
9879
9880fi
9881if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009882
Matthias Kloseb9621712010-04-24 17:59:49 +00009883$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009884
9885fi
9886
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9888$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009889if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009893 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009896/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009897[
Christian Heimesd0764e22007-12-04 15:00:33 +00009898#include <sys/stat.h>
9899#include <unistd.h>
9900int main(int argc, char*argv[])
9901{
9902 if(lchflags(argv[0], 0) != 0)
9903 return 1;
9904 return 0;
9905}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906]
Christian Heimesd0764e22007-12-04 15:00:33 +00009907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009908if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009909 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009910else
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009915fi
9916
9917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9920$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009921if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009923if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009924 ac_cv_have_lchflags="yes"
9925else
9926 ac_cv_have_lchflags="no"
9927fi
9928
9929fi
9930if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009933
9934fi
9935
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009936case $ac_sys_system/$ac_sys_release in
9937Darwin/*)
9938 _CUR_CFLAGS="${CFLAGS}"
9939 _CUR_LDFLAGS="${LDFLAGS}"
9940 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9941 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9942 ;;
9943esac
9944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9946$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009947if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009949else
9950 ac_check_lib_save_LIBS=$LIBS
9951LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009953/* end confdefs.h. */
9954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955/* Override any GCC internal prototype to avoid an error.
9956 Use char because int might match the return type of a GCC
9957 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009958#ifdef __cplusplus
9959extern "C"
9960#endif
9961char inflateCopy ();
9962int
9963main ()
9964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009966 ;
9967 return 0;
9968}
9969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009970if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009971 ac_cv_lib_z_inflateCopy=yes
9972else
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009975rm -f core conftest.err conftest.$ac_objext \
9976 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009977LIBS=$ac_check_lib_save_LIBS
9978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9980$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009981if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009982
Matthias Kloseb9621712010-04-24 17:59:49 +00009983$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984
9985fi
9986
9987
9988case $ac_sys_system/$ac_sys_release in
9989Darwin/*)
9990 CFLAGS="${_CUR_CFLAGS}"
9991 LDFLAGS="${_CUR_LDFLAGS}"
9992 ;;
9993esac
9994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9996$as_echo_n "checking for hstrerror... " >&6; }
9997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009999
Martin v. Löwise9416172003-05-03 10:12:45 +000010000#include <netdb.h>
10001
Martin v. Löwise9416172003-05-03 10:12:45 +000010002int
10003main ()
10004{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010005void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010006 ;
10007 return 0;
10008}
10009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
Matthias Kloseb159a552010-04-25 21:00:44 +000010014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010016else
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010019
10020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010021rm -f core conftest.err conftest.$ac_objext \
10022 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023
Matthias Kloseb9621712010-04-24 17:59:49 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10025$as_echo_n "checking for inet_aton... " >&6; }
10026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010027/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010028
Martin v. Löwis86d66262006-02-17 08:40:11 +000010029#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010030#include <sys/socket.h>
10031#include <netinet/in.h>
10032#include <arpa/inet.h>
10033
Martin v. Löwise9416172003-05-03 10:12:45 +000010034int
10035main ()
10036{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010038 ;
10039 return 0;
10040}
10041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010043
Matthias Kloseb9621712010-04-24 17:59:49 +000010044$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
Matthias Kloseb159a552010-04-25 21:00:44 +000010046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010048else
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010051
10052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010053rm -f core conftest.err conftest.$ac_objext \
10054 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10057$as_echo_n "checking for inet_pton... " >&6; }
10058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010059/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010061#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010062#include <sys/socket.h>
10063#include <netinet/in.h>
10064#include <arpa/inet.h>
10065
Martin v. Löwise9416172003-05-03 10:12:45 +000010066int
10067main ()
10068{
10069void* p = inet_pton
10070 ;
10071 return 0;
10072}
10073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010075
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010077
Matthias Kloseb159a552010-04-25 21:00:44 +000010078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010080else
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10082$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010083
10084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010086
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010087# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10089$as_echo_n "checking for setgroups... " >&6; }
10090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010091/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010092
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010093#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010094#ifdef HAVE_GRP_H
10095#include <grp.h>
10096#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010097
Martin v. Löwisd5843682002-11-21 20:41:28 +000010098int
10099main ()
10100{
10101void* p = setgroups
10102 ;
10103 return 0;
10104}
10105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010109
Matthias Kloseb159a552010-04-25 21:00:44 +000010110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010111$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010112else
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010115
10116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010119# check for openpty and forkpty
10120
10121for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010122do :
10123 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010124if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010127_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010129else
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10131$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010132if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010133 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010134else
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010136LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140/* Override any GCC internal prototype to avoid an error.
10141 Use char because int might match the return type of a GCC
10142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143#ifdef __cplusplus
10144extern "C"
10145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010146char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 ;
10152 return 0;
10153}
10154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160rm -f core conftest.err conftest.$ac_objext \
10161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010162LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10165$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010166if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010169else
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10171$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010172if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010174else
10175 ac_check_lib_save_LIBS=$LIBS
10176LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010178/* end confdefs.h. */
10179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180/* Override any GCC internal prototype to avoid an error.
10181 Use char because int might match the return type of a GCC
10182 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010183#ifdef __cplusplus
10184extern "C"
10185#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010186char openpty ();
10187int
10188main ()
10189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010191 ;
10192 return 0;
10193}
10194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196 ac_cv_lib_bsd_openpty=yes
10197else
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010202LIBS=$ac_check_lib_save_LIBS
10203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10205$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010206if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010208 LIBS="$LIBS -lbsd"
10209fi
10210
10211
10212fi
10213
Fred Drake8cef4cf2000-06-28 16:40:38 +000010214
10215fi
10216done
10217
10218for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010219do :
10220 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010221if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010224_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010225
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226else
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10228$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010229if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010231else
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010233LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237/* Override any GCC internal prototype to avoid an error.
10238 Use char because int might match the return type of a GCC
10239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010240#ifdef __cplusplus
10241extern "C"
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010244int
10245main ()
10246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ;
10249 return 0;
10250}
10251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010254else
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010257rm -f core conftest.err conftest.$ac_objext \
10258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010259LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10262$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010263if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010265 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10268$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010269if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010271else
10272 ac_check_lib_save_LIBS=$LIBS
10273LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275/* end confdefs.h. */
10276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277/* Override any GCC internal prototype to avoid an error.
10278 Use char because int might match the return type of a GCC
10279 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010280#ifdef __cplusplus
10281extern "C"
10282#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010283char forkpty ();
10284int
10285main ()
10286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010288 ;
10289 return 0;
10290}
10291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010293 ac_cv_lib_bsd_forkpty=yes
10294else
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010297rm -f core conftest.err conftest.$ac_objext \
10298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010299LIBS=$ac_check_lib_save_LIBS
10300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10302$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010303if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010305 LIBS="$LIBS -lbsd"
10306fi
10307
10308
10309fi
10310
Fred Drake8cef4cf2000-06-28 16:40:38 +000010311
10312fi
10313done
10314
Jack Jansendd19cf82001-12-06 22:36:17 +000010315
Christian Heimesb186d002008-03-18 15:15:01 +000010316# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010317for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010318do :
10319 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010320if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010322#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010323_ACEOF
10324
10325fi
10326done
10327
10328
Michael W. Hudson54241132001-12-07 15:38:26 +000010329# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010330for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010331do :
10332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010334if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010338
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010340done
10341
Michael W. Hudson54241132001-12-07 15:38:26 +000010342
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010343ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10344if test "x$ac_cv_func_dup2" = xyes; then :
10345 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010346
Martin v. Löwis1142de32002-03-29 16:28:31 +000010347else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010349 *" dup2.$ac_objext "* ) ;;
10350 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010352esac
10353
Martin v. Löwis1142de32002-03-29 16:28:31 +000010354fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010355
10356ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10357if test "x$ac_cv_func_getcwd" = xyes; then :
10358 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10359
10360else
10361 case " $LIBOBJS " in
10362 *" getcwd.$ac_objext "* ) ;;
10363 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10364 ;;
10365esac
10366
10367fi
10368
10369ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10370if test "x$ac_cv_func_strdup" = xyes; then :
10371 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10372
10373else
10374 case " $LIBOBJS " in
10375 *" strdup.$ac_objext "* ) ;;
10376 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10377 ;;
10378esac
10379
10380fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010381
10382
10383for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010384do :
10385 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010386if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010392#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010404
Guido van Rossum627b2d71993-12-24 10:39:16 +000010405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010407
Guido van Rossum627b2d71993-12-24 10:39:16 +000010408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010409done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010410
Jack Jansen150753c2003-03-29 22:07:47 +000010411for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010412do :
10413 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010414if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010416#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010419/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010420#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010421int
10422main ()
10423{
10424setpgrp(0,0);
10425 ;
10426 return 0;
10427}
10428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010432
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010435
10436fi
10437done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010438
Thomas Wouters3a584202000-08-05 23:28:51 +000010439for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010440do :
10441 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010442if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010448#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010449int
10450main ()
10451{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010452gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_compile "$LINENO"; then :
10458
Guido van Rossum627b2d71993-12-24 10:39:16 +000010459else
Skip Montanaro6dead952003-09-25 14:50:04 +000010460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010462
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
Guido van Rossum627b2d71993-12-24 10:39:16 +000010464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010466
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010468done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010469
Michael W. Hudson54241132001-12-07 15:38:26 +000010470
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10472$as_echo_n "checking for major... " >&6; }
10473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010475
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010476#if defined(MAJOR_IN_MKDEV)
10477#include <sys/mkdev.h>
10478#elif defined(MAJOR_IN_SYSMACROS)
10479#include <sys/sysmacros.h>
10480#else
10481#include <sys/types.h>
10482#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010483
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010484int
10485main ()
10486{
10487
10488 makedev(major(0),minor(0));
10489
10490 ;
10491 return 0;
10492}
10493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010495
10496
Matthias Kloseb9621712010-04-24 17:59:49 +000010497$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10500$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010501
10502else
Skip Montanaro6dead952003-09-25 14:50:04 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010506
10507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010510
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010511# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010512# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10514$as_echo_n "checking for getaddrinfo... " >&6; }
10515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010517
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010518#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010519#include <sys/socket.h>
10520#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010521#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010526getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010532 have_getaddrinfo=yes
10533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010536rm -f core conftest.err conftest.$ac_objext \
10537 conftest$ac_exeext conftest.$ac_ext
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10539$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010540if test $have_getaddrinfo = yes
10541then
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10543$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010544 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010546else
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010549else
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010552
10553#include <sys/types.h>
10554#include <netdb.h>
10555#include <string.h>
10556#include <sys/socket.h>
10557#include <netinet/in.h>
10558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010559int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010560{
10561 int passive, gaierr, inet4 = 0, inet6 = 0;
10562 struct addrinfo hints, *ai, *aitop;
10563 char straddr[INET6_ADDRSTRLEN], strport[16];
10564
10565 for (passive = 0; passive <= 1; passive++) {
10566 memset(&hints, 0, sizeof(hints));
10567 hints.ai_family = AF_UNSPEC;
10568 hints.ai_flags = passive ? AI_PASSIVE : 0;
10569 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010570 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010571 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10572 (void)gai_strerror(gaierr);
10573 goto bad;
10574 }
10575 for (ai = aitop; ai; ai = ai->ai_next) {
10576 if (ai->ai_addr == NULL ||
10577 ai->ai_addrlen == 0 ||
10578 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10579 straddr, sizeof(straddr), strport, sizeof(strport),
10580 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10581 goto bad;
10582 }
10583 switch (ai->ai_family) {
10584 case AF_INET:
10585 if (strcmp(strport, "54321") != 0) {
10586 goto bad;
10587 }
10588 if (passive) {
10589 if (strcmp(straddr, "0.0.0.0") != 0) {
10590 goto bad;
10591 }
10592 } else {
10593 if (strcmp(straddr, "127.0.0.1") != 0) {
10594 goto bad;
10595 }
10596 }
10597 inet4++;
10598 break;
10599 case AF_INET6:
10600 if (strcmp(strport, "54321") != 0) {
10601 goto bad;
10602 }
10603 if (passive) {
10604 if (strcmp(straddr, "::") != 0) {
10605 goto bad;
10606 }
10607 } else {
10608 if (strcmp(straddr, "::1") != 0) {
10609 goto bad;
10610 }
10611 }
10612 inet6++;
10613 break;
10614 case AF_UNSPEC:
10615 goto bad;
10616 break;
10617 default:
10618 /* another family support? */
10619 break;
10620 }
10621 }
10622 }
10623
10624 if (!(inet4 == 0 || inet4 == 2))
10625 goto bad;
10626 if (!(inet6 == 0 || inet6 == 2))
10627 goto bad;
10628
10629 if (aitop)
10630 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632
10633 bad:
10634 if (aitop)
10635 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010636 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010637}
10638
Martin v. Löwis11437992002-04-12 09:54:03 +000010639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010640if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010641 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010642else
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10646 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10654$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10655
Mark Dickinson2df5d282009-12-31 21:22:50 +000010656if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010657then
10658 if test $ipv6 = yes
10659 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010660 echo 'Fatal: You must get working getaddrinfo() function.'
10661 echo ' or you can specify "--disable-ipv6"'.
10662 exit 1
10663 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010664else
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010667
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010668fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010669
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010670for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010671do :
10672 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010673if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010676_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010677
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010678fi
10679done
10680
Michael W. Hudson54241132001-12-07 15:38:26 +000010681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10684$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 +000010685if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687else
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690#include <sys/types.h>
10691#include <sys/time.h>
10692#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Martin v. Löwis11437992002-04-12 09:54:03 +000010694int
10695main ()
10696{
10697if ((struct tm *) 0)
10698return 0;
10699 ;
10700 return 0;
10701}
10702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010703if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010704 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010705else
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10711$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010712if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010715
10716fi
10717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10719$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 +000010720if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722else
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010724/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725#include <sys/types.h>
10726#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Martin v. Löwis11437992002-04-12 09:54:03 +000010728int
10729main ()
10730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731struct tm tm;
10732 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739 ac_cv_struct_tm=time.h
10740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10746$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010747if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010750
10751fi
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753ac_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 +000010754#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010757if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010758
10759cat >>confdefs.h <<_ACEOF
10760#define HAVE_STRUCT_TM_TM_ZONE 1
10761_ACEOF
10762
10763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010765
Martin v. Löwis11437992002-04-12 09:54:03 +000010766if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010769
10770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10772"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010773if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777fi
10778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010780#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781_ACEOF
10782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10784$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010785if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787else
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791#if !HAVE_DECL_TZNAME
10792extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804 ac_cv_var_tzname=yes
10805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010808rm -f core conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10812$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010813 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817 fi
10818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_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 +000010821if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
10823cat >>confdefs.h <<_ACEOF
10824#define HAVE_STRUCT_STAT_ST_RDEV 1
10825_ACEOF
10826
10827
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010828fi
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830ac_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 +000010831if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010832
Martin v. Löwis11437992002-04-12 09:54:03 +000010833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10835_ACEOF
10836
10837
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010838fi
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840ac_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 +000010841if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010842
10843cat >>confdefs.h <<_ACEOF
10844#define HAVE_STRUCT_STAT_ST_FLAGS 1
10845_ACEOF
10846
10847
10848fi
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850ac_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 +000010851if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010852
10853cat >>confdefs.h <<_ACEOF
10854#define HAVE_STRUCT_STAT_ST_GEN 1
10855_ACEOF
10856
10857
10858fi
10859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860ac_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 +000010861if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010862
10863cat >>confdefs.h <<_ACEOF
10864#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10865_ACEOF
10866
10867
10868fi
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870ac_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 +000010871if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010872
Martin v. Löwis11437992002-04-12 09:54:03 +000010873cat >>confdefs.h <<_ACEOF
10874#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10875_ACEOF
10876
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010879
10880else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010882 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10884 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010885esac
10886
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010887fi
10888
Michael W. Hudson54241132001-12-07 15:38:26 +000010889
Martin v. Löwis11437992002-04-12 09:54:03 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10892$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010893if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895else
Matthias Kloseb159a552010-04-25 21:00:44 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010899#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010900int
10901main ()
10902{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 ;
10905 return 0;
10906}
10907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010909 ac_cv_header_time_altzone=yes
10910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915fi
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10918$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010919if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922
10923fi
10924
Guido van Rossumda88dad1995-01-26 00:46:29 +000010925was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10927$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010930
10931#include <sys/types.h>
10932#include <sys/select.h>
10933#include <sys/time.h>
10934
Martin v. Löwis11437992002-04-12 09:54:03 +000010935int
10936main ()
10937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 ;
10940 return 0;
10941}
10942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010948 was_it_defined=yes
10949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10953$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10956$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010957if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959else
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010962#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010963int
10964main ()
10965{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010966struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010967 ;
10968 return 0;
10969}
10970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010972 ac_cv_struct_addrinfo=yes
10973else
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977fi
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10980$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010984
10985fi
10986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10988$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010989if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010993/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010994
10995# include <sys/types.h>
10996# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010997int
10998main ()
10999{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011000struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 ;
11002 return 0;
11003}
11004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011006 ac_cv_struct_sockaddr_storage=yes
11007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011fi
11012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11014$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011015if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011018
11019fi
11020
Guido van Rossum627b2d71993-12-24 10:39:16 +000011021# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11024$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011025if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011030$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011031int
11032main ()
11033{
11034static int test_array [1 - 2 * !(((char) -1) < 0)];
11035test_array [0] = 0
11036
11037 ;
11038 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011039}
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011041if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011042 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011043else
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11049$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052
11053fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011054
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11056$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011057if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011062
Martin v. Löwis11437992002-04-12 09:54:03 +000011063int
11064main ()
11065{
11066/* FIXME: Include the comments suggested by Paul. */
11067#ifndef __cplusplus
11068 /* Ultrix mips cc rejects this. */
11069 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072 char const *const *pcpcc;
11073 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 /* NEC SVR4.0.2 mips cc rejects this. */
11075 struct point {int x, y;};
11076 static struct point const zero = {0,0};
11077 /* AIX XL C 1.02.0.0 rejects this.
11078 It does not let you subtract one const X* pointer from another in
11079 an arm of an if-expression whose if-part is not a constant
11080 expression */
11081 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084 ++pcpcc;
11085 ppc = (char**) pcpcc;
11086 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 { /* SCO 3.2v4 cc rejects this. */
11088 char *t;
11089 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 }
11094 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11095 int x[] = {25, 17};
11096 const int *foo = &x[0];
11097 ++foo;
11098 }
11099 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11100 typedef const int *iptr;
11101 iptr p = 0;
11102 ++p;
11103 }
11104 { /* AIX XL C 1.02.0.0 rejects this saying
11105 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11106 struct s { int j; const int *ap[3]; };
11107 struct s *b; b->j = 5;
11108 }
11109 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11110 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011114#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ;
11117 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011118}
Martin v. Löwis11437992002-04-12 09:54:03 +000011119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121 ac_cv_c_const=yes
11122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11128$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
Matthias Kloseb9621712010-04-24 17:59:49 +000011131$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011132
11133fi
11134
Michael W. Hudson54241132001-12-07 15:38:26 +000011135
Guido van Rossumda88dad1995-01-26 00:46:29 +000011136works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11138$as_echo_n "checking for working volatile... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011140/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142int
11143main ()
11144{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011151 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011152else
Skip Montanaro6dead952003-09-25 14:50:04 +000011153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011155
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011156
Guido van Rossum627b2d71993-12-24 10:39:16 +000011157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11160$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011161
Guido van Rossumda88dad1995-01-26 00:46:29 +000011162works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11164$as_echo_n "checking for working signed char... " >&6; }
11165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011166/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011167
Martin v. Löwis11437992002-04-12 09:54:03 +000011168int
11169main ()
11170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011172 ;
11173 return 0;
11174}
11175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011177 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011178else
Skip Montanaro6dead952003-09-25 14:50:04 +000011179
Matthias Kloseb9621712010-04-24 17:59:49 +000011180$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011181
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011182
Guido van Rossum7f43da71994-08-01 12:15:30 +000011183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11186$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Guido van Rossumda88dad1995-01-26 00:46:29 +000011188have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11190$as_echo_n "checking for prototypes... " >&6; }
11191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011192/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011194int
11195main ()
11196{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011197return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ;
11199 return 0;
11200}
11201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
Matthias Kloseb9621712010-04-24 17:59:49 +000011204$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Matthias Kloseb159a552010-04-25 21:00:44 +000011206 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11210$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011211
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11214$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011216/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011217
11218#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011219int foo(int x, ...) {
11220 va_list va;
11221 va_start(va, x);
11222 va_arg(va, int);
11223 va_arg(va, char *);
11224 va_arg(va, double);
11225 return 0;
11226}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Guido van Rossum90eea071996-08-30 20:58:57 +000011231return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
11238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011240
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011241 works=yes
11242
Guido van Rossum627b2d71993-12-24 10:39:16 +000011243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11246$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247
Martin v. Löwisd6320502004-08-12 13:45:08 +000011248# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11250$as_echo_n "checking for socketpair... " >&6; }
11251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011252/* end confdefs.h. */
11253
11254#include <sys/types.h>
11255#include <sys/socket.h>
11256
11257int
11258main ()
11259{
11260void *x=socketpair
11261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011268
Matthias Kloseb159a552010-04-25 21:00:44 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011274
11275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011277
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011278# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11280$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011283#include <sys/types.h>
11284#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011285int
11286main ()
11287{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011288struct sockaddr x;
11289x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294if ac_fn_c_try_compile "$LINENO"; then :
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11296$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011299
11300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011303
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011306
Guido van Rossumda88dad1995-01-26 00:46:29 +000011307va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11309$as_echo_n "checking whether va_list is an array... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011312
11313#ifdef HAVE_STDARG_PROTOTYPES
11314#include <stdarg.h>
11315#else
11316#include <varargs.h>
11317#endif
11318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011322va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
11328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329else
Skip Montanaro6dead952003-09-25 14:50:04 +000011330
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011333
Guido van Rossumda88dad1995-01-26 00:46:29 +000011334 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11339$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011341# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011342
11343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011345if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11350$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011351 OLD_CFLAGS=$CFLAGS
11352 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355
11356# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358int
11359main ()
11360{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011361
11362 char *name;
11363 struct hostent *he, *res;
11364 char buffer[2048];
11365 int buflen = 2048;
11366 int h_errnop;
11367
11368 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011369
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11382$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384else
Skip Montanaro6dead952003-09-25 14:50:04 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11389$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398
11399 char *name;
11400 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011401 char buffer[2048];
11402 int buflen = 2048;
11403 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011404
Matthias Kloseb159a552010-04-25 21:00:44 +000011405 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011406
11407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011414
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Matthias Kloseb159a552010-04-25 21:00:44 +000011416$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11419$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011421else
Skip Montanaro6dead952003-09-25 14:50:04 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11426$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11428/* end confdefs.h. */
11429
11430# include <netdb.h>
11431
11432int
11433main ()
11434{
11435
11436 char *name;
11437 struct hostent *he;
11438 struct hostent_data data;
11439
11440 (void) gethostbyname_r(name, he, &data);
11441
11442 ;
11443 return 0;
11444}
11445_ACEOF
11446if ac_fn_c_try_compile "$LINENO"; then :
11447
11448 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11449
11450
11451$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11452
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11454$as_echo "yes" >&6; }
11455
11456else
11457
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11459$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011469 CFLAGS=$OLD_CFLAGS
11470
11471else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 for ac_func in gethostbyname
11474do :
11475 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011476if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011479_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011481fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011482done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011483
Michael W. Hudson54241132001-12-07 15:38:26 +000011484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011485fi
11486
Michael W. Hudson54241132001-12-07 15:38:26 +000011487
11488
11489
11490
11491
11492
Guido van Rossum627b2d71993-12-24 10:39:16 +000011493# checks for system services
11494# (none yet)
11495
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011496# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011497ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011498if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011499
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011500else
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11502$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011503if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505else
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011507LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511/* Override any GCC internal prototype to avoid an error.
11512 Use char because int might match the return type of a GCC
11513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011514#ifdef __cplusplus
11515extern "C"
11516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011517char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011518int
11519main ()
11520{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ;
11523 return 0;
11524}
11525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011528else
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011531rm -f core conftest.err conftest.$ac_objext \
11532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11536$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011537if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 cat >>confdefs.h <<_ACEOF
11539#define HAVE_LIBIEEE 1
11540_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011542 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011543
Guido van Rossum627b2d71993-12-24 10:39:16 +000011544fi
11545
Michael W. Hudson54241132001-12-07 15:38:26 +000011546
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011547fi
11548
Michael W. Hudson54241132001-12-07 15:38:26 +000011549
Guido van Rossum7f253911997-05-09 02:42:48 +000011550# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11552$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011555if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011557if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011558then
11559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11563$as_echo "yes" >&6; }
11564else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11565$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011566fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570fi
11571
Guido van Rossum7f253911997-05-09 02:42:48 +000011572
Guido van Rossum7f43da71994-08-01 12:15:30 +000011573# check for --with-libm=...
11574
Guido van Rossum563e7081996-09-10 18:20:48 +000011575case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011576Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011577*) LIBM=-lm
11578esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11580$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011585if test "$withval" = no
11586then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11588$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011589elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011590then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11592$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011593else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011594fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11597$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598fi
11599
Guido van Rossum7f43da71994-08-01 12:15:30 +000011600
11601# check for --with-libc=...
11602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11604$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011607if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011609if test "$withval" = no
11610then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11612$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011613elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011614then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11616$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011617else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011618fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11621$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622fi
11623
Guido van Rossum7f43da71994-08-01 12:15:30 +000011624
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625# **************************************************
11626# * Check for various properties of floating point *
11627# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11630$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011631if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633else
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636 ac_cv_little_endian_double=no
11637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639/* end confdefs.h. */
11640
11641#include <string.h>
11642int main() {
11643 double x = 9006104071832581.0;
11644 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11645 return 0;
11646 else
11647 return 1;
11648}
11649
11650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652 ac_cv_little_endian_double=yes
11653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658fi
11659
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660fi
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11663$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664if test "$ac_cv_little_endian_double" = yes
11665then
11666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668
11669fi
11670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11672$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011673if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675else
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678 ac_cv_big_endian_double=no
11679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681/* end confdefs.h. */
11682
11683#include <string.h>
11684int main() {
11685 double x = 9006104071832581.0;
11686 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11687 return 0;
11688 else
11689 return 1;
11690}
11691
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694 ac_cv_big_endian_double=yes
11695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700fi
11701
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702fi
11703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11705$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706if test "$ac_cv_big_endian_double" = yes
11707then
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710
11711fi
11712
11713# Some ARM platforms use a mixed-endian representation for doubles.
11714# While Python doesn't currently have full support for these platforms
11715# (see e.g., issue 1762561), we can at least make sure that float <-> string
11716# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11718$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011719if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721else
11722
Matthias Kloseb9621712010-04-24 17:59:49 +000011723if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724 ac_cv_mixed_endian_double=no
11725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727/* end confdefs.h. */
11728
11729#include <string.h>
11730int main() {
11731 double x = 9006104071832581.0;
11732 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11733 return 0;
11734 else
11735 return 1;
11736}
11737
11738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740 ac_cv_mixed_endian_double=yes
11741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746fi
11747
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748fi
11749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11751$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752if test "$ac_cv_mixed_endian_double" = yes
11753then
11754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756
11757fi
11758
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011759# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011760# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011761# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011762# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011763# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011764# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011765
11766# This inline assembler syntax may also work for suncc and icc,
11767# so we try it on all platforms.
11768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11770$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011772/* end confdefs.h. */
11773
11774int
11775main ()
11776{
11777
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011778 unsigned short cw;
11779 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11780 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011781
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787 have_gcc_asm_for_x87=yes
11788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11793$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011794if test "$have_gcc_asm_for_x87" = yes
11795then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011798
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011801# Detect whether system arithmetic is subject to x87-style double
11802# rounding issues. The result of this test has little meaning on non
11803# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11804# mode is round-to-nearest and double rounding issues are present, and
11805# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11807$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011808# $BASECFLAGS may affect the result
11809ac_save_cc="$CC"
11810CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011812 ac_cv_x87_double_rounding=no
11813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011815/* end confdefs.h. */
11816
11817#include <stdlib.h>
11818#include <math.h>
11819int main() {
11820 volatile double x, y, z;
11821 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11822 x = 0.99999999999999989; /* 1-2**-53 */
11823 y = 1./x;
11824 if (y != 1.)
11825 exit(0);
11826 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11827 x = 1e16;
11828 y = 2.99999;
11829 z = x + y;
11830 if (z != 1e16+4.)
11831 exit(0);
11832 /* both tests show evidence of double rounding */
11833 exit(1);
11834}
11835
11836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011838 ac_cv_x87_double_rounding=no
11839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011844fi
11845
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11848$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849if test "$ac_cv_x87_double_rounding" = yes
11850then
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853
11854fi
11855
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011856# ************************************
11857# * Check for mathematical functions *
11858# ************************************
11859
11860LIBS_SAVE=$LIBS
11861LIBS="$LIBS $LIBM"
11862
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011863for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11864do :
11865 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11866ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011867if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011868 cat >>confdefs.h <<_ACEOF
11869#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11870_ACEOF
11871
11872fi
11873done
11874
11875for ac_func in hypot lgamma log1p round tgamma
11876do :
11877 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11878ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011879if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011880 cat >>confdefs.h <<_ACEOF
11881#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11882_ACEOF
11883
11884fi
11885done
11886
11887ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11888"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011889if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011890 ac_have_decl=1
11891else
11892 ac_have_decl=0
11893fi
11894
11895cat >>confdefs.h <<_ACEOF
11896#define HAVE_DECL_ISINF $ac_have_decl
11897_ACEOF
11898ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11899"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011900if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011901 ac_have_decl=1
11902else
11903 ac_have_decl=0
11904fi
11905
11906cat >>confdefs.h <<_ACEOF
11907#define HAVE_DECL_ISNAN $ac_have_decl
11908_ACEOF
11909ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11910"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011911if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011912 ac_have_decl=1
11913else
11914 ac_have_decl=0
11915fi
11916
11917cat >>confdefs.h <<_ACEOF
11918#define HAVE_DECL_ISFINITE $ac_have_decl
11919_ACEOF
11920
11921
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011922# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11923# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11925$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011926if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011928else
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011931 ac_cv_tanh_preserves_zero_sign=no
11932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011934/* end confdefs.h. */
11935
11936#include <math.h>
11937#include <stdlib.h>
11938int main() {
11939 /* return 0 if either negative zeros don't exist
11940 on this platform or if negative zeros exist
11941 and tanh(-0.) == -0. */
11942 if (atan2(0., -1.) == atan2(-0., -1.) ||
11943 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11944 else exit(1);
11945}
11946
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011949 ac_cv_tanh_preserves_zero_sign=yes
11950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011955fi
11956
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011957fi
11958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11960$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011961if test "$ac_cv_tanh_preserves_zero_sign" = yes
11962then
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011965
11966fi
11967
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011968if test "$ac_cv_func_log1p" = yes
11969then
11970 # On some versions of AIX, log1p(-0.) returns 0. instead of
11971 # -0. See issue #9920.
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11973$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011974 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011975 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011976else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011977
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011978 if test "$cross_compiling" = yes; then :
11979 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011980else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011983
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011984 #include <math.h>
11985 #include <stdlib.h>
11986 int main() {
11987 /* Fail if the signs of log1p(-0.) and -0. can be
11988 distinguished. */
11989 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11990 return 0;
11991 else
11992 return 1;
11993 }
11994
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011995_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011996if ac_fn_c_try_run "$LINENO"; then :
11997 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011998else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011999 ac_cv_log1p_drops_zero_sign=yes
12000fi
12001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012003fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012004
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012005fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012006
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12008$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12009fi
12010if test "$ac_cv_log1p_drops_zero_sign" = yes
12011then
12012
12013$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12014
12015fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012016
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012017LIBS=$LIBS_SAVE
12018
Mark Dickinsona614f042009-11-28 12:48:43 +000012019# For multiprocessing module, check that sem_open
12020# actually works. For FreeBSD versions <= 7.2,
12021# the kernel module that provides POSIX semaphores
12022# isn't loaded by default, so an attempt to call
12023# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12025$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012026if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012030 ac_cv_posix_semaphores_enabled=yes
12031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012033/* end confdefs.h. */
12034
12035#include <unistd.h>
12036#include <fcntl.h>
12037#include <stdio.h>
12038#include <semaphore.h>
12039#include <sys/stat.h>
12040
12041int main(void) {
12042 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12043 if (a == SEM_FAILED) {
12044 perror("sem_open");
12045 return 1;
12046 }
12047 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012048 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012049 return 0;
12050}
12051
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012054 ac_cv_posix_semaphores_enabled=yes
12055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +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
Mark Dickinsona614f042009-11-28 12:48:43 +000012060fi
12061
12062
Mark Dickinsona614f042009-11-28 12:48:43 +000012063fi
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12066$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012067if test $ac_cv_posix_semaphores_enabled = no
12068then
12069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012071
12072fi
12073
Mark Dickinson10683072009-04-18 21:18:19 +000012074# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12076$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012077if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012081 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012084/* end confdefs.h. */
12085
12086#include <unistd.h>
12087#include <fcntl.h>
12088#include <stdio.h>
12089#include <semaphore.h>
12090#include <sys/stat.h>
12091
12092int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012093 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012094 int count;
12095 int res;
12096 if(a==SEM_FAILED){
12097 perror("sem_open");
12098 return 1;
12099
12100 }
12101 res = sem_getvalue(a, &count);
12102 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012103 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012104 return res==-1 ? 1 : 0;
12105}
12106
Mark Dickinson10683072009-04-18 21:18:19 +000012107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012108if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012109 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012115fi
12116
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012118fi
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12121$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122if test $ac_cv_broken_sem_getvalue = yes
12123then
12124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012126
12127fi
12128
Mark Dickinsonbd792642009-03-18 20:06:12 +000012129# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12131$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012132# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012134 enableval=$enable_big_digits; case $enable_big_digits in
12135yes)
12136 enable_big_digits=30 ;;
12137no)
12138 enable_big_digits=15 ;;
1213915|30)
12140 ;;
12141*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012142 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 +000012143esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12145$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012146
12147cat >>confdefs.h <<_ACEOF
12148#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12149_ACEOF
12150
12151
12152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12154$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012155fi
12156
12157
Guido van Rossumef2255b2000-03-10 22:30:29 +000012158# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012159ac_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 +000012160if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012161
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012165 wchar_h="yes"
12166
Guido van Rossumef2255b2000-03-10 22:30:29 +000012167else
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012169
12170fi
12171
Michael W. Hudson54241132001-12-07 15:38:26 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012174# determine wchar_t size
12175if test "$wchar_h" = yes
12176then
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12180# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12182$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012183if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12187"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 if test "$ac_cv_type_wchar_t" = yes; then
12191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012193as_fn_error 77 "cannot compute sizeof (wchar_t)
12194See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195 else
12196 ac_cv_sizeof_wchar_t=0
12197 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12202$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012203
12204
12205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012207#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012208_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012209
Michael W. Hudson54241132001-12-07 15:38:26 +000012210
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012211fi
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12214$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012215have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012217/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012218
12219#include <tcl.h>
12220#if TCL_UTF_MAX != 6
12221# error "NOT UCS4_TCL"
12222#endif
12223int
12224main ()
12225{
12226
12227 ;
12228 return 0;
12229}
12230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012232
12233
Matthias Kloseb9621712010-04-24 17:59:49 +000012234$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012235
12236 have_ucs4_tcl=yes
12237
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12241$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012242
Skip Montanaro6dead952003-09-25 14:50:04 +000012243# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012244if test "$wchar_h" = yes
12245then
12246 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12248$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012249 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012251else
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012254 ac_cv_wchar_t_signed=yes
12255else
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012257/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012258
12259 #include <wchar.h>
12260 int main()
12261 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012262 /* Success: exit code 0 */
12263 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012264 }
12265
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012268 ac_cv_wchar_t_signed=yes
12269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12273 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012274fi
12275
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012276fi
12277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12279$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280fi
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12283$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012284
12285# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012286if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012287 withval=$with_wide_unicode;
12288if test "$withval" != no
12289then unicode_size="4"
12290else unicode_size="2"
12291fi
12292
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012293else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294
Georg Brandl52d168a2008-01-07 18:10:24 +000012295case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012296 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012297 *) unicode_size="2" ;;
12298esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012299
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012300fi
12301
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012302
12303
Georg Brandl52d168a2008-01-07 18:10:24 +000012304case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012305 4)
12306 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12307
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012308 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012309 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012311 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012312esac
12313
Michael W. Hudson54241132001-12-07 15:38:26 +000012314
Martin v. Löwis11437992002-04-12 09:54:03 +000012315
Georg Brandl52d168a2008-01-07 18:10:24 +000012316# wchar_t is only usable if it maps to an unsigned type
12317if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012318 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012319then
12320 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012325
Georg Brandl52d168a2008-01-07 18:10:24 +000012326elif test "$ac_cv_sizeof_short" = "$unicode_size"
12327then
12328 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012330
Georg Brandl52d168a2008-01-07 18:10:24 +000012331elif test "$ac_cv_sizeof_long" = "$unicode_size"
12332then
12333 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012335
Georg Brandl52d168a2008-01-07 18:10:24 +000012336else
12337 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12340$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341
12342# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12344$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012345if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 ac_cv_c_bigendian=unknown
12349 # See if we're dealing with a universal compiler.
12350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12351/* end confdefs.h. */
12352#ifndef __APPLE_CC__
12353 not a universal capable compiler
12354 #endif
12355 typedef int dummy;
12356
Skip Montanaro6dead952003-09-25 14:50:04 +000012357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
12359
12360 # Check for potential -arch flags. It is not universal unless
12361 # there are at least two -arch flags with different values.
12362 ac_arch=
12363 ac_prev=
12364 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12365 if test -n "$ac_prev"; then
12366 case $ac_word in
12367 i?86 | x86_64 | ppc | ppc64)
12368 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12369 ac_arch=$ac_word
12370 else
12371 ac_cv_c_bigendian=universal
12372 break
12373 fi
12374 ;;
12375 esac
12376 ac_prev=
12377 elif test "x$ac_word" = "x-arch"; then
12378 ac_prev=arch
12379 fi
12380 done
12381fi
12382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12383 if test $ac_cv_c_bigendian = unknown; then
12384 # See if sys/param.h defines the BYTE_ORDER macro.
12385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012387#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Matthias Kloseb9621712010-04-24 17:59:49 +000012393#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12394 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12395 && LITTLE_ENDIAN)
12396 bogus endian macros
12397 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
12399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012404 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012406/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012409
Martin v. Löwis11437992002-04-12 09:54:03 +000012410int
12411main ()
12412{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012413#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 not big endian
12415 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012416
12417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422 ac_cv_c_bigendian=yes
12423else
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012427fi
12428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12429 fi
12430 if test $ac_cv_c_bigendian = unknown; then
12431 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012434#include <limits.h>
12435
Martin v. Löwis11437992002-04-12 09:54:03 +000012436int
12437main ()
12438{
Matthias Kloseb9621712010-04-24 17:59:49 +000012439#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12440 bogus endian macros
12441 #endif
12442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ;
12444 return 0;
12445}
12446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if ac_fn_c_try_compile "$LINENO"; then :
12448 # It does; now see whether it defined to _BIG_ENDIAN or not.
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450/* end confdefs.h. */
12451#include <limits.h>
12452
12453int
12454main ()
12455{
12456#ifndef _BIG_ENDIAN
12457 not big endian
12458 #endif
12459
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12470fi
12471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12472 fi
12473 if test $ac_cv_c_bigendian = unknown; then
12474 # Compile a test program.
12475 if test "$cross_compiling" = yes; then :
12476 # Try to guess by grepping values from an object file.
12477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478/* end confdefs.h. */
12479short int ascii_mm[] =
12480 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12481 short int ascii_ii[] =
12482 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12483 int use_ascii (int i) {
12484 return ascii_mm[i] + ascii_ii[i];
12485 }
12486 short int ebcdic_ii[] =
12487 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12488 short int ebcdic_mm[] =
12489 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12490 int use_ebcdic (int i) {
12491 return ebcdic_mm[i] + ebcdic_ii[i];
12492 }
12493 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495int
12496main ()
12497{
12498return use_ascii (foo) == use_ebcdic (foo);
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503if ac_fn_c_try_compile "$LINENO"; then :
12504 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12505 ac_cv_c_bigendian=yes
12506 fi
12507 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12508 if test "$ac_cv_c_bigendian" = unknown; then
12509 ac_cv_c_bigendian=no
12510 else
12511 # finding both strings is unlikely to happen, but who knows?
12512 ac_cv_c_bigendian=unknown
12513 fi
12514 fi
12515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012517else
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012519/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012521int
12522main ()
12523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 /* Are we little or big endian? From Harbison&Steele. */
12526 union
12527 {
12528 long int l;
12529 char c[sizeof (long int)];
12530 } u;
12531 u.l = 1;
12532 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533
12534 ;
12535 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012536}
Martin v. Löwis11437992002-04-12 09:54:03 +000012537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012539 ac_cv_c_bigendian=no
12540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12550$as_echo "$ac_cv_c_bigendian" >&6; }
12551 case $ac_cv_c_bigendian in #(
12552 yes)
12553 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12554;; #(
12555 no)
12556 ;; #(
12557 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 ;; #(
12562 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012563 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012564 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012566
Michael W. Hudson54241132001-12-07 15:38:26 +000012567
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012568# ABI version string for Python extension modules. This appears between the
12569# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12570# from the following attributes which affect the ABI of this Python build (in
12571# this order):
12572#
12573# * The Python implementation (always 'cpython-' for us)
12574# * The major and minor version numbers
12575# * --with-pydebug (adds a 'd')
12576# * --with-pymalloc (adds a 'm')
12577# * --with-wide-unicode (adds a 'u')
12578#
12579# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012580# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12581# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012582
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12584$as_echo_n "checking ABIFLAGS... " >&6; }
12585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12586$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12588$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012589SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12591$as_echo "$SOABI" >&6; }
12592
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12594$as_echo_n "checking LDVERSION... " >&6; }
12595LDVERSION='$(VERSION)$(ABIFLAGS)'
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12597$as_echo "$LDVERSION" >&6; }
12598
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012599# SO is the extension of shared libraries `(including the dot!)
12600# -- usually .so, .sl on HP-UX, .dll on Cygwin
12601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12602$as_echo_n "checking SO... " >&6; }
12603if test -z "$SO"
12604then
12605 case $ac_sys_system in
12606 hp*|HP*)
12607 case `uname -m` in
12608 ia64) SO=.so;;
12609 *) SO=.sl;;
12610 esac
12611 ;;
12612 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012613 Linux*|GNU*)
12614 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012615 *) SO=.so;;
12616 esac
12617else
12618 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012619 echo
12620 echo '====================================================================='
12621 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012622 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012623 echo '+ Do you really mean to change the extension for shared libraries? +'
12624 echo '+ Continuing in 10 seconds to let you to ponder. +'
12625 echo '+ +'
12626 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012627 sleep 10
12628fi
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12630$as_echo "$SO" >&6; }
12631
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012632# Check whether right shifting a negative integer extends the sign bit
12633# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12635$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012636if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012641 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012642else
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012644/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012645
12646int main()
12647{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012648 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012649}
12650
Martin v. Löwis11437992002-04-12 09:54:03 +000012651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012653 ac_cv_rshift_extends_sign=yes
12654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012659fi
12660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661fi
12662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12664$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012665if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012666then
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012669
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012670fi
12671
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012672# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12674$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012675if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012677else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012681#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012682int
12683main ()
12684{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012685
12686 FILE *f = fopen("/dev/null", "r");
12687 flockfile(f);
12688 getc_unlocked(f);
12689 funlockfile(f);
12690
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ;
12692 return 0;
12693}
12694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012696 ac_cv_have_getc_unlocked=yes
12697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 ac_cv_have_getc_unlocked=no
12699fi
12700rm -f core conftest.err conftest.$ac_objext \
12701 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12705$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012706if test "$ac_cv_have_getc_unlocked" = yes
12707then
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Matthias Kloseb9621712010-04-24 17:59:49 +000012709$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012710
12711fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012712
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012713# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012714# save the value of LIBS so we don't actually link Python with readline
12715LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012716
Gregory P. Smith18820942008-09-07 06:24:49 +000012717# On some systems we need to link readline to a termcap compatible
12718# library. NOTE: Keep the precedence of listed libraries synchronised
12719# with setup.py.
12720py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12722$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012723for py_libtermcap in "" ncursesw ncurses curses termcap; do
12724 if test -z "$py_libtermcap"; then
12725 READLINE_LIBS="-lreadline"
12726 else
12727 READLINE_LIBS="-lreadline -l$py_libtermcap"
12728 fi
12729 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012731/* end confdefs.h. */
12732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733/* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012739char readline ();
12740int
12741main ()
12742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012749 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012751rm -f core conftest.err conftest.$ac_objext \
12752 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012753 if test $py_cv_lib_readline = yes; then
12754 break
12755 fi
12756done
12757# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12758#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012759if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12761$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012762else
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12764$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012767
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012768fi
12769
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012770# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12772$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012773if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012775else
12776 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012777LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012779/* end confdefs.h. */
12780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781/* Override any GCC internal prototype to avoid an error.
12782 Use char because int might match the return type of a GCC
12783 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012784#ifdef __cplusplus
12785extern "C"
12786#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012787char rl_callback_handler_install ();
12788int
12789main ()
12790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012797 ac_cv_lib_readline_rl_callback_handler_install=yes
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801rm -f core conftest.err conftest.$ac_objext \
12802 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012803LIBS=$ac_check_lib_save_LIBS
12804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12806$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012807if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012810
12811fi
12812
12813
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012814# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012816/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012817#include <readline/readline.h>
12818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012819if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012820 have_readline=yes
12821else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012822 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012823
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012824fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012825rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012826if test $have_readline = yes
12827then
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012830#include <readline/readline.h>
12831
12832_ACEOF
12833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012835
Matthias Kloseb9621712010-04-24 17:59:49 +000012836$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012837
12838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012839rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012842/* end confdefs.h. */
12843#include <readline/readline.h>
12844
12845_ACEOF
12846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012850
12851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012852rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012854fi
12855
Martin v. Löwis0daad592001-09-30 21:09:59 +000012856# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12858$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012859if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012861else
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012863LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867/* Override any GCC internal prototype to avoid an error.
12868 Use char because int might match the return type of a GCC
12869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#ifdef __cplusplus
12871extern "C"
12872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012873char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012874int
12875main ()
12876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 ;
12879 return 0;
12880}
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887rm -f core conftest.err conftest.$ac_objext \
12888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012889LIBS=$ac_check_lib_save_LIBS
12890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12892$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012893if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012896
Martin v. Löwis0daad592001-09-30 21:09:59 +000012897fi
12898
Michael W. Hudson54241132001-12-07 15:38:26 +000012899
Thomas Wouters89d996e2007-09-08 17:39:28 +000012900# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12902$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012903if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012905else
12906 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012907LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012909/* end confdefs.h. */
12910
12911/* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
12914#ifdef __cplusplus
12915extern "C"
12916#endif
12917char rl_completion_display_matches_hook ();
12918int
12919main ()
12920{
12921return rl_completion_display_matches_hook ();
12922 ;
12923 return 0;
12924}
12925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012926if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012927 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012931rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012933LIBS=$ac_check_lib_save_LIBS
12934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12936$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012937if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012940
12941fi
12942
12943
Martin v. Löwis0daad592001-09-30 21:09:59 +000012944# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12946$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012947if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012949else
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012951LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955/* Override any GCC internal prototype to avoid an error.
12956 Use char because int might match the return type of a GCC
12957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012958#ifdef __cplusplus
12959extern "C"
12960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012961char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012962int
12963main ()
12964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ;
12967 return 0;
12968}
12969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975rm -f core conftest.err conftest.$ac_objext \
12976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012977LIBS=$ac_check_lib_save_LIBS
12978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12980$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012981if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012984
Guido van Rossum353ae582001-07-10 16:45:32 +000012985fi
12986
Jack Jansendd19cf82001-12-06 22:36:17 +000012987
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990/* end confdefs.h. */
12991#include <readline/readline.h>
12992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012994 have_readline=yes
12995else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012996 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012997
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012998fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012999rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013000if test $have_readline = yes
13001then
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013003/* end confdefs.h. */
13004#include <readline/readline.h>
13005
13006_ACEOF
13007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013011
13012fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013013rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013014
13015fi
13016
Martin v. Löwis82bca632006-02-10 20:49:30 +000013017# End of readline checks: restore LIBS
13018LIBS=$LIBS_no_readline
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13021$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013022if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013024else
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013027 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013030/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013031
13032int main()
13033{
13034 int val1 = nice(1);
13035 if (val1 != -1 && val1 == nice(2))
13036 exit(0);
13037 exit(1);
13038}
13039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013042 ac_cv_broken_nice=yes
13043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013048fi
13049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050fi
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13053$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013054if test "$ac_cv_broken_nice" = yes
13055then
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013058
13059fi
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13062$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013063if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013067 ac_cv_broken_poll=no
13068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013070/* end confdefs.h. */
13071
13072#include <poll.h>
13073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013074int main()
13075{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013076 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013078
13079 close (42);
13080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013082 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013083 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013084 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013085 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013086 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087 return 1;
13088}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013089
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013092 ac_cv_broken_poll=yes
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13103$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013104if test "$ac_cv_broken_poll" = yes
13105then
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013108
13109fi
13110
Brett Cannon43802422005-02-10 20:48:03 +000013111# 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 +000013112# (which is not required by ISO C or UNIX spec) and/or if we support
13113# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013114ac_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 +000013115#include <$ac_cv_struct_tm>
13116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013118if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013119
13120cat >>confdefs.h <<_ACEOF
13121#define HAVE_STRUCT_TM_TM_ZONE 1
13122_ACEOF
13123
13124
13125fi
13126
13127if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013130
13131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13133"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013134if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138fi
13139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142_ACEOF
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13145$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013146if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013150/* end confdefs.h. */
13151#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152#if !HAVE_DECL_TZNAME
13153extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013154#endif
13155
13156int
13157main ()
13158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013160 ;
13161 return 0;
13162}
13163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013165 ac_cv_var_tzname=yes
13166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013169rm -f core conftest.err conftest.$ac_objext \
13170 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13173$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013174 if test $ac_cv_var_tzname = yes; then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013177
13178 fi
13179fi
13180
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013181
Martin v. Löwis1d459062005-03-14 21:23:33 +000013182# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13184$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013185if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013187else
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013190 ac_cv_working_tzset=no
13191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013193/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013194
13195#include <stdlib.h>
13196#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013197#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013198
13199#if HAVE_TZNAME
13200extern char *tzname[];
13201#endif
13202
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013203int main()
13204{
Brett Cannon18367812003-09-19 00:59:16 +000013205 /* Note that we need to ensure that not only does tzset(3)
13206 do 'something' with localtime, but it works as documented
13207 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013208 This includes making sure that tzname is set properly if
13209 tm->tm_zone does not exist since it is the alternative way
13210 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013211
13212 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013213 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013214 */
13215
Martin v. Löwis1d459062005-03-14 21:23:33 +000013216 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013217 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13218
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013219 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013220 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013221 if (localtime(&groundhogday)->tm_hour != 0)
13222 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013223#if HAVE_TZNAME
13224 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13225 if (strcmp(tzname[0], "UTC") ||
13226 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13227 exit(1);
13228#endif
Brett Cannon18367812003-09-19 00:59:16 +000013229
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013230 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013231 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013232 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013233 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013234#if HAVE_TZNAME
13235 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13236 exit(1);
13237#endif
Brett Cannon18367812003-09-19 00:59:16 +000013238
13239 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13240 tzset();
13241 if (localtime(&groundhogday)->tm_hour != 11)
13242 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013243#if HAVE_TZNAME
13244 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13245 exit(1);
13246#endif
13247
13248#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013249 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13250 exit(1);
13251 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13252 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013253#endif
Brett Cannon18367812003-09-19 00:59:16 +000013254
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255 exit(0);
13256}
13257
13258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013259if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013260 ac_cv_working_tzset=yes
13261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013266fi
13267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13271$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013272if test "$ac_cv_working_tzset" = yes
13273then
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013276
13277fi
13278
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013279# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13281$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013282if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013287#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013288int
13289main ()
13290{
13291
13292struct stat st;
13293st.st_mtim.tv_nsec = 1;
13294
13295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013300 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305fi
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13308$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013309if test "$ac_cv_stat_tv_nsec" = yes
13310then
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013313
13314fi
13315
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013316# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13318$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013319if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013323/* end confdefs.h. */
13324#include <sys/stat.h>
13325int
13326main ()
13327{
13328
13329struct stat st;
13330st.st_mtimespec.tv_nsec = 1;
13331
13332 ;
13333 return 0;
13334}
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013337 ac_cv_stat_tv_nsec2=yes
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342fi
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13345$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013346if test "$ac_cv_stat_tv_nsec2" = yes
13347then
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013350
13351fi
13352
Jack Jansen666b1e72001-10-31 12:11:48 +000013353# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13355$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013356if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013358else
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013361#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013362int
13363main ()
13364{
Jack Jansen666b1e72001-10-31 12:11:48 +000013365
13366 int rtn;
13367 rtn = mvwdelch(0,0,0);
13368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013374 ac_cv_mvwdelch_is_expression=yes
13375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13379fi
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13382$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013383
13384if test "$ac_cv_mvwdelch_is_expression" = yes
13385then
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013388
13389fi
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13392$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013393if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013398#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013399int
13400main ()
13401{
Jack Jansen666b1e72001-10-31 12:11:48 +000013402
13403 WINDOW *w;
13404 w->_flags = 0;
13405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013411 ac_cv_window_has_flags=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13416fi
13417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13419$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013420
Jack Jansen666b1e72001-10-31 12:11:48 +000013421
13422if test "$ac_cv_window_has_flags" = yes
13423then
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013426
13427fi
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13430$as_echo_n "checking for is_term_resized... " >&6; }
13431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013432/* end confdefs.h. */
13433#include <curses.h>
13434int
13435main ()
13436{
13437void *x=is_term_resized
13438 ;
13439 return 0;
13440}
13441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013445
Matthias Kloseb159a552010-04-25 21:00:44 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13450$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013451
13452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13456$as_echo_n "checking for resize_term... " >&6; }
13457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013458/* end confdefs.h. */
13459#include <curses.h>
13460int
13461main ()
13462{
13463void *x=resize_term
13464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013471
Matthias Kloseb159a552010-04-25 21:00:44 +000013472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013473$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13476$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013477
13478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13482$as_echo_n "checking for resizeterm... " >&6; }
13483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013484/* end confdefs.h. */
13485#include <curses.h>
13486int
13487main ()
13488{
13489void *x=resizeterm
13490 ;
13491 return 0;
13492}
13493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013497
Matthias Kloseb159a552010-04-25 21:00:44 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13502$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013503
13504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13508$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013509
13510if test -r /dev/ptmx
13511then
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13513$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013516
Thomas Wouters89f507f2006-12-13 04:49:30 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013520fi
13521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13523$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013524
13525if test -r /dev/ptc
13526then
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13528$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013531
Thomas Wouters89f507f2006-12-13 04:49:30 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013535fi
13536
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013537if test "$have_long_long" = yes
13538then
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13540$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013541 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013545 ac_cv_have_long_long_format=no
13546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013548/* end confdefs.h. */
13549
13550 #include <stdio.h>
13551 #include <stddef.h>
13552 #include <string.h>
13553
13554 #ifdef HAVE_SYS_TYPES_H
13555 #include <sys/types.h>
13556 #endif
13557
13558 int main()
13559 {
13560 char buffer[256];
13561
13562 if (sprintf(buffer, "%lld", (long long)123) < 0)
13563 return 1;
13564 if (strcmp(buffer, "123"))
13565 return 1;
13566
13567 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13568 return 1;
13569 if (strcmp(buffer, "-123"))
13570 return 1;
13571
13572 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13573 return 1;
13574 if (strcmp(buffer, "123"))
13575 return 1;
13576
13577 return 0;
13578 }
13579
13580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013581if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013582 ac_cv_have_long_long_format=yes
13583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013588fi
13589
13590
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013591fi
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13594$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013595fi
13596
Mark Dickinson89d7d412009-12-31 20:50:59 +000013597if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013598then
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013601
13602fi
13603
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013604if test $ac_sys_system = Darwin
13605then
13606 LIBS="$LIBS -framework CoreFoundation"
13607fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13610$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013611if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013615 ac_cv_have_size_t_format="cross -- assuming yes"
13616
Thomas Wouters477c8d52006-05-27 19:21:47 +000013617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013619/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013620
Thomas Wouters477c8d52006-05-27 19:21:47 +000013621#include <stdio.h>
13622#include <stddef.h>
13623#include <string.h>
13624
Christian Heimes2c181612007-12-17 20:04:13 +000013625#ifdef HAVE_SYS_TYPES_H
13626#include <sys/types.h>
13627#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013628
13629#ifdef HAVE_SSIZE_T
13630typedef ssize_t Py_ssize_t;
13631#elif SIZEOF_VOID_P == SIZEOF_LONG
13632typedef long Py_ssize_t;
13633#else
13634typedef int Py_ssize_t;
13635#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013636
Christian Heimes2c181612007-12-17 20:04:13 +000013637int main()
13638{
13639 char buffer[256];
13640
Thomas Wouters477c8d52006-05-27 19:21:47 +000013641 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13642 return 1;
13643
Thomas Wouters89f507f2006-12-13 04:49:30 +000013644 if (strcmp(buffer, "123"))
13645 return 1;
13646
13647 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13648 return 1;
13649
13650 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013651 return 1;
13652
13653 return 0;
13654}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655
Thomas Wouters477c8d52006-05-27 19:21:47 +000013656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013658 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013664fi
13665
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13668$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013669if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013672
13673fi
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013676#ifdef HAVE_SYS_TYPES_H
13677#include <sys/types.h>
13678#endif
13679#ifdef HAVE_SYS_SOCKET_H
13680#include <sys/socket.h>
13681#endif
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013684if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013685
Martin v. Löwis11437992002-04-12 09:54:03 +000013686else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013689
13690fi
13691
Michael W. Hudson54241132001-12-07 15:38:26 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13694$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013695if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013699 ac_cv_broken_mbstowcs=no
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013702/* end confdefs.h. */
13703
13704#include<stdlib.h>
13705int main() {
13706 size_t len = -1;
13707 const char *str = "text";
13708 len = mbstowcs(NULL, str, 0);
13709 return (len != 4);
13710}
13711
13712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013714 ac_cv_broken_mbstowcs=no
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013720fi
13721
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13725$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013726if test "$ac_cv_broken_mbstowcs" = yes
13727then
13728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013730
13731fi
13732
Antoine Pitrou042b1282010-08-13 21:15:58 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13734$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013735if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013736 $as_echo_n "(cached) " >&6
13737else
13738 if test "$cross_compiling" = yes; then :
13739 ac_cv_computed_gotos=no
13740else
13741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13742/* end confdefs.h. */
13743
13744int main(int argc, char **argv)
13745{
13746 static void *targets[1] = { &&LABEL1 };
13747 goto LABEL2;
13748LABEL1:
13749 return 0;
13750LABEL2:
13751 goto *targets[0];
13752 return 1;
13753}
13754
13755_ACEOF
13756if ac_fn_c_try_run "$LINENO"; then :
13757 ac_cv_computed_gotos=yes
13758else
13759 ac_cv_computed_gotos=no
13760fi
13761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13762 conftest.$ac_objext conftest.beam conftest.$ac_ext
13763fi
13764
13765fi
13766
13767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13768$as_echo "$ac_cv_computed_gotos" >&6; }
13769if test "$ac_cv_computed_gotos" = yes
13770then
13771
13772$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13773
13774fi
13775
Antoine Pitroub52ec782009-01-25 16:34:23 +000013776# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13778$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013779
13780# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013782 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013783if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013784then
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13789$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013790fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013791if test "$withval" = no
13792then
13793
13794$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13797$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013798fi
13799
Antoine Pitrou042b1282010-08-13 21:15:58 +000013800else
13801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13802$as_echo "no value specified" >&6; }
13803fi
13804
Antoine Pitroub52ec782009-01-25 16:34:23 +000013805
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013806case $ac_sys_system in
13807AIX*)
13808
13809$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13810 ;;
13811esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Jesus Cea6a792292010-05-03 21:18:48 +000013814case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013815 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 +000013816esac
13817
Gregory P. Smith138fa432010-12-13 08:00:52 +000013818ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013819if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013820
13821$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13822
13823fi
Jesus Cea6a792292010-05-03 21:18:48 +000013824
13825
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013826
13827
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013828for h in `(cd $srcdir;echo Python/thread_*.h)`
13829do
13830 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13831done
13832
Michael W. Hudson54241132001-12-07 15:38:26 +000013833
Neal Norwitzd24499d2005-12-18 21:36:39 +000013834SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13836$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013837for dir in $SRCDIRS; do
13838 if test ! -d $dir; then
13839 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013840 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013841done
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13843$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013844
Guido van Rossum627b2d71993-12-24 10:39:16 +000013845# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013846ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013847
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013848ac_config_files="$ac_config_files Modules/ld_so_aix"
13849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851# This file is a shell script that caches the results of configure
13852# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013853# scripts and configure runs, see configure's option --config-cache.
13854# It is not useful on other systems. If it contains results you don't
13855# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013856#
Martin v. Löwis11437992002-04-12 09:54:03 +000013857# config.status only pays attention to the cache file if you give it
13858# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859#
Skip Montanaro6dead952003-09-25 14:50:04 +000013860# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013861# loading this file, other *unset* `ac_cv_foo' will be assigned the
13862# following values.
13863
13864_ACEOF
13865
Guido van Rossumf78abae1997-01-21 22:02:36 +000013866# The following way of writing the cache mishandles newlines in values,
13867# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013869# Ultrix sh set writes to stderr and can't be redirected directly,
13870# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871(
13872 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13873 eval ac_val=\$$ac_var
13874 case $ac_val in #(
13875 *${as_nl}*)
13876 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13878$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879 esac
13880 case $ac_var in #(
13881 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13883 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 esac ;;
13885 esac
13886 done
13887
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13890 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 # `set' does not quote correctly, so add quotes: double-quote
13892 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013894 "s/'/'\\\\''/g;
13895 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 *)
13898 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901 esac |
13902 sort
13903) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13909 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13911 :end' >>confcache
13912if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13913 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013914 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13916$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013917 if test ! -f "$cache_file" || test -h "$cache_file"; then
13918 cat confcache >"$cache_file"
13919 else
13920 case $cache_file in #(
13921 */* | ?:*)
13922 mv -f confcache "$cache_file"$$ &&
13923 mv -f "$cache_file"$$ "$cache_file" ;; #(
13924 *)
13925 mv -f confcache "$cache_file" ;;
13926 esac
13927 fi
13928 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013929 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13931$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013932 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013934rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013936test "x$prefix" = xNONE && prefix=$ac_default_prefix
13937# Let make expand exec_prefix.
13938test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013939
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013940DEFS=-DHAVE_CONFIG_H
13941
Skip Montanaro6dead952003-09-25 14:50:04 +000013942ac_libobjs=
13943ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013944U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013945for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13946 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13950 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13952 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013953done
13954LIBOBJS=$ac_libobjs
13955
13956LTLIBOBJS=$ac_ltlibobjs
13957
13958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Matthias Kloseb9621712010-04-24 17:59:49 +000013960
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013961: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013962ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013963ac_clean_files_save=$ac_clean_files
13964ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13966$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13967as_write_fail=0
13968cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013969#! $SHELL
13970# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013971# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013973# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013976ac_cs_recheck=false
13977ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979SHELL=\${CONFIG_SHELL-$SHELL}
13980export SHELL
13981_ASEOF
13982cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13983## -------------------- ##
13984## M4sh Initialization. ##
13985## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987# Be more Bourne compatible
13988DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013989if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 emulate sh
13991 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013993 # is contrary to our usage. Disable this feature.
13994 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 case `(set -o) 2>/dev/null` in #(
13998 *posix*) :
13999 set -o posix ;; #(
14000 *) :
14001 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014003fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014004
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006as_nl='
14007'
14008export as_nl
14009# Printing a long string crashes Solaris 7 /usr/bin/printf.
14010as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14011as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14012as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14013# Prefer a ksh shell builtin over an external printf program on Solaris,
14014# but without wasting forks for bash or zsh.
14015if test -z "$BASH_VERSION$ZSH_VERSION" \
14016 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14017 as_echo='print -r --'
14018 as_echo_n='print -rn --'
14019elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14020 as_echo='printf %s\n'
14021 as_echo_n='printf %s'
14022else
14023 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14024 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14025 as_echo_n='/usr/ucb/echo -n'
14026 else
14027 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14028 as_echo_n_body='eval
14029 arg=$1;
14030 case $arg in #(
14031 *"$as_nl"*)
14032 expr "X$arg" : "X\\(.*\\)$as_nl";
14033 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14034 esac;
14035 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14036 '
14037 export as_echo_n_body
14038 as_echo_n='sh -c $as_echo_n_body as_echo'
14039 fi
14040 export as_echo_body
14041 as_echo='sh -c $as_echo_body as_echo'
14042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
14044# The user is always right.
14045if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 PATH_SEPARATOR=:
14047 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14048 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14049 PATH_SEPARATOR=';'
14050 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053
14054# IFS
14055# We need space, tab and new line, in precisely that order. Quoting is
14056# there to prevent editors from complaining about space-tab.
14057# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14058# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059IFS=" "" $as_nl"
14060
14061# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014062as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014063case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064 *[\\/]* ) as_myself=$0 ;;
14065 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014066for as_dir in $PATH
14067do
14068 IFS=$as_save_IFS
14069 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074 ;;
14075esac
14076# We did not find ourselves, most probably we were run as `sh COMMAND'
14077# in which case we are not to be found in the path.
14078if test "x$as_myself" = x; then
14079 as_myself=$0
14080fi
14081if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14083 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084fi
14085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086# Unset variables that we do not need and which cause bugs (e.g. in
14087# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14088# suppresses any "Segmentation fault" message there. '((' could
14089# trigger a bug in pdksh 5.2.14.
14090for as_var in BASH_ENV ENV MAIL MAILPATH
14091do eval test x\${$as_var+set} = xset \
14092 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093done
14094PS1='$ '
14095PS2='> '
14096PS4='+ '
14097
14098# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014099LC_ALL=C
14100export LC_ALL
14101LANGUAGE=C
14102export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104# CDPATH.
14105(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14106
14107
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014108# as_fn_error STATUS ERROR [LINENO LOG_FD]
14109# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014110# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14111# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014112# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014113as_fn_error ()
14114{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014115 as_status=$1; test $as_status -eq 0 && as_status=1
14116 if test "$4"; then
14117 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14118 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014120 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 as_fn_exit $as_status
14122} # as_fn_error
14123
14124
14125# as_fn_set_status STATUS
14126# -----------------------
14127# Set $? to STATUS, without forking.
14128as_fn_set_status ()
14129{
14130 return $1
14131} # as_fn_set_status
14132
14133# as_fn_exit STATUS
14134# -----------------
14135# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14136as_fn_exit ()
14137{
14138 set +e
14139 as_fn_set_status $1
14140 exit $1
14141} # as_fn_exit
14142
14143# as_fn_unset VAR
14144# ---------------
14145# Portably unset VAR.
14146as_fn_unset ()
14147{
14148 { eval $1=; unset $1;}
14149}
14150as_unset=as_fn_unset
14151# as_fn_append VAR VALUE
14152# ----------------------
14153# Append the text in VALUE to the end of the definition contained in VAR. Take
14154# advantage of any shell optimizations that allow amortized linear growth over
14155# repeated appends, instead of the typical quadratic growth present in naive
14156# implementations.
14157if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14158 eval 'as_fn_append ()
14159 {
14160 eval $1+=\$2
14161 }'
14162else
14163 as_fn_append ()
14164 {
14165 eval $1=\$$1\$2
14166 }
14167fi # as_fn_append
14168
14169# as_fn_arith ARG...
14170# ------------------
14171# Perform arithmetic evaluation on the ARGs, and store the result in the
14172# global $as_val. Take advantage of shells that can avoid forks. The arguments
14173# must be portable across $(()) and expr.
14174if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14175 eval 'as_fn_arith ()
14176 {
14177 as_val=$(( $* ))
14178 }'
14179else
14180 as_fn_arith ()
14181 {
14182 as_val=`expr "$@" || test $? -eq 1`
14183 }
14184fi # as_fn_arith
14185
14186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187if expr a : '\(a\)' >/dev/null 2>&1 &&
14188 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14189 as_expr=expr
14190else
14191 as_expr=false
14192fi
14193
14194if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14195 as_basename=basename
14196else
14197 as_basename=false
14198fi
14199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14201 as_dirname=dirname
14202else
14203 as_dirname=false
14204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206as_me=`$as_basename -- "$0" ||
14207$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14208 X"$0" : 'X\(//\)$' \| \
14209 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014210$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211 sed '/^.*\/\([^/][^/]*\)\/*$/{
14212 s//\1/
14213 q
14214 }
14215 /^X\/\(\/\/\)$/{
14216 s//\1/
14217 q
14218 }
14219 /^X\/\(\/\).*/{
14220 s//\1/
14221 q
14222 }
14223 s/.*/./; q'`
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225# Avoid depending upon Character Ranges.
14226as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14227as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14228as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14229as_cr_digits='0123456789'
14230as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231
14232ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014233case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 xy) ECHO_C='\c';;
14238 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14239 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240 esac;;
14241*)
14242 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014244
Martin v. Löwis11437992002-04-12 09:54:03 +000014245rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246if test -d conf$$.dir; then
14247 rm -f conf$$.dir/conf$$.file
14248else
14249 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252if (echo >conf$$.file) 2>/dev/null; then
14253 if ln -s conf$$.file conf$$ 2>/dev/null; then
14254 as_ln_s='ln -s'
14255 # ... but there are two gotchas:
14256 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14257 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14258 # In both cases, we have to default to `cp -p'.
14259 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14260 as_ln_s='cp -p'
14261 elif ln conf$$.file conf$$ 2>/dev/null; then
14262 as_ln_s=ln
14263 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014266else
14267 as_ln_s='cp -p'
14268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14270rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272
14273# as_fn_mkdir_p
14274# -------------
14275# Create "$as_dir" as a directory, including parents if necessary.
14276as_fn_mkdir_p ()
14277{
14278
14279 case $as_dir in #(
14280 -*) as_dir=./$as_dir;;
14281 esac
14282 test -d "$as_dir" || eval $as_mkdir_p || {
14283 as_dirs=
14284 while :; do
14285 case $as_dir in #(
14286 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14287 *) as_qdir=$as_dir;;
14288 esac
14289 as_dirs="'$as_qdir' $as_dirs"
14290 as_dir=`$as_dirname -- "$as_dir" ||
14291$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14292 X"$as_dir" : 'X\(//\)[^/]' \| \
14293 X"$as_dir" : 'X\(//\)$' \| \
14294 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14295$as_echo X"$as_dir" |
14296 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14297 s//\1/
14298 q
14299 }
14300 /^X\(\/\/\)[^/].*/{
14301 s//\1/
14302 q
14303 }
14304 /^X\(\/\/\)$/{
14305 s//\1/
14306 q
14307 }
14308 /^X\(\/\).*/{
14309 s//\1/
14310 q
14311 }
14312 s/.*/./; q'`
14313 test -d "$as_dir" && break
14314 done
14315 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014316 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014317
14318
14319} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014320if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014322else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014323 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014324 as_mkdir_p=false
14325fi
14326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327if test -x / >/dev/null 2>&1; then
14328 as_test_x='test -x'
14329else
14330 if ls -dL / >/dev/null 2>&1; then
14331 as_ls_L_option=L
14332 else
14333 as_ls_L_option=
14334 fi
14335 as_test_x='
14336 eval sh -c '\''
14337 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 case $1 in #(
14341 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344 ???[sx]*):;;*)false;;esac;fi
14345 '\'' sh
14346 '
14347fi
14348as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
14350# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014351as_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 +000014352
14353# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
14356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014358## ----------------------------------- ##
14359## Main body of $CONFIG_STATUS script. ##
14360## ----------------------------------- ##
14361_ASEOF
14362test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14365# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014366# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367# values after options handling.
14368ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014369This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014370generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
14372 CONFIG_FILES = $CONFIG_FILES
14373 CONFIG_HEADERS = $CONFIG_HEADERS
14374 CONFIG_LINKS = $CONFIG_LINKS
14375 CONFIG_COMMANDS = $CONFIG_COMMANDS
14376 $ $0 $@
14377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378on `(hostname || uname -n) 2>/dev/null | sed 1q`
14379"
14380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381_ACEOF
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383case $ac_config_files in *"
14384"*) set x $ac_config_files; shift; ac_config_files=$*;;
14385esac
14386
14387case $ac_config_headers in *"
14388"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14389esac
14390
14391
14392cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014393# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014394config_files="$ac_config_files"
14395config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014400ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014401\`$as_me' instantiates files and other configuration actions
14402from templates according to the current configuration. Unless the files
14403and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
14407 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 --config print configuration, then exit
14410 -q, --quiet, --silent
14411 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 -d, --debug don't remove temporary files
14413 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 --file=FILE[:TEMPLATE]
14415 instantiate the configuration file FILE
14416 --header=FILE[:TEMPLATE]
14417 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
14419Configuration files:
14420$config_files
14421
14422Configuration headers:
14423$config_headers
14424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014428cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14429ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014430ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014431python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014432configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014435Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014436This config.status script is free software; the Free Software Foundation
14437gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438
14439ac_pwd='$ac_pwd'
14440srcdir='$srcdir'
14441INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014442test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14446# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014447ac_need_defaults=:
14448while test $# != 0
14449do
14450 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014451 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14453 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014454 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014456 --*=)
14457 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14458 ac_optarg=
14459 ac_shift=:
14460 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014462 ac_option=$1
14463 ac_optarg=$2
14464 ac_shift=shift
14465 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 esac
14467
Skip Montanaro6dead952003-09-25 14:50:04 +000014468 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014470 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14471 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 $as_echo "$ac_cs_version"; exit ;;
14474 --config | --confi | --conf | --con | --co | --c )
14475 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 debug=: ;;
14478 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014479 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 case $ac_optarg in
14481 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014482 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 esac
14484 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 ac_need_defaults=false;;
14486 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014487 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 case $ac_optarg in
14489 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14490 esac
14491 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 --he | --h)
14494 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014495 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014496Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014499 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14500 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14501 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
14503 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014504 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014505Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510 esac
14511 shift
14512done
14513
Skip Montanaro6dead952003-09-25 14:50:04 +000014514ac_configure_extra_args=
14515
14516if $ac_cs_silent; then
14517 exec 6>/dev/null
14518 ac_configure_extra_args="$ac_configure_extra_args --silent"
14519fi
14520
14521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014523if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14525 shift
14526 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14527 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014530fi
14531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534exec 5>>config.log
14535{
14536 echo
14537 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14538## Running $as_me. ##
14539_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548
14549# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014550for ac_config_target in $ac_config_targets
14551do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552 case $ac_config_target in
14553 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14554 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14555 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014556 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14557 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14559 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014560 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014561 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014563 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 esac
14565done
14566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568# If the user did not use the arguments to specify the items to instantiate,
14569# then the envvar interface is used. Set only those that are not.
14570# We use the long form for the default assignment because of an extremely
14571# bizarre bug on SunOS 4.1.3.
14572if $ac_need_defaults; then
14573 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14574 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14575fi
14576
Skip Montanaro6dead952003-09-25 14:50:04 +000014577# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014579# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580# Hook for its removal unless debugging.
14581# Note that there is a small window in which the directory will not be cleaned:
14582# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014583$debug ||
14584{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014585 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014586 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014587 : "${ac_tmp:=$tmp}"
14588 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014591}
Martin v. Löwis11437992002-04-12 09:54:03 +000014592# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014596 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014597} ||
14598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 tmp=./conf$$-$RANDOM
14600 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014601} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14602ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604# Set up the scripts for CONFIG_FILES section.
14605# No need to generate them if there are no CONFIG_FILES.
14606# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609
14610ac_cr=`echo X | tr X '\015'`
14611# On cygwin, bash can eat \r inside `` if the user requested igncr.
14612# But we know of no other shell where ac_cr would be empty at this
14613# point, so we can use a bashism as a fallback.
14614if test "x$ac_cr" = x; then
14615 eval ac_cr=\$\'\\r\'
14616fi
14617ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14618if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014619 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014620else
14621 ac_cs_awk_cr=$ac_cr
14622fi
14623
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014624echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014625_ACEOF
14626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{
14629 echo "cat >conf$$subs.awk <<_ACEOF" &&
14630 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14631 echo "_ACEOF"
14632} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14634ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635ac_delim='%!_!# '
14636for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014638 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14641 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642 break
14643 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014644 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645 else
14646 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648done
Matthias Kloseb9621712010-04-24 17:59:49 +000014649rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014652cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654sed -n '
14655h
14656s/^/S["/; s/!.*/"]=/
14657p
14658g
14659s/^[^!]*!//
14660:repl
14661t repl
14662s/'"$ac_delim"'$//
14663t delim
14664:nl
14665h
14666s/\(.\{148\}\)..*/\1/
14667t more1
14668s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14669p
14670n
14671b repl
14672:more1
14673s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14674p
14675g
14676s/.\{148\}//
14677t nl
14678:delim
14679h
14680s/\(.\{148\}\)..*/\1/
14681t more2
14682s/["\\]/\\&/g; s/^/"/; s/$/"/
14683p
14684b
14685:more2
14686s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14687p
14688g
14689s/.\{148\}//
14690t delim
14691' <conf$$subs.awk | sed '
14692/^[^""]/{
14693 N
14694 s/\n//
14695}
14696' >>$CONFIG_STATUS || ac_write_fail=1
14697rm -f conf$$subs.awk
14698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14699_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014700cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 for (key in S) S_is_set[key] = 1
14702 FS = ""
14703
14704}
14705{
14706 line = $ 0
14707 nfields = split(line, field, "@")
14708 substed = 0
14709 len = length(field[1])
14710 for (i = 2; i < nfields; i++) {
14711 key = field[i]
14712 keylen = length(key)
14713 if (S_is_set[key]) {
14714 value = S[key]
14715 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14716 len += length(value) + length(field[++i])
14717 substed = 1
14718 } else
14719 len += 1 + keylen
14720 }
14721
14722 print line
14723}
14724
14725_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14728if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14729 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14730else
14731 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014732fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14733 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014734_ACEOF
14735
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014736# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14737# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738# trailing colons and then remove the whole line if VPATH becomes empty
14739# (actually we leave an empty line to preserve line numbers).
14740if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014741 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14742h
14743s///
14744s/^/:/
14745s/[ ]*$/:/
14746s/:\$(srcdir):/:/g
14747s/:\${srcdir}:/:/g
14748s/:@srcdir@:/:/g
14749s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014751x
14752s/\(=[ ]*\).*/\1/
14753G
14754s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755s/^[^=]*=[ ]*$//
14756}'
14757fi
14758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014760fi # test -n "$CONFIG_FILES"
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762# Set up the scripts for CONFIG_HEADERS section.
14763# No need to generate them if there are no CONFIG_HEADERS.
14764# This happens for instance with `./config.status Makefile'.
14765if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014766cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014767BEGIN {
14768_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770# Transform confdefs.h into an awk script `defines.awk', embedded as
14771# here-document in config.status, that substitutes the proper values into
14772# config.h.in to produce config.h.
14773
14774# Create a delimiter string that does not exist in confdefs.h, to ease
14775# handling of long lines.
14776ac_delim='%!_!# '
14777for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014778 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14779 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 break
14781 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014782 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 else
14784 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14785 fi
14786done
14787
14788# For the awk script, D is an array of macro values keyed by name,
14789# likewise P contains macro parameters if any. Preserve backslash
14790# newline sequences.
14791
14792ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14793sed -n '
14794s/.\{148\}/&'"$ac_delim"'/g
14795t rset
14796:rset
14797s/^[ ]*#[ ]*define[ ][ ]*/ /
14798t def
14799d
14800:def
14801s/\\$//
14802t bsnl
14803s/["\\]/\\&/g
14804s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14805D["\1"]=" \3"/p
14806s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14807d
14808:bsnl
14809s/["\\]/\\&/g
14810s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14811D["\1"]=" \3\\\\\\n"\\/p
14812t cont
14813s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14814t cont
14815d
14816:cont
14817n
14818s/.\{148\}/&'"$ac_delim"'/g
14819t clear
14820:clear
14821s/\\$//
14822t bsnlc
14823s/["\\]/\\&/g; s/^/"/; s/$/"/p
14824d
14825:bsnlc
14826s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14827b cont
14828' <confdefs.h | sed '
14829s/'"$ac_delim"'/"\\\
14830"/g' >>$CONFIG_STATUS || ac_write_fail=1
14831
14832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14833 for (key in D) D_is_set[key] = 1
14834 FS = ""
14835}
14836/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14837 line = \$ 0
14838 split(line, arg, " ")
14839 if (arg[1] == "#") {
14840 defundef = arg[2]
14841 mac1 = arg[3]
14842 } else {
14843 defundef = substr(arg[1], 2)
14844 mac1 = arg[2]
14845 }
14846 split(mac1, mac2, "(") #)
14847 macro = mac2[1]
14848 prefix = substr(line, 1, index(line, defundef) - 1)
14849 if (D_is_set[macro]) {
14850 # Preserve the white space surrounding the "#".
14851 print prefix "define", macro P[macro] D[macro]
14852 next
14853 } else {
14854 # Replace #undef with comments. This is necessary, for example,
14855 # in the case of _POSIX_SOURCE, which is predefined and required
14856 # on some systems where configure will not decide to define it.
14857 if (defundef == "undef") {
14858 print "/*", prefix defundef, macro, "*/"
14859 next
14860 }
14861 }
14862}
14863{ print }
14864_ACAWK
14865_ACEOF
14866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014867 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014868fi # test -n "$CONFIG_HEADERS"
14869
14870
14871eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14872shift
14873for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874do
14875 case $ac_tag in
14876 :[FHLC]) ac_mode=$ac_tag; continue;;
14877 esac
14878 case $ac_mode$ac_tag in
14879 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014880 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 :[FH]-) ac_tag=-:-;;
14882 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14883 esac
14884 ac_save_IFS=$IFS
14885 IFS=:
14886 set x $ac_tag
14887 IFS=$ac_save_IFS
14888 shift
14889 ac_file=$1
14890 shift
14891
14892 case $ac_mode in
14893 :L) ac_source=$1;;
14894 :[FH])
14895 ac_file_inputs=
14896 for ac_f
14897 do
14898 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014899 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 *) # Look for the file first in the build tree, then in the source tree
14901 # (if the path is not absolute). The absolute path cannot be DOS-style,
14902 # because $ac_f cannot contain `:'.
14903 test -f "$ac_f" ||
14904 case $ac_f in
14905 [\\/$]*) false;;
14906 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14907 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014908 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14911 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912 done
14913
14914 # Let's still pretend it is `configure' which instantiates (i.e., don't
14915 # use $as_me), people would be surprised to read:
14916 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 configure_input='Generated from '`
14918 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14919 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920 if test x"$ac_file" != x-; then
14921 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14923$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 # Neutralize special characters interpreted by sed in replacement strings.
14926 case $configure_input in #(
14927 *\&* | *\|* | *\\* )
14928 ac_sed_conf_input=`$as_echo "$configure_input" |
14929 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14930 *) ac_sed_conf_input=$configure_input;;
14931 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932
14933 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014934 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14935 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936 esac
14937 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 esac
14939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014941$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942 X"$ac_file" : 'X\(//\)[^/]' \| \
14943 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014945$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14947 s//\1/
14948 q
14949 }
14950 /^X\(\/\/\)[^/].*/{
14951 s//\1/
14952 q
14953 }
14954 /^X\(\/\/\)$/{
14955 s//\1/
14956 q
14957 }
14958 /^X\(\/\).*/{
14959 s//\1/
14960 q
14961 }
14962 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 ac_builddir=.
14965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966case "$ac_dir" in
14967.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14968*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972 case $ac_top_builddir_sub in
14973 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14974 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14975 esac ;;
14976esac
14977ac_abs_top_builddir=$ac_pwd
14978ac_abs_builddir=$ac_pwd$ac_dir_suffix
14979# for backward compatibility:
14980ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014981
14982case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 ac_top_srcdir=$ac_top_builddir_sub
14986 ac_abs_top_srcdir=$ac_pwd ;;
14987 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989 ac_top_srcdir=$srcdir
14990 ac_abs_top_srcdir=$srcdir ;;
14991 *) # Relative name.
14992 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14993 ac_top_srcdir=$ac_top_build_prefix$srcdir
14994 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014995esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 case $ac_mode in
15000 :F)
15001 #
15002 # CONFIG_FILE
15003 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
15005 case $INSTALL in
15006 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015009_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012# If the template does not know about datarootdir, expand it.
15013# FIXME: This hack should be removed a few years after 2.60.
15014ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015015ac_sed_dataroot='
15016/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 p
15018 q
15019}
15020/@datadir@/p
15021/@docdir@/p
15022/@infodir@/p
15023/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015024/@mandir@/p'
15025case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026*datarootdir*) ac_datarootdir_seen=yes;;
15027*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15029$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 ac_datarootdir_hack='
15033 s&@datadir@&$datadir&g
15034 s&@docdir@&$docdir&g
15035 s&@infodir@&$infodir&g
15036 s&@localedir@&$localedir&g
15037 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039esac
15040_ACEOF
15041
15042# Neutralize VPATH when `$srcdir' = `.'.
15043# Shell code in configure.ac might set extrasub.
15044# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15046ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015047$extrasub
15048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050:t
15051/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015052s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015054s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055s&@srcdir@&$ac_srcdir&;t t
15056s&@abs_srcdir@&$ac_abs_srcdir&;t t
15057s&@top_srcdir@&$ac_top_srcdir&;t t
15058s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15059s&@builddir@&$ac_builddir&;t t
15060s&@abs_builddir@&$ac_abs_builddir&;t t
15061s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15062s&@INSTALL@&$ac_INSTALL&;t t
15063$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015064"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015065eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15066 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015069 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15070 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15071 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 { $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 +000015073which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015074$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015075which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015076
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015077 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015079 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15080 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015081 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015082 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083 ;;
15084 :H)
15085 #
15086 # CONFIG_HEADER
15087 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 {
15090 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015091 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15092 } >"$ac_tmp/config.h" \
15093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15094 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15096$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015099 mv "$ac_tmp/config.h" "$ac_file" \
15100 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 fi
15102 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015104 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15105 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109
15110 esac
15111
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015112
15113 case $ac_file$ac_mode in
15114 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15115
15116 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117done # for ac_tag
15118
Guido van Rossum627b2d71993-12-24 10:39:16 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015121_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015122ac_clean_files=$ac_clean_files_save
15123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015125 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015126
Martin v. Löwis11437992002-04-12 09:54:03 +000015127
15128# configure is writing to config.log, and then calls config.status.
15129# config.status does its own redirection, appending to config.log.
15130# Unfortunately, on DOS this fails, as config.log is still kept open
15131# by configure, so config.status won't be able to write to it; its
15132# output is simply discarded. So we exec the FD to /dev/null,
15133# effectively closing config.log, so it can be properly (re)opened and
15134# appended to by config.status. When coming back to configure, we
15135# need to make the FD available again.
15136if test "$no_create" != yes; then
15137 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015138 ac_config_status_args=
15139 test "$silent" = yes &&
15140 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 exec 5>>config.log
15144 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15145 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015146 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015147fi
15148if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15150$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015151fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015152
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015153
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015154echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015155if test ! -f Modules/Setup
15156then
15157 cp $srcdir/Modules/Setup.dist Modules/Setup
15158fi
15159
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015160echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015161if test ! -f Modules/Setup.local
15162then
15163 echo "# Edit this file for local setup changes" >Modules/Setup.local
15164fi
15165
15166echo "creating Makefile"
15167$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15168 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015169 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015170mv config.c Modules