blob: f87f7ef6cb5571368fccd86e3c613bb1eda6615f [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 +0000651SVNVERSION
652ARFLAGS
653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
671MAINCC
672CXX
673OBJEXT
674EXEEXT
675ac_ct_CC
676CPPFLAGS
677LDFLAGS
678CFLAGS
679CC
680EXPORT_MACOSX_DEPLOYMENT_TARGET
681CONFIGURE_MACOSX_DEPLOYMENT_TARGET
682SGI_ABI
683MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000684FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
701target_alias
702host_alias
703build_alias
704LIBS
705ECHO_T
706ECHO_N
707ECHO_C
708DEFS
709mandir
710localedir
711libdir
712psdir
713pdfdir
714dvidir
715htmldir
716infodir
717docdir
718oldincludedir
719includedir
720localstatedir
721sharedstatedir
722sysconfdir
723datadir
724datarootdir
725libexecdir
726sbindir
727bindir
728program_transform_name
729prefix
730exec_prefix
731PACKAGE_URL
732PACKAGE_BUGREPORT
733PACKAGE_STRING
734PACKAGE_VERSION
735PACKAGE_TARNAME
736PACKAGE_NAME
737PATH_SEPARATOR
738SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000740ac_user_opts='
741enable_option_checking
742enable_universalsdk
743with_universal_archs
744with_framework_name
745enable_framework
746with_gcc
747with_cxx_main
748with_suffix
749enable_shared
750enable_profiling
751with_pydebug
752with_libs
753with_system_expat
754with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000755enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000756with_dbmliborder
757with_signal_module
758with_dec_threads
759with_threads
760with_thread
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000766with_fpectl
767with_libm
768with_libc
769enable_big_digits
770with_wide_unicode
771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
1430 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1431 --with(out)-threads[=DIRECTORY]
1432 disable/enable thread support
1433 --with(out)-thread[=DIRECTORY]
1434 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001436 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001438 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with-fpectl enable SIGFPE catching
1440 --with-libm=STRING math library
1441 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001442 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001443 --with(out)-computed-gotos
1444 Use computed gotos in evaluation loop (enabled by
1445 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Some influential environment variables:
1448 CC C compiler command
1449 CFLAGS C compiler flags
1450 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1451 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001453 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 CPP C preprocessor
1456
1457Use these variables to override the choices made by `configure' or to help
1458it to find libraries and programs with nonstandard names/locations.
1459
Georg Brandle2e15612009-05-20 18:25:10 +00001460Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001463fi
1464
1465if test "$ac_init_help" = "recursive"; then
1466 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 test -d "$ac_dir" ||
1469 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1470 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_builddir=.
1472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473case "$ac_dir" in
1474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 case $ac_top_builddir_sub in
1480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1482 esac ;;
1483esac
1484ac_abs_top_builddir=$ac_pwd
1485ac_abs_builddir=$ac_pwd$ac_dir_suffix
1486# for backward compatibility:
1487ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 ac_top_srcdir=$ac_top_builddir_sub
1493 ac_abs_top_srcdir=$ac_pwd ;;
1494 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 ac_top_srcdir=$srcdir
1497 ac_abs_top_srcdir=$srcdir ;;
1498 *) # Relative name.
1499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1500 ac_top_srcdir=$ac_top_build_prefix$srcdir
1501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001502esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 cd "$ac_dir" || { ac_status=$?; continue; }
1506 # Check for guested configure.
1507 if test -f "$ac_srcdir/configure.gnu"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1510 elif test -f "$ac_srcdir/configure"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 fi || ac_status=$?
1516 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 done
1518fi
1519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001521if $ac_init_version; then
1522 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001523python configure 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001524generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001526Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001527This configure script is free software; the Free Software Foundation
1528gives unlimited permission to copy, distribute and modify it.
1529_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001532
1533## ------------------------ ##
1534## Autoconf initialization. ##
1535## ------------------------ ##
1536
1537# ac_fn_c_try_compile LINENO
1538# --------------------------
1539# Try to compile conftest.$ac_ext, and return whether this succeeded.
1540ac_fn_c_try_compile ()
1541{
1542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1543 rm -f conftest.$ac_objext
1544 if { { ac_try="$ac_compile"
1545case "(($ac_try" in
1546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1547 *) ac_try_echo=$ac_try;;
1548esac
1549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1550$as_echo "$ac_try_echo"; } >&5
1551 (eval "$ac_compile") 2>conftest.err
1552 ac_status=$?
1553 if test -s conftest.err; then
1554 grep -v '^ *+' conftest.err >conftest.er1
1555 cat conftest.er1 >&5
1556 mv -f conftest.er1 conftest.err
1557 fi
1558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1559 test $ac_status = 0; } && {
1560 test -z "$ac_c_werror_flag" ||
1561 test ! -s conftest.err
1562 } && test -s conftest.$ac_objext; then :
1563 ac_retval=0
1564else
1565 $as_echo "$as_me: failed program was:" >&5
1566sed 's/^/| /' conftest.$ac_ext >&5
1567
1568 ac_retval=1
1569fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 as_fn_set_status $ac_retval
1572
1573} # ac_fn_c_try_compile
1574
1575# ac_fn_c_try_cpp LINENO
1576# ----------------------
1577# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_cpp ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 if { { ac_try="$ac_cpp conftest.$ac_ext"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001596 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 }; then :
1600 ac_retval=0
1601else
1602 $as_echo "$as_me: failed program was:" >&5
1603sed 's/^/| /' conftest.$ac_ext >&5
1604
1605 ac_retval=1
1606fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001607 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_cpp
1611
1612# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1613# -------------------------------------------------------
1614# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1615# the include files in INCLUDES and setting the cache variable VAR
1616# accordingly.
1617ac_fn_c_check_header_mongrel ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001620 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1622$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001623if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo_n "(cached) " >&6
1625fi
1626eval ac_res=\$$3
1627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1628$as_echo "$ac_res" >&6; }
1629else
1630 # Is the header compilable?
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1632$as_echo_n "checking $2 usability... " >&6; }
1633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1634/* end confdefs.h. */
1635$4
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_compile "$LINENO"; then :
1639 ac_header_compiler=yes
1640else
1641 ac_header_compiler=no
1642fi
1643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1645$as_echo "$ac_header_compiler" >&6; }
1646
1647# Is the header present?
1648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1649$as_echo_n "checking $2 presence... " >&6; }
1650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1651/* end confdefs.h. */
1652#include <$2>
1653_ACEOF
1654if ac_fn_c_try_cpp "$LINENO"; then :
1655 ac_header_preproc=yes
1656else
1657 ac_header_preproc=no
1658fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001659rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1661$as_echo "$ac_header_preproc" >&6; }
1662
1663# So? What about this header?
1664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1665 yes:no: )
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1667$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1669$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1670 ;;
1671 no:yes:* )
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1673$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1675$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1677$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1679$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1681$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001682( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001683## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001684## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 ) | sed "s/^/$as_me: WARNING: /" >&2
1686 ;;
1687esac
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1689$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001690if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 $as_echo_n "(cached) " >&6
1692else
1693 eval "$3=\$ac_header_compiler"
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001699 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001700
1701} # ac_fn_c_check_header_mongrel
1702
1703# ac_fn_c_try_run LINENO
1704# ----------------------
1705# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1706# that executables *can* be run.
1707ac_fn_c_try_run ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if { { ac_try="$ac_link"
1711case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_link") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1721 { { case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_try") 2>&5
1728 ac_status=$?
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; }; }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: program exited with status $ac_status" >&5
1734 $as_echo "$as_me: failed program was:" >&5
1735sed 's/^/| /' conftest.$ac_ext >&5
1736
1737 ac_retval=$ac_status
1738fi
1739 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 as_fn_set_status $ac_retval
1742
1743} # ac_fn_c_try_run
1744
1745# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1746# -------------------------------------------------------
1747# Tests whether HEADER exists and can be compiled using the include files in
1748# INCLUDES, setting the cache variable VAR accordingly.
1749ac_fn_c_check_header_compile ()
1750{
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001754if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 $as_echo_n "(cached) " >&6
1756else
1757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 eval "$3=yes"
1764else
1765 eval "$3=no"
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768fi
1769eval ac_res=\$$3
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001773
1774} # ac_fn_c_check_header_compile
1775
1776# ac_fn_c_try_link LINENO
1777# -----------------------
1778# Try to link conftest.$ac_ext, and return whether this succeeded.
1779ac_fn_c_try_link ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782 rm -f conftest.$ac_objext conftest$ac_exeext
1783 if { { ac_try="$ac_link"
1784case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_link") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } && {
1799 test -z "$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 } && test -s conftest$ac_exeext && {
1802 test "$cross_compiling" = yes ||
1803 $as_test_x conftest$ac_exeext
1804 }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: failed program was:" >&5
1808sed 's/^/| /' conftest.$ac_ext >&5
1809
1810 ac_retval=1
1811fi
1812 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1813 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1814 # interfere with the next link command; also delete a directory that is
1815 # left behind by Apple's compiler. We do this before executing the actions.
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_link
1821
1822# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1823# -------------------------------------------
1824# Tests whether TYPE exists after having included INCLUDES, setting cache
1825# variable VAR accordingly.
1826ac_fn_c_check_type ()
1827{
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001831if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 $as_echo_n "(cached) " >&6
1833else
1834 eval "$3=no"
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838int
1839main ()
1840{
1841if (sizeof ($2))
1842 return 0;
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850$4
1851int
1852main ()
1853{
1854if (sizeof (($2)))
1855 return 0;
1856 ;
1857 return 0;
1858}
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861
1862else
1863 eval "$3=yes"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868fi
1869eval ac_res=\$$3
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1871$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001873
1874} # ac_fn_c_check_type
1875
1876# ac_fn_c_find_uintX_t LINENO BITS VAR
1877# ------------------------------------
1878# Finds an unsigned integer type with width BITS, setting cache variable VAR
1879# accordingly.
1880ac_fn_c_find_uintX_t ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1884$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001885if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001886 $as_echo_n "(cached) " >&6
1887else
1888 eval "$3=no"
1889 # Order is important - never check a type that is potentially smaller
1890 # than half of the expected target width.
1891 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1892 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$ac_includes_default
1896int
1897main ()
1898{
1899static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1900test_array [0] = 0
1901
1902 ;
1903 return 0;
1904}
1905_ACEOF
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 case $ac_type in #(
1908 uint$2_t) :
1909 eval "$3=yes" ;; #(
1910 *) :
1911 eval "$3=\$ac_type" ;;
1912esac
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001915 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917else
1918 break
1919fi
1920 done
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_find_uintX_t
1928
1929# ac_fn_c_find_intX_t LINENO BITS VAR
1930# -----------------------------------
1931# Finds a signed integer type with width BITS, setting cache variable VAR
1932# accordingly.
1933ac_fn_c_find_intX_t ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1937$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 # Order is important - never check a type that is potentially smaller
1943 # than half of the expected target width.
1944 for ac_type in int$2_t 'int' 'long int' \
1945 'long long int' 'short int' 'signed char'; do
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001949 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001950int
1951main ()
1952{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001953static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001964 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001965int
1966main ()
1967{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001969 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1970test_array [0] = 0
1971
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977
1978else
1979 case $ac_type in #(
1980 int$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991else
1992 break
1993fi
1994 done
1995fi
1996eval ac_res=\$$3
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002000
2001} # ac_fn_c_find_intX_t
2002
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
2037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
2054else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
2079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
2113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
2248# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2249# ----------------------------------------------------
2250# Tries to find if the field MEMBER exists in type AGGR, after including
2251# INCLUDES, setting cache variable VAR accordingly.
2252ac_fn_c_check_member ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2256$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002257if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$5
2279int
2280main ()
2281{
2282static $2 ac_aggr;
2283if (sizeof ac_aggr.$3)
2284return 0;
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_compile "$LINENO"; then :
2290 eval "$4=yes"
2291else
2292 eval "$4=no"
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298eval ac_res=\$$4
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2300$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002301 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002302
2303} # ac_fn_c_check_member
2304
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002305# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2306# ---------------------------------------------
2307# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2308# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002309ac_fn_c_check_decl ()
2310{
2311 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002312 as_decl_name=`echo $2|sed 's/ *(.*//'`
2313 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2315$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2316if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002317 $as_echo_n "(cached) " >&6
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$4
2322int
2323main ()
2324{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002325#ifndef $as_decl_name
2326#ifdef __cplusplus
2327 (void) $as_decl_use;
2328#else
2329 (void) $as_decl_name;
2330#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002331#endif
2332
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$3=yes"
2339else
2340 eval "$3=no"
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$3
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002354It was created by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002355generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
2613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706
Benjamin Petersond23f8222009-04-05 19:13:16 +00002707if test "$prefix" != "/"; then
2708 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2709fi
2710
2711
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
2713
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002714# We don't use PACKAGE_ variables, and they cause conflicts
2715# with other autoconf-based packages that include Python.h
2716grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2717rm confdefs.h
2718mv confdefs.h.new confdefs.h
2719
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002720
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002721VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002722
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002723# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002724
2725SOVERSION=1.0
2726
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002727# The later defininition of _XOPEN_SOURCE disables certain features
2728# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2729
Matthias Kloseb9621712010-04-24 17:59:49 +00002730$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002731
2732
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2735# them.
2736
Matthias Kloseb9621712010-04-24 17:59:49 +00002737$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002738
2739
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2742# them.
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002745
2746
Martin v. Löwisd6320502004-08-12 13:45:08 +00002747# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2748# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002751
2752
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002753# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2754# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2755# them.
2756
Matthias Kloseb9621712010-04-24 17:59:49 +00002757$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002758
2759
2760
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002761define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002762
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002763# Arguments passed to configure.
2764
2765CONFIG_ARGS="$ac_configure_args"
2766
Matthias Kloseb9621712010-04-24 17:59:49 +00002767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2768$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002770if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002772 case $enableval in
2773 yes)
2774 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 if test ! -d "${enableval}"
2776 then
2777 enableval=/
2778 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779 ;;
2780 esac
2781 case $enableval in
2782 no)
2783 UNIVERSALSDK=
2784 enable_universalsdk=
2785 ;;
2786 *)
2787 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002788 if test ! -d "${UNIVERSALSDK}"
2789 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002790 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792 ;;
2793 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002794
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002795
Thomas Wouters477c8d52006-05-27 19:21:47 +00002796else
2797
2798 UNIVERSALSDK=
2799 enable_universalsdk=
2800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002802
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002803if test -n "${UNIVERSALSDK}"
2804then
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2806$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002807else
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002810fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002813
2814
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002816
Matthias Kloseb9621712010-04-24 17:59:49 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2818$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002819
2820# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002821if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002822 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2824$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002825 UNIVERSAL_ARCHS="$withval"
2826
2827else
2828
Matthias Kloseb9621712010-04-24 17:59:49 +00002829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2830$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002831
2832fi
2833
2834
2835
2836
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002837
2838# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002839if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002840 withval=$with_framework_name;
2841 PYTHONFRAMEWORK=${withval}
2842 PYTHONFRAMEWORKDIR=${withval}.framework
2843 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2844
2845else
2846
2847 PYTHONFRAMEWORK=Python
2848 PYTHONFRAMEWORKDIR=Python.framework
2849 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2850
2851fi
2852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002853# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002854if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002856 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002858 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 esac
2860 case $enableval in
2861 no)
2862 PYTHONFRAMEWORK=
2863 PYTHONFRAMEWORKDIR=no-framework
2864 PYTHONFRAMEWORKPREFIX=
2865 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002866 FRAMEWORKINSTALLFIRST=
2867 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 FRAMEWORKALTINSTALLFIRST=
2869 FRAMEWORKALTINSTALLLAST=
2870 if test "x${prefix}" = "xNONE"; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2872 else
2873 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2874 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002875 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002876 ;;
2877 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002878 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002879 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002880 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002881 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002882 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2883 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002884 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002885
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 if test "x${prefix}" = "xNONE" ; then
2887 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002888
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002889 else
2890 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2891 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002892
2893 case "${enableval}" in
2894 /System*)
2895 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2896 if test "${prefix}" = "NONE" ; then
2897 # See below
2898 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2899 fi
2900 ;;
2901
2902 /Library*)
2903 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2904 ;;
2905
2906 */Library/Frameworks)
2907 MDIR="`dirname "${enableval}"`"
2908 MDIR="`dirname "${MDIR}"`"
2909 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2910
2911 if test "${prefix}" = "NONE"; then
2912 # User hasn't specified the
2913 # --prefix option, but wants to install
2914 # the framework in a non-default location,
2915 # ensure that the compatibility links get
2916 # installed relative to that prefix as well
2917 # instead of in /usr/local.
2918 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2919 fi
2920 ;;
2921
2922 *)
2923 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2924 ;;
2925 esac
2926
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002929 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002933 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002935 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2936
2937 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2938
Jack Jansene578a632001-08-15 01:27:14 +00002939 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Guido van Rossum563e7081996-09-10 18:20:48 +00002941else
Martin v. Löwis11437992002-04-12 09:54:03 +00002942
Jack Jansene578a632001-08-15 01:27:14 +00002943 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002944 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002945 PYTHONFRAMEWORKPREFIX=
2946 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002947 FRAMEWORKINSTALLFIRST=
2948 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002949 FRAMEWORKALTINSTALLFIRST=
2950 FRAMEWORKALTINSTALLLAST=
2951 if test "x${prefix}" = "xNONE" ; then
2952 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2953 else
2954 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2955 fi
Jack Jansene578a632001-08-15 01:27:14 +00002956 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002957
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002959fi
2960
Thomas Wouters477c8d52006-05-27 19:21:47 +00002961
2962
Michael W. Hudson54241132001-12-07 15:38:26 +00002963
2964
2965
2966
Jack Jansene578a632001-08-15 01:27:14 +00002967
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002968
2969
2970
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002971
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002972
Jack Jansene578a632001-08-15 01:27:14 +00002973##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002974## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002975## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002976##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977# Set name for machine-dependent library files
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2980$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002981if test -z "$MACHDEP"
2982then
Guido van Rossum563e7081996-09-10 18:20:48 +00002983 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002984 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002985 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002987 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002990 ac_md_system=`echo $ac_sys_system |
2991 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2992 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002993 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002994 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002995
Guido van Rossum07397971997-04-29 21:49:50 +00002996 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002997 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002998 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002999 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003000 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003001 esac
3002fi
Guido van Rossum91922671997-10-09 20:24:13 +00003003
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003004# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3005# disable features if it is defined, without any means to access these
3006# features as extensions. For these systems, we skip the definition of
3007# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3008# some feature, make sure there is no alternative way to access this
3009# feature. Also, when using wildcards, make sure you have verified the
3010# need for not defining _XOPEN_SOURCE on all systems matching the
3011# wildcard, and that the wildcard does not include future systems
3012# (which may remove their limitations).
3013case $ac_sys_system/$ac_sys_release in
3014 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3015 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003016 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003017 # In addition, Stefan Krah confirms that issue #1244610 exists through
3018 # OpenBSD 4.6, but is fixed in 4.7.
3019 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003020 define_xopen_source=no
3021 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3022 # also defined. This can be overridden by defining _BSD_SOURCE
3023 # As this has a different meaning on Linux, only define it on OpenBSD
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003026
3027 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003028 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003029 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3030 # also defined. This can be overridden by defining _BSD_SOURCE
3031 # As this has a different meaning on Linux, only define it on OpenBSD
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003034
3035 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003036 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3037 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3038 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003039 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003040 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003041 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3042 # request to enable features supported by the standard as a request
3043 # to disable features not supported by the standard. The best way
3044 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3045 # entirely and define __EXTENSIONS__ instead.
3046 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003047 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003048 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3049 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003050 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003051 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003052 define_xopen_source=no;;
3053 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003054 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003056 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003057 # On FreeBSD 4, the math functions C89 does not cover are never defined
3058 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3059 FreeBSD/4.*)
3060 define_xopen_source=no;;
3061 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3062 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3063 # identifies itself as Darwin/7.*
3064 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3065 # disables platform specific features beyond repair.
3066 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3067 # has no effect, don't bother defining them
3068 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003069 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003070 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003071 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003072 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3073 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3074 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003075 AIX/4)
3076 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003077 AIX/5)
3078 if test `uname -r` -eq 1; then
3079 define_xopen_source=no
3080 fi
3081 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003082 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3083 # defining NI_NUMERICHOST.
3084 QNX/6.3.2)
3085 define_xopen_source=no
3086 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003087
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003088esac
3089
3090if test $define_xopen_source = yes
3091then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003092
Matthias Kloseb9621712010-04-24 17:59:49 +00003093$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003094
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
3096 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3097 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3098 # several APIs are not declared. Since this is also needed in some
3099 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003102
3103
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
3107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003108fi
3109
Guido van Rossum91922671997-10-09 20:24:13 +00003110#
3111# SGI compilers allow the specification of the both the ABI and the
3112# ISA on the command line. Depending on the values of these switches,
3113# different and often incompatable code will be generated.
3114#
3115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3116# thus supply support for various ABI/ISA combinations. The MACHDEP
3117# variable is also adjusted.
3118#
3119
3120if test ! -z "$SGI_ABI"
3121then
3122 CC="cc $SGI_ABI"
3123 LDFLAGS="$SGI_ABI $LDFLAGS"
3124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3127$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003128
Jack Jansen6b08a402004-06-03 12:41:45 +00003129# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3130# it may influence the way we can build extensions, so distutils
3131# needs to check it
3132
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133
Jack Jansen6b08a402004-06-03 12:41:45 +00003134CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003136
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3138$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003139ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3141$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003142
Guido van Rossum627b2d71993-12-24 10:39:16 +00003143# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003144
3145# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3146# for debug/optimization stuff. BASECFLAGS is for flags that are required
3147# just to get things to compile and link. Users are free to override OPT
3148# when running configure or make. The build should not break if they do.
3149# BASECFLAGS should generally not be messed with, however.
3150
3151# XXX shouldn't some/most/all of this code be merged with the stuff later
3152# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3154$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003157if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003159 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003160 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003161 without_gcc=yes;;
3162 yes) CC=gcc
3163 without_gcc=no;;
3164 *) CC=$withval
3165 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003166 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003167else
Martin v. Löwis11437992002-04-12 09:54:03 +00003168
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003169 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003170 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003171 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003172 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174fi
3175
Matthias Kloseb9621712010-04-24 17:59:49 +00003176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3177$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003178
Guido van Rossum8b131c51995-03-09 14:10:13 +00003179# If the user switches compilers, we can't believe the cache
3180if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3181then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003182 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003183(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003184fi
3185
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003186# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3187# when the compiler supports them, but we don't always want -O2, and
3188# we set -g later.
3189if test -z "$CFLAGS"; then
3190 CFLAGS=
3191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003192ac_ext=c
3193ac_cpp='$CPP $CPPFLAGS'
3194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3196ac_compiler_gnu=$ac_cv_c_compiler_gnu
3197if test -n "$ac_tool_prefix"; then
3198 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3199set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3201$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003202if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003204else
3205 if test -n "$CC"; then
3206 ac_cv_prog_CC="$CC" # Let the user override the test.
3207else
Martin v. Löwis11437992002-04-12 09:54:03 +00003208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3209for as_dir in $PATH
3210do
3211 IFS=$as_save_IFS
3212 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003215 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003217 break 2
3218 fi
3219done
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Jack Jansendd19cf82001-12-06 22:36:17 +00003223fi
3224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003225CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003226if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3228$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003229else
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3231$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003232fi
3233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234
Martin v. Löwis11437992002-04-12 09:54:03 +00003235fi
3236if test -z "$ac_cv_prog_CC"; then
3237 ac_ct_CC=$CC
3238 # Extract the first word of "gcc", so it can be a program name with args.
3239set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3241$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003242if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003244else
3245 if test -n "$ac_ct_CC"; then
3246 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3247else
3248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249for as_dir in $PATH
3250do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003255 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 break 2
3258 fi
3259done
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003262
3263fi
3264fi
3265ac_ct_CC=$ac_cv_prog_ac_ct_CC
3266if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3268$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003272fi
3273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test "x$ac_ct_CC" = x; then
3275 CC=""
3276 else
3277 case $cross_compiling:$ac_tool_warned in
3278yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281ac_tool_warned=yes ;;
3282esac
3283 CC=$ac_ct_CC
3284 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003285else
3286 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003287fi
3288
Jack Jansendd19cf82001-12-06 22:36:17 +00003289if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 if test -n "$ac_tool_prefix"; then
3291 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003292set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3294$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003295if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003297else
3298 if test -n "$CC"; then
3299 ac_cv_prog_CC="$CC" # Let the user override the test.
3300else
Martin v. Löwis11437992002-04-12 09:54:03 +00003301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003307 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003308 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003310 break 2
3311 fi
3312done
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003315
3316fi
3317fi
3318CC=$ac_cv_prog_CC
3319if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3321$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322else
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3324$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003327
Martin v. Löwis11437992002-04-12 09:54:03 +00003328 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003329fi
3330if test -z "$CC"; then
3331 # Extract the first word of "cc", so it can be a program name with args.
3332set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3334$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003335if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003337else
3338 if test -n "$CC"; then
3339 ac_cv_prog_CC="$CC" # Let the user override the test.
3340else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3343for as_dir in $PATH
3344do
3345 IFS=$as_save_IFS
3346 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003347 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3350 ac_prog_rejected=yes
3351 continue
3352 fi
3353 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 break 2
3356 fi
3357done
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003359IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003360
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361if test $ac_prog_rejected = yes; then
3362 # We found a bogon in the path, so make sure we never use it.
3363 set dummy $ac_cv_prog_CC
3364 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366 # We chose a different compiler from the bogus one.
3367 # However, it has the same basename, so the bogon will be chosen
3368 # first if we set CC to just the basename; use the full file name.
3369 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003370 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003371 fi
3372fi
3373fi
3374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003375CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3378$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003379else
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3381$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382fi
3383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384
Martin v. Löwis11437992002-04-12 09:54:03 +00003385fi
3386if test -z "$CC"; then
3387 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 do
3390 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3391set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003394if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003396else
3397 if test -n "$CC"; then
3398 ac_cv_prog_CC="$CC" # Let the user override the test.
3399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003411done
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
3415fi
3416fi
3417CC=$ac_cv_prog_CC
3418if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3420$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003421else
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003424fi
3425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 test -n "$CC" && break
3428 done
3429fi
3430if test -z "$CC"; then
3431 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003433do
3434 # Extract the first word of "$ac_prog", so it can be a program name with args.
3435set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3437$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003438if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003440else
3441 if test -n "$ac_ct_CC"; then
3442 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3443else
3444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3445for as_dir in $PATH
3446do
3447 IFS=$as_save_IFS
3448 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 break 2
3454 fi
3455done
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459fi
3460fi
3461ac_ct_CC=$ac_cv_prog_ac_ct_CC
3462if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3464$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465else
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3467$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003468fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 test -n "$ac_ct_CC" && break
3472done
Michael W. Hudson54241132001-12-07 15:38:26 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474 if test "x$ac_ct_CC" = x; then
3475 CC=""
3476 else
3477 case $cross_compiling:$ac_tool_warned in
3478yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3480$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481ac_tool_warned=yes ;;
3482esac
3483 CC=$ac_ct_CC
3484 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485fi
3486
3487fi
3488
3489
Matthias Kloseb9621712010-04-24 17:59:49 +00003490test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003492as_fn_error $? "no acceptable C compiler found in \$PATH
3493See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003494
3495# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003496$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3497set X $ac_compile
3498ac_compiler=$2
3499for ac_option in --version -v -V -qversion; do
3500 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501case "(($ac_try" in
3502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3503 *) ac_try_echo=$ac_try;;
3504esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3506$as_echo "$ac_try_echo"; } >&5
3507 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003509 if test -s conftest.err; then
3510 sed '10a\
3511... rest of stderr output deleted ...
3512 10q' conftest.err >conftest.er1
3513 cat conftest.er1 >&5
3514 fi
3515 rm -f conftest.er1 conftest.err
3516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3517 test $ac_status = 0; }
3518done
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Matthias Kloseb9621712010-04-24 17:59:49 +00003520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003521/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523int
3524main ()
3525{
3526
3527 ;
3528 return 0;
3529}
3530_ACEOF
3531ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003532ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003533# Try to create an executable without -o first, disregard a.out.
3534# It will help us diagnose broken compilers, and finding out an intuition
3535# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3537$as_echo_n "checking whether the C compiler works... " >&6; }
3538ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3539
3540# The possible output files:
3541ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543ac_rmfiles=
3544for ac_file in $ac_files
3545do
3546 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003547 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3549 esac
3550done
3551rm -f $ac_rmfiles
3552
Matthias Kloseb9621712010-04-24 17:59:49 +00003553if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554case "(($ac_try" in
3555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556 *) ac_try_echo=$ac_try;;
3557esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3559$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3563 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3565# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3566# in a Makefile. We should not override ac_cv_exeext if it was cached,
3567# so that the user can short-circuit this test for compilers unknown to
3568# Autoconf.
3569for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003570do
3571 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003574 ;;
3575 [ab].out )
3576 # We found the default executable, but exeext='' is most
3577 # certainly right.
3578 break;;
3579 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 then :; else
3582 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3583 fi
3584 # We set ac_cv_exeext here because the later test for it is not
3585 # safe: cross compilers may not add the suffix if given an `-o'
3586 # argument, so we may need to know it at that point already.
3587 # Even if this section looks crufty: it has the advantage of
3588 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003589 break;;
3590 * )
3591 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 esac
3593done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594test "$ac_cv_exeext" = no && ac_cv_exeext=
3595
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003596else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597 ac_file=''
3598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003599if test -z "$ac_file"; then :
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
3602$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003607as_fn_error 77 "C compiler cannot create executables
3608See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003609else
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3611$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3614$as_echo_n "checking for C compiler default output file name... " >&6; }
3615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3616$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618
Matthias Kloseb9621712010-04-24 17:59:49 +00003619rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3622$as_echo_n "checking for suffix of executables... " >&6; }
3623if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624case "(($ac_try" in
3625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3626 *) ac_try_echo=$ac_try;;
3627esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3629$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3633 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3635# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3636# work properly (i.e., refer to `conftest.exe'), while it won't with
3637# `rm'.
3638for ac_file in conftest.exe conftest conftest.*; do
3639 test -f "$ac_file" || continue
3640 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003642 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3643 break;;
3644 * ) break;;
3645 esac
3646done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003650as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3651See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003653rm -f conftest conftest$ac_cv_exeext
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3655$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656
3657rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003658EXEEXT=$ac_cv_exeext
3659ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3661/* end confdefs.h. */
3662#include <stdio.h>
3663int
3664main ()
3665{
3666FILE *f = fopen ("conftest.out", "w");
3667 return ferror (f) || fclose (f) != 0;
3668
3669 ;
3670 return 0;
3671}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003673ac_clean_files="$ac_clean_files conftest.out"
3674# Check that the compiler produces executables we can run. If not, either
3675# the compiler is broken, or we cross compile.
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3677$as_echo_n "checking whether we are cross compiling... " >&6; }
3678if test "$cross_compiling" != yes; then
3679 { { ac_try="$ac_link"
3680case "(($ac_try" in
3681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3682 *) ac_try_echo=$ac_try;;
3683esac
3684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3685$as_echo "$ac_try_echo"; } >&5
3686 (eval "$ac_link") 2>&5
3687 ac_status=$?
3688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3689 test $ac_status = 0; }
3690 if { ac_try='./conftest$ac_cv_exeext'
3691 { { case "(($ac_try" in
3692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3693 *) ac_try_echo=$ac_try;;
3694esac
3695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3696$as_echo "$ac_try_echo"; } >&5
3697 (eval "$ac_try") 2>&5
3698 ac_status=$?
3699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3700 test $ac_status = 0; }; }; then
3701 cross_compiling=no
3702 else
3703 if test "$cross_compiling" = maybe; then
3704 cross_compiling=yes
3705 else
3706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003708as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003710See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 fi
3712 fi
3713fi
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3715$as_echo "$cross_compiling" >&6; }
3716
3717rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3718ac_clean_files=$ac_clean_files_save
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3720$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003721if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo_n "(cached) " >&6
3723else
3724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003725/* end confdefs.h. */
3726
3727int
3728main ()
3729{
3730
3731 ;
3732 return 0;
3733}
3734_ACEOF
3735rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003736if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737case "(($ac_try" in
3738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3739 *) ac_try_echo=$ac_try;;
3740esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3742$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3746 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 for ac_file in conftest.o conftest.obj conftest.*; do
3748 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3752 break;;
3753 esac
3754done
3755else
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003757sed 's/^/| /' conftest.$ac_ext >&5
3758
Matthias Kloseb9621712010-04-24 17:59:49 +00003759{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003761as_fn_error $? "cannot compute suffix of object files: cannot compile
3762See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003764rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3767$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768OBJEXT=$ac_cv_objext
3769ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3771$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003772if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003774else
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778int
3779main ()
3780{
3781#ifndef __GNUC__
3782 choke me
3783#endif
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 ac_compiler_gnu=yes
3791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003795ac_cv_c_compiler_gnu=$ac_compiler_gnu
3796
3797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3799$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3800if test $ac_compiler_gnu = yes; then
3801 GCC=yes
3802else
3803 GCC=
3804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805ac_test_CFLAGS=${CFLAGS+set}
3806ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3808$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003809if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 ac_save_c_werror_flag=$ac_c_werror_flag
3813 ac_c_werror_flag=yes
3814 ac_cv_prog_cc_g=no
3815 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819int
3820main ()
3821{
3822
3823 ;
3824 return 0;
3825}
3826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003827if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 CFLAGS=""
3831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844else
3845 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848/* end confdefs.h. */
3849
3850int
3851main ()
3852{
3853
3854 ;
3855 return 0;
3856}
3857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003858if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3866 ac_c_werror_flag=$ac_save_c_werror_flag
3867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3869$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003870if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872elif test $ac_cv_prog_cc_g = yes; then
3873 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003874 CFLAGS="-g -O2"
3875 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003877 fi
3878else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003879 if test "$GCC" = yes; then
3880 CFLAGS="-O2"
3881 else
3882 CFLAGS=
3883 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3886$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003887if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003889else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003891ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003893/* end confdefs.h. */
3894#include <stdarg.h>
3895#include <stdio.h>
3896#include <sys/types.h>
3897#include <sys/stat.h>
3898/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3899struct buf { int x; };
3900FILE * (*rcsopen) (struct buf *, struct stat *, int);
3901static char *e (p, i)
3902 char **p;
3903 int i;
3904{
3905 return p[i];
3906}
3907static char *f (char * (*g) (char **, int), char **p, ...)
3908{
3909 char *s;
3910 va_list v;
3911 va_start (v,p);
3912 s = g (p, va_arg (v,int));
3913 va_end (v);
3914 return s;
3915}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003916
3917/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3918 function prototypes and stuff, but not '\xHH' hex character constants.
3919 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003921 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3922 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003924int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3927 inside strings and character constants. */
3928#define FOO(x) 'x'
3929int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3930
Skip Montanaro6dead952003-09-25 14:50:04 +00003931int test (int i, double x);
3932struct s1 {int (*f) (int a);};
3933struct s2 {int (*f) (double a);};
3934int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3935int argc;
3936char **argv;
3937int
3938main ()
3939{
3940return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3941 ;
3942 return 0;
3943}
3944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3946 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952rm -f core conftest.err conftest.$ac_objext
3953 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003954done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003956CC=$ac_save_CC
3957
3958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959# AC_CACHE_VAL
3960case "x$ac_cv_prog_cc_c89" in
3961 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3963$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3966$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003967 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3970$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003971esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003972if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003975
Martin v. Löwis11437992002-04-12 09:54:03 +00003976ac_ext=c
3977ac_cpp='$CPP $CPPFLAGS'
3978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3980ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003982
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983
3984
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3986$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003989if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992 case $withval in
3993 no) with_cxx_main=no
3994 MAINCC='$(CC)';;
3995 yes) with_cxx_main=yes
3996 MAINCC='$(CXX)';;
3997 *) with_cxx_main=yes
3998 MAINCC=$withval
3999 if test -z "$CXX"
4000 then
4001 CXX=$withval
4002 fi;;
4003 esac
4004else
4005
4006 with_cxx_main=no
4007 MAINCC='$(CC)'
4008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009fi
4010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4012$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004013
4014preset_cxx="$CXX"
4015if test -z "$CXX"
4016then
4017 case "$CC" in
4018 gcc) # Extract the first word of "g++", so it can be a program name with args.
4019set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004022if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024else
4025 case $CXX in
4026 [\\/]* | ?:[\\/]*)
4027 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4028 ;;
4029 *)
4030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031for as_dir in notfound
4032do
4033 IFS=$as_save_IFS
4034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004037 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039 break 2
4040 fi
4041done
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
4045 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4046 ;;
4047esac
4048fi
4049CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004050if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4052$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004053else
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4055$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 ;;
4059 cc) # Extract the first word of "c++", so it can be a program name with args.
4060set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004063if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065else
4066 case $CXX in
4067 [\\/]* | ?:[\\/]*)
4068 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4069 ;;
4070 *)
4071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in notfound
4073do
4074 IFS=$as_save_IFS
4075 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004078 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004080 break 2
4081 fi
4082done
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004085
4086 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4087 ;;
4088esac
4089fi
4090CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004091if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4093$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004094else
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4096$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004098
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004099 ;;
4100 esac
4101 if test "$CXX" = "notfound"
4102 then
4103 CXX=""
4104 fi
4105fi
4106if test -z "$CXX"
4107then
4108 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4109do
4110 # Extract the first word of "$ac_prog", so it can be a program name with args.
4111set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4113$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004114if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116else
4117 if test -n "$CXX"; then
4118 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4119else
4120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in $PATH
4122do
4123 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129 break 2
4130 fi
4131done
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134
4135fi
4136fi
4137CXX=$ac_cv_prog_CXX
4138if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4140$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4143$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144fi
4145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147 test -n "$CXX" && break
4148done
4149test -n "$CXX" || CXX="notfound"
4150
4151 if test "$CXX" = "notfound"
4152 then
4153 CXX=""
4154 fi
4155fi
4156if test "$preset_cxx" != "$CXX"
4157then
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004159
4160 By default, distutils will build C++ extension modules with \"$CXX\".
4161 If this is not intended, then set CXX on the configure command line.
4162 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004163$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004164
4165 By default, distutils will build C++ extension modules with \"$CXX\".
4166 If this is not intended, then set CXX on the configure command line.
4167 " >&2;}
4168fi
4169
4170
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
4173ac_ext=c
4174ac_cpp='$CPP $CPPFLAGS'
4175ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4176ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4177ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4179$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004180# On Suns, sometimes $CPP names a directory.
4181if test -n "$CPP" && test -d "$CPP"; then
4182 CPP=
4183fi
4184if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004185 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 # Double quotes because CPP needs to be expanded
4189 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4190 do
4191 ac_preproc_ok=false
4192for ac_c_preproc_warn_flag in '' yes
4193do
4194 # Use a header file that comes with gcc, so configuring glibc
4195 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004196 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4197 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004198 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004199 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
4202#ifdef __STDC__
4203# include <limits.h>
4204#else
4205# include <assert.h>
4206#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004207 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004210
Matthias Kloseb9621712010-04-24 17:59:49 +00004211else
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 # Broken: fails on valid input.
4213continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004214fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004215rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004218 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221#include <ac_nonexistent.h>
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 # Broken: success on invalid input.
4225continue
4226else
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 # Passes both tests.
4228ac_preproc_ok=:
4229break
4230fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004231rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004232
4233done
4234# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004235rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 break
4238fi
4239
4240 done
4241 ac_cv_prog_CPP=$CPP
4242
4243fi
4244 CPP=$ac_cv_prog_CPP
4245else
4246 ac_cv_prog_CPP=$CPP
4247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4249$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004250ac_preproc_ok=false
4251for ac_c_preproc_warn_flag in '' yes
4252do
4253 # Use a header file that comes with gcc, so configuring glibc
4254 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004255 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4256 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # On the NeXT, cc -E runs the code through the compiler's parser,
4258 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004260/* end confdefs.h. */
4261#ifdef __STDC__
4262# include <limits.h>
4263#else
4264# include <assert.h>
4265#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004266 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004268if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004269
Matthias Kloseb9621712010-04-24 17:59:49 +00004270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 # Broken: fails on valid input.
4272continue
4273fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004274rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004280#include <ac_nonexistent.h>
4281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004282if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 # Broken: success on invalid input.
4284continue
4285else
Martin v. Löwis11437992002-04-12 09:54:03 +00004286 # Passes both tests.
4287ac_preproc_ok=:
4288break
4289fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004290rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004291
4292done
4293# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004294rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004295if $ac_preproc_ok; then :
4296
Martin v. Löwis11437992002-04-12 09:54:03 +00004297else
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004300as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4301See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004302fi
4303
4304ac_ext=c
4305ac_cpp='$CPP $CPPFLAGS'
4306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4308ac_compiler_gnu=$ac_cv_c_compiler_gnu
4309
4310
Matthias Kloseb9621712010-04-24 17:59:49 +00004311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4312$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004313if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004315else
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 # Loop through the user's path and test for each of PROGNAME-LIST
4319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4321do
4322 IFS=$as_save_IFS
4323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 for ac_prog in grep ggrep; do
4325 for ac_exec_ext in '' $ac_executable_extensions; do
4326 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4327 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4328# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 # Check for GNU $ac_path_GREP
4330case `"$ac_path_GREP" --version 2>&1` in
4331*GNU*)
4332 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4333*)
4334 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 while :
4337 do
4338 cat "conftest.in" "conftest.in" >"conftest.tmp"
4339 mv "conftest.tmp" "conftest.in"
4340 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4343 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4346 # Best one so far, save it but keep looking for a better one
4347 ac_cv_path_GREP="$ac_path_GREP"
4348 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004349 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 # 10*(2^10) chars as input seems more than enough
4351 test $ac_count -gt 10 && break
4352 done
4353 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4354esac
4355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 $ac_path_GREP_found && break 3
4357 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004362 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364else
4365 ac_cv_path_GREP=$GREP
4366fi
4367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4370$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 GREP="$ac_cv_path_GREP"
4372
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4375$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004376if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378else
4379 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4380 then ac_cv_path_EGREP="$GREP -E"
4381 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 # Loop through the user's path and test for each of PROGNAME-LIST
4385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4387do
4388 IFS=$as_save_IFS
4389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 for ac_prog in egrep; do
4391 for ac_exec_ext in '' $ac_executable_extensions; do
4392 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4393 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4394# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 # Check for GNU $ac_path_EGREP
4396case `"$ac_path_EGREP" --version 2>&1` in
4397*GNU*)
4398 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4399*)
4400 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004401 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 while :
4403 do
4404 cat "conftest.in" "conftest.in" >"conftest.tmp"
4405 mv "conftest.tmp" "conftest.in"
4406 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4409 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4412 # Best one so far, save it but keep looking for a better one
4413 ac_cv_path_EGREP="$ac_path_EGREP"
4414 ac_path_EGREP_max=$ac_count
4415 fi
4416 # 10*(2^10) chars as input seems more than enough
4417 test $ac_count -gt 10 && break
4418 done
4419 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4420esac
4421
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 $ac_path_EGREP_found && break 3
4423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004428 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430else
4431 ac_cv_path_EGREP=$EGREP
4432fi
4433
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 fi
4435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4437$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004439
4440
Matthias Kloseb9621712010-04-24 17:59:49 +00004441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4442$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004443if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $as_echo_n "(cached) " >&6
4445else
4446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004447/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004448#include <stdlib.h>
4449#include <stdarg.h>
4450#include <string.h>
4451#include <float.h>
4452
4453int
4454main ()
4455{
4456
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461if ac_fn_c_try_compile "$LINENO"; then :
4462 ac_cv_header_stdc=yes
4463else
4464 ac_cv_header_stdc=no
4465fi
4466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467
4468if test $ac_cv_header_stdc = yes; then
4469 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004473
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004474_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004477
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004478else
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004480fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004481rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004482
Matthias Kloseb9621712010-04-24 17:59:49 +00004483fi
4484
4485if test $ac_cv_header_stdc = yes; then
4486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488/* end confdefs.h. */
4489#include <stdlib.h>
4490
4491_ACEOF
4492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4493 $EGREP "free" >/dev/null 2>&1; then :
4494
4495else
4496 ac_cv_header_stdc=no
4497fi
4498rm -f conftest*
4499
4500fi
4501
4502if test $ac_cv_header_stdc = yes; then
4503 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4504 if test "$cross_compiling" = yes; then :
4505 :
4506else
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <ctype.h>
4510#include <stdlib.h>
4511#if ((' ' & 0x0FF) == 0x020)
4512# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4513# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4514#else
4515# define ISLOWER(c) \
4516 (('a' <= (c) && (c) <= 'i') \
4517 || ('j' <= (c) && (c) <= 'r') \
4518 || ('s' <= (c) && (c) <= 'z'))
4519# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4520#endif
4521
4522#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4523int
4524main ()
4525{
4526 int i;
4527 for (i = 0; i < 256; i++)
4528 if (XOR (islower (i), ISLOWER (i))
4529 || toupper (i) != TOUPPER (i))
4530 return 2;
4531 return 0;
4532}
4533_ACEOF
4534if ac_fn_c_try_run "$LINENO"; then :
4535
4536else
4537 ac_cv_header_stdc=no
4538fi
4539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4540 conftest.$ac_objext conftest.beam conftest.$ac_ext
4541fi
4542
4543fi
4544fi
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4546$as_echo "$ac_cv_header_stdc" >&6; }
4547if test $ac_cv_header_stdc = yes; then
4548
4549$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4550
4551fi
4552
4553# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4554for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4555 inttypes.h stdint.h unistd.h
4556do :
4557 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4558ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4559"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004560if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 cat >>confdefs.h <<_ACEOF
4562#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4563_ACEOF
4564
4565fi
4566
4567done
4568
4569
4570
4571 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004572if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004573 MINIX=yes
4574else
4575 MINIX=
4576fi
4577
4578
4579 if test "$MINIX" = yes; then
4580
4581$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4582
4583
4584$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4585
4586
4587$as_echo "#define _MINIX 1" >>confdefs.h
4588
4589 fi
4590
4591
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4593$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004594if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 $as_echo_n "(cached) " >&6
4596else
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598/* end confdefs.h. */
4599
4600# define __EXTENSIONS__ 1
4601 $ac_includes_default
4602int
4603main ()
4604{
4605
4606 ;
4607 return 0;
4608}
4609_ACEOF
4610if ac_fn_c_try_compile "$LINENO"; then :
4611 ac_cv_safe_to_define___extensions__=yes
4612else
4613 ac_cv_safe_to_define___extensions__=no
4614fi
4615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4616fi
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4618$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4619 test $ac_cv_safe_to_define___extensions__ = yes &&
4620 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4621
4622 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4623
4624 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4625
4626 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4627
4628 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4629
4630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004632# Check for unsupported systems
4633case $ac_sys_system/$ac_sys_release in
4634atheos*|Linux*/1*)
4635 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4636 echo See README for details.
4637 exit 1;;
4638esac
4639
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4642$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643
4644# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004645if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646 withval=$with_suffix;
4647 case $withval in
4648 no) EXEEXT=;;
4649 yes) EXEEXT=.exe;;
4650 *) EXEEXT=$withval;;
4651 esac
4652fi
4653
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4655$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656
4657# Test whether we're running on a non-case-sensitive system, in which
4658# case we give a warning if no ext is given
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4661$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004662if test ! -d CaseSensitiveTestDir; then
4663mkdir CaseSensitiveTestDir
4664fi
4665
4666if test -d casesensitivetestdir
4667then
Matthias Kloseb9621712010-04-24 17:59:49 +00004668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4669$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004670 BUILDEXEEXT=.exe
4671else
Matthias Kloseb9621712010-04-24 17:59:49 +00004672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674 BUILDEXEEXT=$EXEEXT
4675fi
4676rmdir CaseSensitiveTestDir
4677
4678case $MACHDEP in
4679bsdos*)
4680 case $CC in
4681 gcc) CC="$CC -D_HAVE_BSDI";;
4682 esac;;
4683esac
4684
4685case $ac_sys_system in
4686hp*|HP*)
4687 case $CC in
4688 cc|*/cc) CC="$CC -Ae";;
4689 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690esac
4691
4692
4693
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4695$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696if test -z "$LIBRARY"
4697then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004698 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4701$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004702
4703# LDLIBRARY is the name of the library to link against (as opposed to the
4704# name of the library into which to insert object files). BLDLIBRARY is also
4705# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4706# is blank as the main program is not linked directly against LDLIBRARY.
4707# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4708# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4709# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4710# DLLLIBRARY is the shared (i.e., DLL) library.
4711#
4712# RUNSHARED is used to run shared python without installed libraries
4713#
4714# INSTSONAME is the name of the shared library that will be use to install
4715# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716#
4717# LDVERSION is the shared library version number, normally the Python version
4718# with the ABI build flags appended.
4719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720
4721
4722
4723
4724
4725
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727LDLIBRARY="$LIBRARY"
4728BLDLIBRARY='$(LDLIBRARY)'
4729INSTSONAME='$(LDLIBRARY)'
4730DLLLIBRARY=''
4731LDLIBRARYDIR=''
4732RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004733LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734
4735# LINKCC is the command that links the python executable -- default is $(CC).
4736# If CXX is set, and if it is needed to link a main function that was
4737# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4738# python might then depend on the C++ runtime
4739# This is altered for AIX in order to build the export list before
4740# linking.
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4743$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744if test -z "$LINKCC"
4745then
4746 LINKCC='$(PURIFY) $(MAINCC)'
4747 case $ac_sys_system in
4748 AIX*)
4749 exp_extra="\"\""
4750 if test $ac_sys_release -ge 5 -o \
4751 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4752 exp_extra="."
4753 fi
4754 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755 QNX*)
4756 # qcc must be used because the other compilers do not
4757 # support -N.
4758 LINKCC=qcc;;
4759 esac
4760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4762$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763
4764# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4765# make sure we default having it set to "no": this is used by
4766# distutils.unixccompiler to know if it should add --enable-new-dtags
4767# to linker command lines, and failing to detect GNU ld simply results
4768# in the same bahaviour as before.
4769
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4771$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772ac_prog=ld
4773if test "$GCC" = yes; then
4774 ac_prog=`$CC -print-prog-name=ld`
4775fi
4776case `"$ac_prog" -V 2>&1 < /dev/null` in
4777 *GNU*)
4778 GNULD=yes;;
4779 *)
4780 GNULD=no;;
4781esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4783$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4786$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004787if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004788 $as_echo_n "(cached) " >&6
4789else
4790 ac_cv_c_inline=no
4791for ac_kw in inline __inline__ __inline; do
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793/* end confdefs.h. */
4794#ifndef __cplusplus
4795typedef int foo_t;
4796static $ac_kw foo_t static_foo () {return 0; }
4797$ac_kw foo_t foo () {return 0; }
4798#endif
4799
4800_ACEOF
4801if ac_fn_c_try_compile "$LINENO"; then :
4802 ac_cv_c_inline=$ac_kw
4803fi
4804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4805 test "$ac_cv_c_inline" != no && break
4806done
4807
4808fi
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4810$as_echo "$ac_cv_c_inline" >&6; }
4811
4812case $ac_cv_c_inline in
4813 inline | yes) ;;
4814 *)
4815 case $ac_cv_c_inline in
4816 no) ac_val=;;
4817 *) ac_val=$ac_cv_c_inline;;
4818 esac
4819 cat >>confdefs.h <<_ACEOF
4820#ifndef __cplusplus
4821#define inline $ac_val
4822#endif
4823_ACEOF
4824 ;;
4825esac
4826
4827if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004828
4829$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004830
4831
4832fi
4833
4834
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4836$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 enableval=$enable_shared;
4840fi
4841
4842
4843if test -z "$enable_shared"
4844then
4845 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004846 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 enable_shared="yes";;
4848 *)
4849 enable_shared="no";;
4850 esac
4851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4853$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4856$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859 enableval=$enable_profiling; ac_save_cc="$CC"
4860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 ac_enable_profiling="no"
4863else
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865/* end confdefs.h. */
4866int main() { return 0; }
4867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869 ac_enable_profiling="yes"
4870else
Matthias Kloseb9621712010-04-24 17:59:49 +00004871 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875fi
4876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877 CC="$ac_save_cc"
4878fi
4879
Matthias Kloseb9621712010-04-24 17:59:49 +00004880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4881$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882
4883case "$ac_enable_profiling" in
4884 "yes")
4885 BASECFLAGS="-pg $BASECFLAGS"
4886 LDFLAGS="-pg $LDFLAGS"
4887 ;;
4888esac
4889
Matthias Kloseb9621712010-04-24 17:59:49 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4891$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892
4893# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4894# library that we build, but we do not want to link against it (we
4895# will find it with a -framework option). For this reason there is an
4896# extra variable BLDLIBRARY against which Python and the extension
4897# modules are linked, BLDLIBRARY. This is normally the same as
4898# LDLIBRARY, but empty for MacOSX framework builds.
4899if test "$enable_framework"
4900then
4901 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4902 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4903 BLDLIBRARY=''
4904else
4905 BLDLIBRARY='$(LDLIBRARY)'
4906fi
4907
4908# Other platforms follow
4909if test $enable_shared = "yes"; then
4910
Matthias Kloseb9621712010-04-24 17:59:49 +00004911$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913 case $ac_sys_system in
4914 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004915 LDLIBRARY='libpython$(LDVERSION).dll.a'
4916 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 ;;
4918 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004919 LDLIBRARY='libpython$(LDVERSION).so'
4920 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004921 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004924 then
4925 PY3LIBRARY=libpython3.so
4926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 ;;
4928 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004929 LDLIBRARY='libpython$(LDVERSION).so'
4930 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4932 case $ac_sys_system in
4933 FreeBSD*)
4934 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4935 ;;
4936 esac
4937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004939 then
4940 PY3LIBRARY=libpython3.so
4941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942 ;;
4943 hp*|HP*)
4944 case `uname -m` in
4945 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 ;;
4948 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ;;
4951 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4954 ;;
4955 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004956 LDLIBRARY='libpython$(LDVERSION).so'
4957 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4959 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004961 LDLIBRARY='libpython$(LDVERSION).dylib'
4962 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4964 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004965 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004967 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4968 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969
4970 esac
4971else # shared is disabled
4972 case $ac_sys_system in
4973 CYGWIN*)
4974 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004975 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976 ;;
4977 esac
4978fi
4979
Matthias Kloseb9621712010-04-24 17:59:49 +00004980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4981$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982
4983if test -n "$ac_tool_prefix"; then
4984 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4985set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004988if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
4991 if test -n "$RANLIB"; then
4992 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4993else
4994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5001 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 break 2
5004 fi
5005done
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007IFS=$as_save_IFS
5008
5009fi
5010fi
5011RANLIB=$ac_cv_prog_RANLIB
5012if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5014$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018fi
5019
5020
5021fi
5022if test -z "$ac_cv_prog_RANLIB"; then
5023 ac_ct_RANLIB=$RANLIB
5024 # Extract the first word of "ranlib", so it can be a program name with args.
5025set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005028if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
5031 if test -n "$ac_ct_RANLIB"; then
5032 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5033else
5034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in $PATH
5036do
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5041 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 break 2
5044 fi
5045done
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047IFS=$as_save_IFS
5048
5049fi
5050fi
5051ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5052if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5054$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055else
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058fi
5059
5060 if test "x$ac_ct_RANLIB" = x; then
5061 RANLIB=":"
5062 else
5063 case $cross_compiling:$ac_tool_warned in
5064yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067ac_tool_warned=yes ;;
5068esac
5069 RANLIB=$ac_ct_RANLIB
5070 fi
5071else
5072 RANLIB="$ac_cv_prog_RANLIB"
5073fi
5074
5075
5076for ac_prog in ar aal
5077do
5078 # Extract the first word of "$ac_prog", so it can be a program name with args.
5079set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005082if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
5085 if test -n "$AR"; then
5086 ac_cv_prog_AR="$AR" # Let the user override the test.
5087else
5088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091 IFS=$as_save_IFS
5092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5095 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097 break 2
5098 fi
5099done
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101IFS=$as_save_IFS
5102
5103fi
5104fi
5105AR=$ac_cv_prog_AR
5106if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5108$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112fi
5113
5114
5115 test -n "$AR" && break
5116done
5117test -n "$AR" || AR="ar"
5118
5119
5120# tweak ARFLAGS only if the user didn't set it on the command line
5121
5122if test -z "$ARFLAGS"
5123then
5124 ARFLAGS="rc"
5125fi
5126
5127
5128# Extract the first word of "svnversion", so it can be a program name with args.
5129set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005132if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134else
5135 if test -n "$SVNVERSION"; then
5136 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5137else
5138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141 IFS=$as_save_IFS
5142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5145 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 break 2
5148 fi
5149done
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151IFS=$as_save_IFS
5152
5153 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5154fi
5155fi
5156SVNVERSION=$ac_cv_prog_SVNVERSION
5157if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5159$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160else
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5162$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163fi
5164
5165
5166if test $SVNVERSION = found
5167then
5168 SVNVERSION="svnversion \$(srcdir)"
5169else
5170 SVNVERSION="echo Unversioned directory"
5171fi
5172
Georg Brandl1ca2e792011-03-05 20:51:24 +01005173
5174
5175
5176# Extract the first word of "hg", so it can be a program name with args.
5177set dummy hg; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if ${ac_cv_prog_HAS_HG+:} false; then :
5181 $as_echo_n "(cached) " >&6
5182else
5183 if test -n "$HAS_HG"; then
5184 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5185else
5186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189 IFS=$as_save_IFS
5190 test -z "$as_dir" && as_dir=.
5191 for ac_exec_ext in '' $ac_executable_extensions; do
5192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5193 ac_cv_prog_HAS_HG="found"
5194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195 break 2
5196 fi
5197done
5198 done
5199IFS=$as_save_IFS
5200
5201 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5202fi
5203fi
5204HAS_HG=$ac_cv_prog_HAS_HG
5205if test -n "$HAS_HG"; then
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5207$as_echo "$HAS_HG" >&6; }
5208else
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
5211fi
5212
5213
5214if test $HAS_HG = found
5215then
5216 HGVERSION="hg id -i \$(srcdir)"
5217 HGTAG="hg id -t \$(srcdir)"
5218 HGBRANCH="hg id -b \$(srcdir)"
5219else
5220 HGVERSION=""
5221 HGTAG=""
5222 HGBRANCH=""
5223fi
5224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225case $MACHDEP in
5226bsdos*|hp*|HP*)
5227 # install -d does not work on BSDI or HP-UX
5228 if test -z "$INSTALL"
5229 then
5230 INSTALL="${srcdir}/install-sh -c"
5231 fi
5232esac
5233ac_aux_dir=
5234for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005235 if test -f "$ac_dir/install-sh"; then
5236 ac_aux_dir=$ac_dir
5237 ac_install_sh="$ac_aux_dir/install-sh -c"
5238 break
5239 elif test -f "$ac_dir/install.sh"; then
5240 ac_aux_dir=$ac_dir
5241 ac_install_sh="$ac_aux_dir/install.sh -c"
5242 break
5243 elif test -f "$ac_dir/shtool"; then
5244 ac_aux_dir=$ac_dir
5245 ac_install_sh="$ac_aux_dir/shtool install -c"
5246 break
5247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248done
5249if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005250 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251fi
5252
5253# These three variables are undocumented and unsupported,
5254# and are intended to be withdrawn in a future Autoconf release.
5255# They can cause serious problems if a builder's source tree is in a directory
5256# whose full name contains unusual characters.
5257ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5258ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5259ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5260
5261
5262# Find a good install program. We prefer a C program (faster),
5263# so one script is as good as another. But avoid the broken or
5264# incompatible versions:
5265# SysV /etc/install, /usr/sbin/install
5266# SunOS /usr/etc/install
5267# IRIX /sbin/install
5268# AIX /bin/install
5269# AmigaOS /C/install, which installs bootblocks on floppy discs
5270# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5271# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5272# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5273# OS/2's system install, which has a completely different semantic
5274# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005275# Reject install programs that cannot install multiple files.
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5277$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005279if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005280 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281else
5282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5283for as_dir in $PATH
5284do
5285 IFS=$as_save_IFS
5286 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 # Account for people who put trailing slashes in PATH elements.
5288case $as_dir/ in #((
5289 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005291 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 /usr/ucb/* ) ;;
5293 *)
5294 # OSF1 and SCO ODT 3.0 have their own names for install.
5295 # Don't use installbsd from OSF since it installs stuff as root
5296 # by default.
5297 for ac_prog in ginstall scoinst install; do
5298 for ac_exec_ext in '' $ac_executable_extensions; do
5299 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5300 if test $ac_prog = install &&
5301 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5302 # AIX install. It has an incompatible calling convention.
5303 :
5304 elif test $ac_prog = install &&
5305 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5306 # program-specific install script used by HP pwplus--don't use.
5307 :
5308 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005309 rm -rf conftest.one conftest.two conftest.dir
5310 echo one > conftest.one
5311 echo two > conftest.two
5312 mkdir conftest.dir
5313 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5314 test -s conftest.one && test -s conftest.two &&
5315 test -s conftest.dir/conftest.one &&
5316 test -s conftest.dir/conftest.two
5317 then
5318 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5319 break 3
5320 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 fi
5322 fi
5323 done
5324 done
5325 ;;
5326esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005327
5328 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329IFS=$as_save_IFS
5330
Matthias Kloseb9621712010-04-24 17:59:49 +00005331rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332
5333fi
5334 if test "${ac_cv_path_install+set}" = set; then
5335 INSTALL=$ac_cv_path_install
5336 else
5337 # As a last resort, use the slow shell script. Don't cache a
5338 # value for INSTALL within a source directory, because that will
5339 # break other packages using the cache if that directory is
5340 # removed, or if the value is a relative name.
5341 INSTALL=$ac_install_sh
5342 fi
5343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5345$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346
5347# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5348# It thinks the first close brace ends the variable substitution.
5349test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5350
5351test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5352
5353test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5354
5355
5356# Not every filesystem supports hard links
5357
5358if test -z "$LN" ; then
5359 case $ac_sys_system in
5360 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361 *) LN=ln;;
5362 esac
5363fi
5364
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005365# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005366
5367ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5371$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005374if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 withval=$with_pydebug;
5376if test "$withval" != no
5377then
5378
Matthias Kloseb9621712010-04-24 17:59:49 +00005379$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005384 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387fi
5388else
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391fi
5392
5393
5394# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5395# merged with this chunk of code?
5396
5397# Optimizer/debugger flags
5398# ------------------------
5399# (The following bit of code is complicated enough - please keep things
5400# indented properly. Just pretend you're editing Python code. ;-)
5401
5402# There are two parallel sets of case statements below, one that checks to
5403# see if OPT was set and one that does BASECFLAGS setting based upon
5404# compiler and platform. BASECFLAGS tweaks need to be made even if the
5405# user set OPT.
5406
5407# tweak OPT based on compiler and platform, only if the user didn't set
5408# it on the command line
5409
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005410if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411then
5412 case $GCC in
5413 yes)
5414 if test "$CC" != 'g++' ; then
5415 STRICT_PROTO="-Wstrict-prototypes"
5416 fi
5417 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5418 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5419 WRAP="-fwrapv"
5420 fi
5421 case $ac_cv_prog_cc_g in
5422 yes)
5423 if test "$Py_DEBUG" = 'true' ; then
5424 # Optimization messes up debuggers, so turn it off for
5425 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005426 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 else
5428 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5429 fi
5430 ;;
5431 *)
5432 OPT="-O3 -Wall $STRICT_PROTO"
5433 ;;
5434 esac
5435 case $ac_sys_system in
5436 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5437 ;;
5438 esac
5439 ;;
5440
5441 *)
5442 OPT="-O"
5443 ;;
5444 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445fi
5446
5447
5448
5449# The -arch flags for universal builds on OSX
5450UNIVERSAL_ARCH_FLAGS=
5451
5452
5453# tweak BASECFLAGS based on compiler and platform
5454case $GCC in
5455yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005456 # Python doesn't violate C99 aliasing rules, but older versions of
5457 # GCC produce warnings for legal Python code. Enable
5458 # -fno-strict-aliasing on versions of GCC that support but produce
5459 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5461$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462 ac_save_cc="$CC"
5463 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005464 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005465 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005467else
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005470
Matthias Kloseb159a552010-04-25 21:00:44 +00005471
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005472int
5473main ()
5474{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005475
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005476 ;
5477 return 0;
5478}
Matthias Kloseb159a552010-04-25 21:00:44 +00005479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005481if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005482
5483 CC="$ac_save_cc -fstrict-aliasing"
5484 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005486/* end confdefs.h. */
5487
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005488 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005489int
5490main ()
5491{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005492double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005493 ;
5494 return 0;
5495}
Matthias Kloseb159a552010-04-25 21:00:44 +00005496
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005498if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005499
5500 ac_cv_no_strict_aliasing=no
5501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502else
Matthias Kloseb159a552010-04-25 21:00:44 +00005503
5504 ac_cv_no_strict_aliasing=yes
5505
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005506fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005508
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005509else
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
5511 ac_cv_no_strict_aliasing=no
5512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005515fi
5516
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005517 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5520$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 then
5523 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5524 fi
5525
5526 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5527 # support. Without this, treatment of subnormals doesn't follow
5528 # the standard.
5529 case $ac_sys_machine in
5530 alpha*)
5531 BASECFLAGS="$BASECFLAGS -mieee"
5532 ;;
5533 esac
5534
5535 case $ac_sys_system in
5536 SCO_SV*)
5537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5538 ;;
5539 # is there any other compiler on Darwin besides gcc?
5540 Darwin*)
5541 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5542 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005543 if test "${CC}" = gcc
5544 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5546$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005547 case "${UNIVERSALSDK}" in
5548 */MacOSX10.4u.sdk)
5549 # Build using 10.4 SDK, force usage of gcc when the
5550 # compiler is gcc, otherwise the user will get very
5551 # confusing error messages when building on OSX 10.6
5552 CC=gcc-4.0
5553 CPP=cpp-4.0
5554 ;;
5555 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5557$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005558 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559
5560
5561 if test "${enable_universalsdk}"; then
5562 UNIVERSAL_ARCH_FLAGS=""
5563 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5564 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5565 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005566 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5568 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005569 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005570 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5573 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005574 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005575 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005577 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5578 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005579 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005580 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005581
5582 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5583 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005584 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005585 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005588 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589
5590 fi
5591
5592
Ronald Oussoren666028b2010-04-18 19:07:43 +00005593 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5594 if test "${UNIVERSALSDK}" != "/"
5595 then
5596 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5597 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005598 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 fi
5600 fi
5601
5602 # Calculate the right deployment target for this build.
5603 #
5604 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5605 if test ${cur_target} '>' 10.2; then
5606 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005607 if test ${enable_universalsdk}; then
5608 if test "${UNIVERSAL_ARCHS}" = "all"; then
5609 # Ensure that the default platform for a
5610 # 4-way universal build is OSX 10.5,
5611 # that's the first OS release where
5612 # 4-way builds make sense.
5613 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005614
5615 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5616 cur_target='10.5'
5617
5618 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5619 cur_target='10.5'
5620
5621 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5622 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005623 fi
5624 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005625 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005626 # On Intel macs default to a deployment
5627 # target of 10.4, that's the first OSX
5628 # release with Intel support.
5629 cur_target="10.4"
5630 fi
5631 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 fi
5633 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5634
5635 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5636 # environment with a value that is the same as what we'll use
5637 # in the Makefile to ensure that we'll get the same compiler
5638 # environment during configure and build time.
5639 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5640 export MACOSX_DEPLOYMENT_TARGET
5641 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5642
5643 ;;
5644 OSF*)
5645 BASECFLAGS="$BASECFLAGS -mieee"
5646 ;;
5647 esac
5648 ;;
5649
5650*)
5651 case $ac_sys_system in
5652 OpenUNIX*|UnixWare*)
5653 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5654 ;;
5655 OSF*)
5656 BASECFLAGS="$BASECFLAGS -ieee -std"
5657 ;;
5658 SCO_SV*)
5659 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5660 ;;
5661 esac
5662 ;;
5663esac
5664
5665if test "$Py_DEBUG" = 'true'; then
5666 :
5667else
5668 OPT="-DNDEBUG $OPT"
5669fi
5670
5671if test "$ac_arch_flags"
5672then
5673 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5674fi
5675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676# Check whether GCC supports PyArg_ParseTuple format
5677if test "$GCC" = "yes"
5678then
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5680$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 save_CFLAGS=$CFLAGS
5682 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684/* end confdefs.h. */
5685
5686 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687int
5688main ()
5689{
5690
5691 ;
5692 return 0;
5693}
Matthias Kloseb159a552010-04-25 21:00:44 +00005694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
Matthias Kloseb159a552010-04-25 21:00:44 +00005698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
Matthias Kloseb159a552010-04-25 21:00:44 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005702$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704else
Matthias Kloseb159a552010-04-25 21:00:44 +00005705
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005707$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711 CFLAGS=$save_CFLAGS
5712fi
5713
5714# On some compilers, pthreads are available without further options
5715# (e.g. MacOS X). On some of these systems, the compiler will not
5716# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5717# So we have to see first whether pthreads are available without
5718# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5720$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005721if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 ac_cv_pthread_is_default=no
5726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728/* end confdefs.h. */
5729
5730#include <pthread.h>
5731
5732void* routine(void* p){return NULL;}
5733
5734int main(){
5735 pthread_t p;
5736 if(pthread_create(&p,NULL,routine,NULL)!=0)
5737 return 1;
5738 (void)pthread_detach(p);
5739 return 0;
5740}
5741
5742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745 ac_cv_pthread_is_default=yes
5746 ac_cv_kthread=no
5747 ac_cv_pthread=no
5748
5749else
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754fi
5755
5756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757fi
5758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5760$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762
5763if test $ac_cv_pthread_is_default = yes
5764then
5765 ac_cv_kpthread=no
5766else
5767# -Kpthread, if available, provides the right #defines
5768# and linker options to make pthread_create available
5769# Some compilers won't report that they do not support -Kpthread,
5770# so we need to run a program to see whether it really made the
5771# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5773$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005774if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776else
5777 ac_save_cc="$CC"
5778CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005779if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 ac_cv_kpthread=no
5781else
Matthias Kloseb9621712010-04-24 17:59:49 +00005782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783/* end confdefs.h. */
5784
5785#include <pthread.h>
5786
5787void* routine(void* p){return NULL;}
5788
5789int main(){
5790 pthread_t p;
5791 if(pthread_create(&p,NULL,routine,NULL)!=0)
5792 return 1;
5793 (void)pthread_detach(p);
5794 return 0;
5795}
5796
5797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005798if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ac_cv_kpthread=yes
5800else
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805fi
5806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807CC="$ac_save_cc"
5808fi
5809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5811$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812fi
5813
5814if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5815then
5816# -Kthread, if available, provides the right #defines
5817# and linker options to make pthread_create available
5818# Some compilers won't report that they do not support -Kthread,
5819# so we need to run a program to see whether it really made the
5820# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5822$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005823if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005824 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825else
5826 ac_save_cc="$CC"
5827CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 ac_cv_kthread=no
5830else
Matthias Kloseb9621712010-04-24 17:59:49 +00005831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832/* end confdefs.h. */
5833
5834#include <pthread.h>
5835
5836void* routine(void* p){return NULL;}
5837
5838int main(){
5839 pthread_t p;
5840 if(pthread_create(&p,NULL,routine,NULL)!=0)
5841 return 1;
5842 (void)pthread_detach(p);
5843 return 0;
5844}
5845
5846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 ac_cv_kthread=yes
5849else
Matthias Kloseb9621712010-04-24 17:59:49 +00005850 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856CC="$ac_save_cc"
5857fi
5858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5860$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
5863if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5864then
5865# -pthread, if available, provides the right #defines
5866# and linker options to make pthread_create available
5867# Some compilers won't report that they do not support -pthread,
5868# so we need to run a program to see whether it really made the
5869# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5871$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005872if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005873 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874else
5875 ac_save_cc="$CC"
5876CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005877if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ac_cv_pthread=no
5879else
Matthias Kloseb9621712010-04-24 17:59:49 +00005880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881/* end confdefs.h. */
5882
5883#include <pthread.h>
5884
5885void* routine(void* p){return NULL;}
5886
5887int main(){
5888 pthread_t p;
5889 if(pthread_create(&p,NULL,routine,NULL)!=0)
5890 return 1;
5891 (void)pthread_detach(p);
5892 return 0;
5893}
5894
5895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ac_cv_pthread=yes
5898else
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903fi
5904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905CC="$ac_save_cc"
5906fi
5907
Matthias Kloseb9621712010-04-24 17:59:49 +00005908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5909$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910fi
5911
5912# If we have set a CC compiler flag for thread support then
5913# check if it works for CXX, too.
5914ac_cv_cxx_thread=no
5915if test ! -z "$CXX"
5916then
Matthias Kloseb9621712010-04-24 17:59:49 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5918$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919ac_save_cxx="$CXX"
5920
5921if test "$ac_cv_kpthread" = "yes"
5922then
5923 CXX="$CXX -Kpthread"
5924 ac_cv_cxx_thread=yes
5925elif test "$ac_cv_kthread" = "yes"
5926then
5927 CXX="$CXX -Kthread"
5928 ac_cv_cxx_thread=yes
5929elif test "$ac_cv_pthread" = "yes"
5930then
5931 CXX="$CXX -pthread"
5932 ac_cv_cxx_thread=yes
5933fi
5934
5935if test $ac_cv_cxx_thread = yes
5936then
5937 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5938 $CXX -c conftest.$ac_ext 2>&5
5939 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5940 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5941 then
5942 ac_cv_cxx_thread=yes
5943 else
5944 ac_cv_cxx_thread=no
5945 fi
5946 rm -fr conftest*
5947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5949$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950fi
5951CXX="$ac_save_cxx"
5952
5953
5954# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5956$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005957if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961/* end confdefs.h. */
5962#include <stdlib.h>
5963#include <stdarg.h>
5964#include <string.h>
5965#include <float.h>
5966
5967int
5968main ()
5969{
5970
5971 ;
5972 return 0;
5973}
5974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005975if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ac_cv_header_stdc=yes
5977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5981
5982if test $ac_cv_header_stdc = yes; then
5983 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985/* end confdefs.h. */
5986#include <string.h>
5987
5988_ACEOF
5989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $EGREP "memchr" >/dev/null 2>&1; then :
5991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992else
5993 ac_cv_header_stdc=no
5994fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005995rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996
5997fi
5998
5999if test $ac_cv_header_stdc = yes; then
6000 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002/* end confdefs.h. */
6003#include <stdlib.h>
6004
6005_ACEOF
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $EGREP "free" >/dev/null 2>&1; then :
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009else
6010 ac_cv_header_stdc=no
6011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006012rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013
6014fi
6015
6016if test $ac_cv_header_stdc = yes; then
6017 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006018 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019 :
6020else
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022/* end confdefs.h. */
6023#include <ctype.h>
6024#include <stdlib.h>
6025#if ((' ' & 0x0FF) == 0x020)
6026# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6027# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6028#else
6029# define ISLOWER(c) \
6030 (('a' <= (c) && (c) <= 'i') \
6031 || ('j' <= (c) && (c) <= 'r') \
6032 || ('s' <= (c) && (c) <= 'z'))
6033# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6034#endif
6035
6036#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6037int
6038main ()
6039{
6040 int i;
6041 for (i = 0; i < 256; i++)
6042 if (XOR (islower (i), ISLOWER (i))
6043 || toupper (i) != TOUPPER (i))
6044 return 2;
6045 return 0;
6046}
6047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006048if ac_fn_c_try_run "$LINENO"; then :
6049
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050else
Matthias Kloseb9621712010-04-24 17:59:49 +00006051 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055fi
6056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057fi
6058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6060$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061if test $ac_cv_header_stdc = yes; then
6062
Matthias Kloseb9621712010-04-24 17:59:49 +00006063$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064
6065fi
6066
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006067for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6068fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006069ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006070shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006071unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006072sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6073sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006074sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6075sys/stat.h sys/termio.h sys/time.h \
6076sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6077libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006078bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006079do :
6080 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6081ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006082if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006085_ACEOF
6086
6087fi
6088
Guido van Rossum627b2d71993-12-24 10:39:16 +00006089done
6090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006092for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6095$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006096if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006098else
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101#include <sys/types.h>
6102#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006103
Martin v. Löwis11437992002-04-12 09:54:03 +00006104int
6105main ()
6106{
6107if ((DIR *) 0)
6108return 0;
6109 ;
6110 return 0;
6111}
6112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006114 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006115else
Matthias Kloseb9621712010-04-24 17:59:49 +00006116 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006120eval ac_res=\$$as_ac_Header
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6122$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006123if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006124 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006125#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006126_ACEOF
6127
6128ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006129fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006131done
6132# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6133if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6135$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006136if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138else
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143/* Override any GCC internal prototype to avoid an error.
6144 Use char because int might match the return type of a GCC
6145 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006146#ifdef __cplusplus
6147extern "C"
6148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006149char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006150int
6151main ()
6152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006154 ;
6155 return 0;
6156}
6157_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158for ac_lib in '' dir; do
6159 if test -z "$ac_lib"; then
6160 ac_res="none required"
6161 else
6162 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006168rm -f core conftest.err conftest.$ac_objext \
6169 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006170 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006174if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176else
6177 ac_cv_search_opendir=no
6178fi
6179rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006180LIBS=$ac_func_search_save_LIBS
6181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6183$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006185if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006189
Michael W. Hudson54241132001-12-07 15:38:26 +00006190else
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6192$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006193if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006195else
6196 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006200/* Override any GCC internal prototype to avoid an error.
6201 Use char because int might match the return type of a GCC
6202 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006203#ifdef __cplusplus
6204extern "C"
6205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006206char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006207int
6208main ()
6209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006211 ;
6212 return 0;
6213}
6214_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006215for ac_lib in '' x; do
6216 if test -z "$ac_lib"; then
6217 ac_res="none required"
6218 else
6219 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006220 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006223 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006225rm -f core conftest.err conftest.$ac_objext \
6226 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006227 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006231if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233else
6234 ac_cv_search_opendir=no
6235fi
6236rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006237LIBS=$ac_func_search_save_LIBS
6238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6240$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006242if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006245fi
6246
6247fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6250$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006251if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253else
Matthias Kloseb9621712010-04-24 17:59:49 +00006254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006255/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257int
6258main ()
6259{
6260return makedev(0, 0);
6261 ;
6262 return 0;
6263}
6264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 ac_cv_header_sys_types_h_makedev=yes
6267else
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006270rm -f core conftest.err conftest.$ac_objext \
6271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272
6273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6275$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276
6277if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006278ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006279if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283fi
6284
6285
6286
6287 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006289if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293fi
6294
6295
6296 fi
6297fi
6298
Michael W. Hudson54241132001-12-07 15:38:26 +00006299
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006300# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006302do :
6303 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006304#ifdef HAVE_CURSES_H
6305#include <curses.h>
6306#endif
6307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006309if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006310 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006311#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006312_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006314fi
6315
6316done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006317
6318
Martin v. Löwis11017b12006-01-14 18:12:57 +00006319# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006320for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006321do :
6322 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323#ifdef HAVE_ASM_TYPES_H
6324#include <asm/types.h>
6325#endif
6326#ifdef HAVE_SYS_SOCKET_H
6327#include <sys/socket.h>
6328#endif
6329
Matthias Kloseb9621712010-04-24 17:59:49 +00006330"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006331if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006333#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006334_ACEOF
6335
6336fi
6337
6338done
6339
6340
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006342was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6344$as_echo_n "checking for clock_t in time.h... " >&6; }
6345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006347#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006348
6349_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006351 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006352 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353else
Martin v. Löwis11437992002-04-12 09:54:03 +00006354
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006357
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006358
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006360rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6363$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006364
Neal Norwitz11690112002-07-30 01:08:28 +00006365# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6367$as_echo_n "checking for makedev... " >&6; }
6368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006369/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006370
Jesus Cea740f53a2010-04-28 11:35:30 +00006371#if defined(MAJOR_IN_MKDEV)
6372#include <sys/mkdev.h>
6373#elif defined(MAJOR_IN_SYSMACROS)
6374#include <sys/sysmacros.h>
6375#else
6376#include <sys/types.h>
6377#endif
6378
Neal Norwitz11690112002-07-30 01:08:28 +00006379int
6380main ()
6381{
Jesus Cea740f53a2010-04-28 11:35:30 +00006382
6383 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006384 ;
6385 return 0;
6386}
Matthias Kloseb159a552010-04-25 21:00:44 +00006387
Neal Norwitz11690112002-07-30 01:08:28 +00006388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006389if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006390 ac_cv_has_makedev=yes
6391else
Matthias Kloseb9621712010-04-24 17:59:49 +00006392 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006394rm -f core conftest.err conftest.$ac_objext \
6395 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006396if test "$ac_cv_has_makedev" = "no"; then
6397 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006400
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006401#define _OSF_SOURCE 1
6402#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006403
Neal Norwitz11690112002-07-30 01:08:28 +00006404int
6405main ()
6406{
6407 makedev(0, 0)
6408 ;
6409 return 0;
6410}
6411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006412if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006413 ac_cv_has_makedev=yes
6414else
Matthias Kloseb9621712010-04-24 17:59:49 +00006415 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006417rm -f core conftest.err conftest.$ac_objext \
6418 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006419 if test "$ac_cv_has_makedev" = "yes"; then
6420
Matthias Kloseb9621712010-04-24 17:59:49 +00006421$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006422
6423 fi
6424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6426$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006427if test "$ac_cv_has_makedev" = "yes"; then
6428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006430
6431fi
6432
Martin v. Löwis399a6892002-10-04 10:22:02 +00006433# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6434# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6435# defined, but the compiler does not support pragma redefine_extname,
6436# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6437# structures (such as rlimit64) without declaring them. As a
6438# work-around, disable LFS on such configurations
6439
6440use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6442$as_echo_n "checking Solaris LFS bug... " >&6; }
6443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006444/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006445
6446#define _LARGEFILE_SOURCE 1
6447#define _FILE_OFFSET_BITS 64
6448#include <sys/resource.h>
6449
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450int
6451main ()
6452{
6453struct rlimit foo;
6454 ;
6455 return 0;
6456}
6457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006459 sol_lfs_bug=no
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6465$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006466if test "$sol_lfs_bug" = "yes"; then
6467 use_lfs=no
6468fi
6469
6470if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006471# Two defines needed to enable largefile support on various platforms
6472# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006473case $ac_sys_system/$ac_sys_release in
6474AIX*)
6475
6476$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6477
6478 ;;
6479esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006480
Matthias Kloseb9621712010-04-24 17:59:49 +00006481$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483
Matthias Kloseb9621712010-04-24 17:59:49 +00006484$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006485
Martin v. Löwis399a6892002-10-04 10:22:02 +00006486fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006487
Guido van Rossum84e7b241996-08-19 21:59:00 +00006488# Add some code to confdefs.h so that the test for off_t works on SCO
6489cat >> confdefs.h <<\EOF
6490#if defined(SCO_DS)
6491#undef _OFF_T
6492#endif
6493EOF
6494
Guido van Rossumef2255b2000-03-10 22:30:29 +00006495# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006496ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006497if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006498
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006499else
Martin v. Löwis11437992002-04-12 09:54:03 +00006500
6501cat >>confdefs.h <<_ACEOF
6502#define mode_t int
6503_ACEOF
6504
6505fi
6506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006508if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510else
Martin v. Löwis11437992002-04-12 09:54:03 +00006511
6512cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006513#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006514_ACEOF
6515
6516fi
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006519if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523cat >>confdefs.h <<_ACEOF
6524#define pid_t int
6525_ACEOF
6526
6527fi
6528
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006529
Martin v. Löwis11437992002-04-12 09:54:03 +00006530cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006531#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Matthias Kloseb9621712010-04-24 17:59:49 +00006534ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006535if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006537else
Martin v. Löwis11437992002-04-12 09:54:03 +00006538
6539cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006541_ACEOF
6542
6543fi
6544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6546$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006547if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006549else
Matthias Kloseb9621712010-04-24 17:59:49 +00006550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006551/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006557 ac_cv_type_uid_t=yes
6558else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559 ac_cv_type_uid_t=no
6560fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006561rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6565$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006566if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006569
6570
Matthias Kloseb9621712010-04-24 17:59:49 +00006571$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572
6573fi
6574
Matthias Kloseb9621712010-04-24 17:59:49 +00006575ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6576case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006577 no|yes) ;; #(
6578 *)
6579
Matthias Kloseb9621712010-04-24 17:59:49 +00006580$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006581
6582
6583cat >>confdefs.h <<_ACEOF
6584#define uint32_t $ac_cv_c_uint32_t
6585_ACEOF
6586;;
6587 esac
6588
Matthias Kloseb9621712010-04-24 17:59:49 +00006589ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6590case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006591 no|yes) ;; #(
6592 *)
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006595
6596
6597cat >>confdefs.h <<_ACEOF
6598#define uint64_t $ac_cv_c_uint64_t
6599_ACEOF
6600;;
6601 esac
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6604case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006605 no|yes) ;; #(
6606 *)
6607
6608cat >>confdefs.h <<_ACEOF
6609#define int32_t $ac_cv_c_int32_t
6610_ACEOF
6611;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006612esac
6613
Matthias Kloseb9621712010-04-24 17:59:49 +00006614ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6615case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006616 no|yes) ;; #(
6617 *)
6618
6619cat >>confdefs.h <<_ACEOF
6620#define int64_t $ac_cv_c_int64_t
6621_ACEOF
6622;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006623esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006624
Matthias Kloseb9621712010-04-24 17:59:49 +00006625ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006626if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627
Matthias Kloseb9621712010-04-24 17:59:49 +00006628$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006629
6630fi
6631
Jack Jansendd19cf82001-12-06 22:36:17 +00006632
Michael W. Hudson54241132001-12-07 15:38:26 +00006633# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006634# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635# The cast to long int works around a bug in the HP C Compiler
6636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6640$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006641if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006645
Martin v. Löwis11437992002-04-12 09:54:03 +00006646else
Matthias Kloseb9621712010-04-24 17:59:49 +00006647 if test "$ac_cv_type_int" = yes; then
6648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006650as_fn_error 77 "cannot compute sizeof (int)
6651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652 else
6653 ac_cv_sizeof_int=0
6654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6659$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006660
6661
6662
Martin v. Löwis11437992002-04-12 09:54:03 +00006663cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006664#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006665_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006666
6667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006668# The cast to long int works around a bug in the HP C Compiler
6669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6673$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006674if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006678
Martin v. Löwis11437992002-04-12 09:54:03 +00006679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 if test "$ac_cv_type_long" = yes; then
6681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006683as_fn_error 77 "cannot compute sizeof (long)
6684See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685 else
6686 ac_cv_sizeof_long=0
6687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6692$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006693
6694
6695
Martin v. Löwis11437992002-04-12 09:54:03 +00006696cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006697#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006698_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006699
6700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701# The cast to long int works around a bug in the HP C Compiler
6702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6706$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006707if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 if test "$ac_cv_type_void_p" = yes; then
6714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006716as_fn_error 77 "cannot compute sizeof (void *)
6717See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718 else
6719 ac_cv_sizeof_void_p=0
6720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6725$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006732
6733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734# The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6739$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006740if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 if test "$ac_cv_type_short" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006749as_fn_error 77 "cannot compute sizeof (short)
6750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751 else
6752 ac_cv_sizeof_short=0
6753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6758$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006759
6760
6761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006764_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006765
6766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006767# The cast to long int works around a bug in the HP C Compiler
6768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6772$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006773if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006775else
Matthias Kloseb9621712010-04-24 17:59:49 +00006776 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 if test "$ac_cv_type_float" = yes; then
6780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006782as_fn_error 77 "cannot compute sizeof (float)
6783See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006784 else
6785 ac_cv_sizeof_float=0
6786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6791$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792
6793
6794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006796#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006797_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006798
6799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800# The cast to long int works around a bug in the HP C Compiler
6801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6803# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6805$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006806if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811else
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 if test "$ac_cv_type_double" = yes; then
6813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006815as_fn_error 77 "cannot compute sizeof (double)
6816See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006817 else
6818 ac_cv_sizeof_double=0
6819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6824$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006825
6826
6827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006829#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006830_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006831
6832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006833# The cast to long int works around a bug in the HP C Compiler
6834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6836# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6838$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006839if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006841else
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 if test "$ac_cv_type_fpos_t" = yes; then
6846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006848as_fn_error 77 "cannot compute sizeof (fpos_t)
6849See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850 else
6851 ac_cv_sizeof_fpos_t=0
6852 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6857$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006858
6859
6860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006862#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006863_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006864
Michael W. Hudson54241132001-12-07 15:38:26 +00006865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866# The cast to long int works around a bug in the HP C Compiler
6867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6869# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6871$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006872if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006873 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006874else
Matthias Kloseb9621712010-04-24 17:59:49 +00006875 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876
Martin v. Löwis18e16552006-02-15 17:27:45 +00006877else
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 if test "$ac_cv_type_size_t" = yes; then
6879 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006881as_fn_error 77 "cannot compute sizeof (size_t)
6882See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883 else
6884 ac_cv_sizeof_size_t=0
6885 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006887
Martin v. Löwis18e16552006-02-15 17:27:45 +00006888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6890$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891
6892
6893
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894cat >>confdefs.h <<_ACEOF
6895#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6896_ACEOF
6897
6898
Christian Heimes400adb02008-02-01 08:12:03 +00006899# The cast to long int works around a bug in the HP C Compiler
6900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6902# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6904$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006905if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006909
Christian Heimes400adb02008-02-01 08:12:03 +00006910else
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 if test "$ac_cv_type_pid_t" = yes; then
6912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006914as_fn_error 77 "cannot compute sizeof (pid_t)
6915See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006916 else
6917 ac_cv_sizeof_pid_t=0
6918 fi
6919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006920
Christian Heimes400adb02008-02-01 08:12:03 +00006921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6923$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006924
6925
6926
6927cat >>confdefs.h <<_ACEOF
6928#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6929_ACEOF
6930
6931
Michael W. Hudson54241132001-12-07 15:38:26 +00006932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6934$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006937/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006942long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
6949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006951
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006952 have_long_long=yes
6953
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6957$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006958if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6964$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006965if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_long_long" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006974as_fn_error 77 "cannot compute sizeof (long long)
6975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976 else
6977 ac_cv_sizeof_long_long=0
6978 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6983$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984
6985
6986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006988#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006989_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006990
Michael W. Hudson54241132001-12-07 15:38:26 +00006991
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006992fi
6993
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6995$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006996have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006998/* end confdefs.h. */
6999
7000int
7001main ()
7002{
7003long double x; x = (long double)0;
7004 ;
7005 return 0;
7006}
7007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007008if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007009
7010
Matthias Kloseb9621712010-04-24 17:59:49 +00007011$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007012
7013 have_long_double=yes
7014
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007015fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7018$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007020# The cast to long int works around a bug in the HP C Compiler
7021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7025$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007026if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 if test "$ac_cv_type_long_double" = yes; then
7033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007035as_fn_error 77 "cannot compute sizeof (long double)
7036See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037 else
7038 ac_cv_sizeof_long_double=0
7039 fi
7040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007041
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7044$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007045
7046
7047
7048cat >>confdefs.h <<_ACEOF
7049#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7050_ACEOF
7051
7052
7053fi
7054
7055
Matthias Kloseb9621712010-04-24 17:59:49 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7057$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007058have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007060/* end confdefs.h. */
7061
7062int
7063main ()
7064{
7065_Bool x; x = (_Bool)0;
7066 ;
7067 return 0;
7068}
7069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007070if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007071
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007074
7075 have_c99_bool=yes
7076
Thomas Woutersb2137042007-02-01 18:02:27 +00007077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7080$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007081if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082# The cast to long int works around a bug in the HP C Compiler
7083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7087$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007088if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007090else
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007092
Thomas Woutersb2137042007-02-01 18:02:27 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type__Bool" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007097as_fn_error 77 "cannot compute sizeof (_Bool)
7098See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 else
7100 ac_cv_sizeof__Bool=0
7101 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Thomas Woutersb2137042007-02-01 18:02:27 +00007104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7106$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107
7108
7109
Thomas Woutersb2137042007-02-01 18:02:27 +00007110cat >>confdefs.h <<_ACEOF
7111#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7112_ACEOF
7113
7114
7115fi
7116
Matthias Kloseb9621712010-04-24 17:59:49 +00007117ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118 #include <stdint.h>
7119 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007120 #ifdef HAVE_INTTYPES_H
7121 #include <inttypes.h>
7122 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007123"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007124if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007125
7126cat >>confdefs.h <<_ACEOF
7127#define HAVE_UINTPTR_T 1
7128_ACEOF
7129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130# The cast to long int works around a bug in the HP C Compiler
7131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7135$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007136if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007140
Martin v. Löwis11437992002-04-12 09:54:03 +00007141else
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 if test "$ac_cv_type_uintptr_t" = yes; then
7143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007145as_fn_error 77 "cannot compute sizeof (uintptr_t)
7146See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147 else
7148 ac_cv_sizeof_uintptr_t=0
7149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7154$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155
7156
7157
Martin v. Löwis11437992002-04-12 09:54:03 +00007158cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007159#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007160_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007161
Michael W. Hudson54241132001-12-07 15:38:26 +00007162
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007163fi
7164
Thomas Wouters89f507f2006-12-13 04:49:30 +00007165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166# The cast to long int works around a bug in the HP C Compiler
7167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7171$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007172if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176#ifdef HAVE_SYS_TYPES_H
7177#include <sys/types.h>
7178#endif
7179
Matthias Kloseb9621712010-04-24 17:59:49 +00007180"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 if test "$ac_cv_type_off_t" = yes; then
7184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007186as_fn_error 77 "cannot compute sizeof (off_t)
7187See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007188 else
7189 ac_cv_sizeof_off_t=0
7190 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7195$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
7198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007200#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007202
Michael W. Hudson54241132001-12-07 15:38:26 +00007203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7206$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007207if test "$have_long_long" = yes
7208then
7209if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007210 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7215$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007216else
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7218$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007219fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007220else
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007223fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225# The cast to long int works around a bug in the HP C Compiler
7226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7230$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007231if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235#ifdef HAVE_SYS_TYPES_H
7236#include <sys/types.h>
7237#endif
7238#ifdef HAVE_TIME_H
7239#include <time.h>
7240#endif
7241
Matthias Kloseb9621712010-04-24 17:59:49 +00007242"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007244else
Matthias Kloseb9621712010-04-24 17:59:49 +00007245 if test "$ac_cv_type_time_t" = yes; then
7246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007248as_fn_error 77 "cannot compute sizeof (time_t)
7249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250 else
7251 ac_cv_sizeof_time_t=0
7252 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7257$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
7260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007262#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007264
Michael W. Hudson54241132001-12-07 15:38:26 +00007265
7266
Trent Mick635f6fb2000-08-23 21:33:05 +00007267# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007268ac_save_cc="$CC"
7269if test "$ac_cv_kpthread" = "yes"
7270then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007271elif test "$ac_cv_kthread" = "yes"
7272then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007273elif test "$ac_cv_pthread" = "yes"
7274then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007275fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
Matthias Kloseb9621712010-04-24 17:59:49 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7278$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007279have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007281/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007282
7283 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007284int
7285main ()
7286{
Guido van Rossum12580492000-09-24 16:47:19 +00007287pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 ;
7289 return 0;
7290}
Matthias Kloseb159a552010-04-25 21:00:44 +00007291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007293if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007294 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7298$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007299if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7303# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7305$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007306if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007308else
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310#ifdef HAVE_PTHREAD_H
7311#include <pthread.h>
7312#endif
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007316else
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$ac_cv_type_pthread_t" = yes; then
7318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007320as_fn_error 77 "cannot compute sizeof (pthread_t)
7321See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322 else
7323 ac_cv_sizeof_pthread_t=0
7324 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Trent Mick635f6fb2000-08-23 21:33:05 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7329$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331
7332
Martin v. Löwis11437992002-04-12 09:54:03 +00007333cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007334#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007335_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337
Trent Mick635f6fb2000-08-23 21:33:05 +00007338fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007339CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007340
Michael W. Hudson54241132001-12-07 15:38:26 +00007341
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007342case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007343 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007344 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7345 ;;
7346 Darwin/*)
7347 OTHER_LIBTOOL_OPT=""
7348 ;;
7349esac
7350
7351
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352ARCH_RUN_32BIT=""
7353
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007354case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007355 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007356 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7357 if test "${enable_universalsdk}"; then
7358 :
7359 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007360 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007361 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007364 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007365 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007366 if test ${gcc_version} '<' 4.0
7367 then
7368 LIBTOOL_CRUFT="-lcc_dynamic"
7369 else
7370 LIBTOOL_CRUFT=""
7371 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007373 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007374else
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007377
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378 #include <unistd.h>
7379 int main(int argc, char*argv[])
7380 {
7381 if (sizeof(long) == 4) {
7382 return 0;
7383 } else {
7384 return 1;
7385 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007386 }
7387
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390 ac_osx_32bit=yes
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396fi
7397
7398
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007399 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007400 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 i386)
7402 MACOSX_DEFAULT_ARCH="i386"
7403 ;;
7404 ppc)
7405 MACOSX_DEFAULT_ARCH="ppc"
7406 ;;
7407 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007408 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409 ;;
7410 esac
7411 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007412 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413 i386)
7414 MACOSX_DEFAULT_ARCH="x86_64"
7415 ;;
7416 ppc)
7417 MACOSX_DEFAULT_ARCH="ppc64"
7418 ;;
7419 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007420 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007421 ;;
7422 esac
7423
7424 #ARCH_RUN_32BIT="true"
7425 fi
7426
7427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007430esac
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7433$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007434if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007435then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007436 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007438 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007444 if test $enable_shared = "yes"
7445 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007446 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007447 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7454$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007455case $ac_sys_system/$ac_sys_release in
7456 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7461$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007462 ;;
7463 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007466 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007467esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007468
Guido van Rossum0a516c91994-09-12 10:58:40 +00007469# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007470
Michael W. Hudson54241132001-12-07 15:38:26 +00007471
7472
7473
7474
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476
Georg Brandlb1441c72009-01-03 22:33:39 +00007477
Thomas Wouters477c8d52006-05-27 19:21:47 +00007478cat >>confdefs.h <<_ACEOF
7479#define SHLIB_EXT "$SO"
7480_ACEOF
7481
Guido van Rossum0a516c91994-09-12 10:58:40 +00007482# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007483# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484# (Shared libraries in this instance are shared modules to be loaded into
7485# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7487$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007488if test -z "$LDSHARED"
7489then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007490 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007491 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007492 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007493 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007494 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007495 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007496 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007497 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 if test "$GCC" = "yes" ; then
7499 LDSHARED='$(CC) -shared'
7500 LDCXXSHARED='$(CXX) -shared'
7501 else
7502 LDSHARED='$(CC) -G'
7503 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007504 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007505 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 if test "$GCC" = "yes" ; then
7507 LDSHARED='$(CC) -shared'
7508 LDCXXSHARED='$(CXX) -shared'
7509 else
7510 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007511 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007512 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007513 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007514 LDSHARED='$(CC) -bundle'
7515 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 if test "$enable_framework" ; then
7517 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007518 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7519 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007521 else
7522 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007523 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007525 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007526 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED='$(CC) -bundle'
7528 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007529 if test "$enable_framework" ; then
7530 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007531 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7532 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007533 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007534 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007535 # No framework, use the Python app as bundle-loader
7536 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007537 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007539 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 Darwin/*)
7541 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7542 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007543
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007544 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007545 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007546 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007547 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007548 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007549 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7550 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007552 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007553 LDSHARED='$(CC) -bundle'
7554 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 if test "$enable_framework" ; then
7556 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007557 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7558 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007560 else
7561 # No framework, use the Python app as bundle-loader
7562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 fi
7566 fi
7567 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568 Linux*|GNU*|QNX*)
7569 LDSHARED='$(CC) -shared'
7570 LDCXXSHARED='$(CXX) -shared';;
7571 BSD/OS*/4*)
7572 LDSHARED="gcc -shared"
7573 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007574 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007575 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007576 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007577 LDSHARED='$(CC) -shared'
7578 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007579 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007580 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007581 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007582 OpenBSD*)
7583 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7584 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007585 LDSHARED='$(CC) -shared $(CCSHARED)'
7586 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007587 else
7588 case `uname -r` in
7589 [01].* | 2.[0-7] | 2.[0-7].*)
7590 LDSHARED="ld -Bshareable ${LDFLAGS}"
7591 ;;
7592 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007593 LDSHARED='$(CC) -shared $(CCSHARED)'
7594 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007595 ;;
7596 esac
7597 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007598 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007599 LDSHARED='$(CC) -shared'
7600 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007601 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007602 if test "$GCC" = "yes" ; then
7603 LDSHARED='$(CC) -shared'
7604 LDCXXSHARED='$(CXX) -shared'
7605 else
7606 LDSHARED='$(CC) -G'
7607 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007608 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 SCO_SV*)
7610 LDSHARED='$(CC) -Wl,-G,-Bexport'
7611 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7612 CYGWIN*)
7613 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7614 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007615 *) LDSHARED="ld";;
7616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7619$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007621BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007623# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7625$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007626if test -z "$CCSHARED"
7627then
Guido van Rossum07397971997-04-29 21:49:50 +00007628 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007629 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007630 then CCSHARED="-fPIC";
7631 elif test `uname -p` = sparc;
7632 then CCSHARED="-xcode=pic32";
7633 else CCSHARED="-Kpic";
7634 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007635 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007636 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007637 else CCSHARED="+z";
7638 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007639 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007640 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007641 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007642 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007643 if test "$GCC" = "yes"
7644 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007645 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007646 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007647 SCO_SV*)
7648 if test "$GCC" = "yes"
7649 then CCSHARED="-fPIC"
7650 else CCSHARED="-Kpic -belf"
7651 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007652 IRIX*/6*) case $CC in
7653 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007654 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007655 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7659$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007660# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007661# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7663$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007664if test -z "$LINKFORSHARED"
7665then
Guido van Rossum07397971997-04-29 21:49:50 +00007666 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007667 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007668 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007669 LINKFORSHARED="-Wl,-E -Wl,+s";;
7670# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007671 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007672 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007673 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007675 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007676 if test "$enable_framework"
7677 then
Jack Jansenda49e192005-01-07 13:08:22 +00007678 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007679 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007680 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007681 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007682 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007683 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007684 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007685 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7686 then
7687 LINKFORSHARED="-Wl,--export-dynamic"
7688 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007689 SunOS/5*) case $CC in
7690 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007691 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007692 then
7693 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007694 fi;;
7695 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007696 CYGWIN*)
7697 if test $enable_shared = "no"
7698 then
7699 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7700 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007701 QNX*)
7702 # -Wl,-E causes the symbols to be added to the dynamic
7703 # symbol table so that they can be found when a module
7704 # is loaded. -N 2048K causes the stack size to be set
7705 # to 2048 kilobytes so that the stack doesn't overflow
7706 # when running test_compile.py.
7707 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7711$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712
Michael W. Hudson54241132001-12-07 15:38:26 +00007713
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007714
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7716$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007717if test ! "$LIBRARY" = "$LDLIBRARY"
7718then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007719 case $ac_sys_system in
7720 CYGWIN*)
7721 # Cygwin needs CCSHARED when building extension DLLs
7722 # but not when building the interpreter DLL.
7723 CFLAGSFORSHARED='';;
7724 *)
7725 CFLAGSFORSHARED='$(CCSHARED)'
7726 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7729$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007730
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007731# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7732# library (with --enable-shared).
7733# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007734# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7735# if it is not required, since it creates a dependency of the shared library
7736# to LIBS. This, in turn, means that applications linking the shared libpython
7737# don't need to link LIBS explicitly. The default should be only changed
7738# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7741$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007743 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007744 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7747$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007748
7749
Guido van Rossum627b2d71993-12-24 10:39:16 +00007750# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7752$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007753if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007754 $as_echo_n "(cached) " >&6
7755else
7756 ac_check_lib_save_LIBS=$LIBS
7757LIBS="-lsendfile $LIBS"
7758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7759/* end confdefs.h. */
7760
7761/* Override any GCC internal prototype to avoid an error.
7762 Use char because int might match the return type of a GCC
7763 builtin and then its argument prototype would still apply. */
7764#ifdef __cplusplus
7765extern "C"
7766#endif
7767char sendfile ();
7768int
7769main ()
7770{
7771return sendfile ();
7772 ;
7773 return 0;
7774}
7775_ACEOF
7776if ac_fn_c_try_link "$LINENO"; then :
7777 ac_cv_lib_sendfile_sendfile=yes
7778else
7779 ac_cv_lib_sendfile_sendfile=no
7780fi
7781rm -f core conftest.err conftest.$ac_objext \
7782 conftest$ac_exeext conftest.$ac_ext
7783LIBS=$ac_check_lib_save_LIBS
7784fi
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7786$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007787if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007788 cat >>confdefs.h <<_ACEOF
7789#define HAVE_LIBSENDFILE 1
7790_ACEOF
7791
7792 LIBS="-lsendfile $LIBS"
7793
7794fi
7795
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7797$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007798if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007802LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806/* Override any GCC internal prototype to avoid an error.
7807 Use char because int might match the return type of a GCC
7808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007809#ifdef __cplusplus
7810extern "C"
7811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007812char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
7815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ;
7818 return 0;
7819}
7820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826rm -f core conftest.err conftest.$ac_objext \
7827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7831$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007832if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 cat >>confdefs.h <<_ACEOF
7834#define HAVE_LIBDL 1
7835_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007837 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839fi
7840 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7842$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007843if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845else
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007847LIBS="-ldld $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 shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ;
7863 return 0;
7864}
7865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007866if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007871rm -f core conftest.err conftest.$ac_objext \
7872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007873LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7876$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007877if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 cat >>confdefs.h <<_ACEOF
7879#define HAVE_LIBDLD 1
7880_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007881
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007882 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007883
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007884fi
7885 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007886
Georg Brandlb1441c72009-01-03 22:33:39 +00007887# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007888if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7890$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007891if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007893else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007894 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898/* Override any GCC internal prototype to avoid an error.
7899 Use char because int might match the return type of a GCC
7900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007901#ifdef __cplusplus
7902extern "C"
7903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007904char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007905int
7906main ()
7907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 ;
7910 return 0;
7911}
7912_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913for ac_lib in '' pthread rt posix4; do
7914 if test -z "$ac_lib"; then
7915 ac_res="none required"
7916 else
7917 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007918 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007923rm -f core conftest.err conftest.$ac_objext \
7924 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007925 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007926 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007929if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931else
7932 ac_cv_search_sem_init=no
7933fi
7934rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007935LIBS=$ac_func_search_save_LIBS
7936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7938$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007940if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007942
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007943fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007944 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007945 # posix4 on Solaris 2.6
7946 # pthread (first!) on Linux
7947fi
7948
Martin v. Löwis19d17342003-06-14 21:03:05 +00007949# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7951$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007952if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007954else
7955 ac_check_lib_save_LIBS=$LIBS
7956LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960/* Override any GCC internal prototype to avoid an error.
7961 Use char because int might match the return type of a GCC
7962 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007963#ifdef __cplusplus
7964extern "C"
7965#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007966char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007967int
7968main ()
7969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007971 ;
7972 return 0;
7973}
7974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007975if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007976 ac_cv_lib_intl_textdomain=yes
7977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980rm -f core conftest.err conftest.$ac_objext \
7981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007982LIBS=$ac_check_lib_save_LIBS
7983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7985$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007986if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007987
Matthias Kloseb9621712010-04-24 17:59:49 +00007988$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989
Brett Cannonc6d936e2009-06-07 20:09:53 +00007990 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007991fi
7992
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007993
7994# checks for system dependent C++ extensions support
7995case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7997$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008000
Georg Brandl59e87bd2011-02-15 19:48:59 +00008001 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008005loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ;
8007 return 0;
8008}
Matthias Kloseb159a552010-04-25 21:00:44 +00008009
Martin v. Löwis11437992002-04-12 09:54:03 +00008010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008012
Matthias Kloseb159a552010-04-25 21:00:44 +00008013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
Matthias Kloseb159a552010-04-25 21:00:44 +00008016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008017$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008018
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008019else
Matthias Kloseb159a552010-04-25 21:00:44 +00008020
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008022$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025rm -f core conftest.err conftest.$ac_objext \
8026 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008027 *) ;;
8028esac
8029
Guido van Rossum70c7f481998-03-26 18:44:10 +00008030# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8032$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008033if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008035else
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008037LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041/* Override any GCC internal prototype to avoid an error.
8042 Use char because int might match the return type of a GCC
8043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008044#ifdef __cplusplus
8045extern "C"
8046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008047char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008048int
8049main ()
8050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ;
8053 return 0;
8054}
8055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061rm -f core conftest.err conftest.$ac_objext \
8062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008063LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8066$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008067if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008068 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008069fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008070 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8072$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008073if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008075else
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008077LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081/* Override any GCC internal prototype to avoid an error.
8082 Use char because int might match the return type of a GCC
8083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008084#ifdef __cplusplus
8085extern "C"
8086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008087char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008088int
8089main ()
8090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8106$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008107if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008108 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008109fi
8110 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008111
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8113$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008116if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8119$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008120LIBS="$withval $LIBS"
8121
8122else
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125fi
8126
Guido van Rossum7f43da71994-08-01 12:15:30 +00008127
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8130set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8132$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008133if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008135else
8136 case $PKG_CONFIG in
8137 [\\/]* | ?:[\\/]*)
8138 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8139 ;;
8140 *)
8141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8142for as_dir in $PATH
8143do
8144 IFS=$as_save_IFS
8145 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8148 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150 break 2
8151 fi
8152done
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008154IFS=$as_save_IFS
8155
8156 ;;
8157esac
8158fi
8159PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8160if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8162$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008166fi
8167
8168
8169fi
8170if test -z "$ac_cv_path_PKG_CONFIG"; then
8171 ac_pt_PKG_CONFIG=$PKG_CONFIG
8172 # Extract the first word of "pkg-config", so it can be a program name with args.
8173set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8175$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008176if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008177 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008178else
8179 case $ac_pt_PKG_CONFIG in
8180 [\\/]* | ?:[\\/]*)
8181 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8182 ;;
8183 *)
8184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8185for as_dir in $PATH
8186do
8187 IFS=$as_save_IFS
8188 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008190 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8191 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008193 break 2
8194 fi
8195done
Matthias Kloseb9621712010-04-24 17:59:49 +00008196 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008197IFS=$as_save_IFS
8198
8199 ;;
8200esac
8201fi
8202ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8203if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8205$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206else
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8208$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008209fi
8210
8211 if test "x$ac_pt_PKG_CONFIG" = x; then
8212 PKG_CONFIG=""
8213 else
8214 case $cross_compiling:$ac_tool_warned in
8215yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008218ac_tool_warned=yes ;;
8219esac
8220 PKG_CONFIG=$ac_pt_PKG_CONFIG
8221 fi
8222else
8223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8224fi
8225
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008226
8227# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8229$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008230
8231# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008232if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008233 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008234else
8235 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008236fi
8237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8240$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008241
8242# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8244$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008245
8246# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008247if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008248 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008249else
8250 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008251fi
8252
8253
8254if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008255 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8256else
8257 LIBFFI_INCLUDEDIR=""
8258fi
8259
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8262$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008263
Benjamin Peterson076ed002010-10-31 17:11:02 +00008264# Check for support for loadable sqlite extensions
8265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8266$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8267# Check whether --enable-loadable-sqlite-extensions was given.
8268if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8269 enableval=$enable_loadable_sqlite_extensions;
8270else
8271 enable_loadable_sqlite_extensions="no"
8272fi
8273
8274
8275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8276$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8277
Matthias Klose55708cc2009-04-30 08:06:49 +00008278# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8280$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008281
8282# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008284 withval=$with_dbmliborder;
8285if test x$with_dbmliborder = xyes
8286then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008287as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008288else
8289 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8290 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8291 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008292 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008293 fi
8294 done
8295fi
8296fi
8297
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8299$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008300
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008301# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008302
8303
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8305$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008308if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 withval=$with_signal_module;
8310fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008311
8312
8313if test -z "$with_signal_module"
8314then with_signal_module="yes"
8315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8317$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008318
8319if test "${with_signal_module}" = "yes"; then
8320 USE_SIGNAL_MODULE=""
8321 SIGNAL_OBJS=""
8322else
8323 USE_SIGNAL_MODULE="#"
8324 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8325fi
8326
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008327# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008328
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008329USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8332$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008333
Guido van Rossumec2f0731997-01-22 20:54:01 +00008334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008336if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8339$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008340LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008341if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008342 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008343fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8346$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347fi
8348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350# Templates for things AC_DEFINEd more than once.
8351# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008352
8353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
8355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8357$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008360if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 withval=$with_threads;
8362fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008363
8364
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008365# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008368if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369 withval=$with_thread; with_threads=$with_thread
8370fi
8371
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008372
8373if test -z "$with_threads"
8374then with_threads="yes"
8375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8377$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008378
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008379
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008380if test "$with_threads" = "no"
8381then
8382 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008383elif test "$ac_cv_pthread_is_default" = yes
8384then
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008386
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008387 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008389
8390 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008392elif test "$ac_cv_kpthread" = "yes"
8393then
8394 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008395 if test "$ac_cv_cxx_thread" = "yes"; then
8396 CXX="$CXX -Kpthread"
8397 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008399
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008400 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008401 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008402elif test "$ac_cv_kthread" = "yes"
8403then
8404 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008405 if test "$ac_cv_cxx_thread" = "yes"; then
8406 CXX="$CXX -Kthread"
8407 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008409
8410 posix_threads=yes
8411 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008412elif test "$ac_cv_pthread" = "yes"
8413then
8414 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008415 if test "$ac_cv_cxx_thread" = "yes"; then
8416 CXX="$CXX -pthread"
8417 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008419
8420 posix_threads=yes
8421 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008422else
8423 if test ! -z "$with_threads" -a -d "$with_threads"
8424 then LDFLAGS="$LDFLAGS -L$with_threads"
8425 fi
8426 if test ! -z "$withval" -a -d "$withval"
8427 then LDFLAGS="$LDFLAGS -L$withval"
8428 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008429
8430 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008431 # define _POSIX_THREADS in unistd.h. Some apparently don't
8432 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8434$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008436/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008437
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008438#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008439#ifdef _POSIX_THREADS
8440yes
8441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008442
8443_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008446 unistd_defines_pthreads=yes
8447else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008448 unistd_defines_pthreads=no
8449fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008450rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8453$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 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 +00008458if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008465
8466 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008467 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008468else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 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 +00008471if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008475
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008478
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008479 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008480else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008481
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008482 # Just looking for pthread_create in libpthread is not enough:
8483 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8484 # So we really have to include pthread.h, and then link.
8485 _libs=$LIBS
8486 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8488$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008491#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008492
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008493void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008494int
8495main ()
8496{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008497
8498pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ;
8500 return 0;
8501}
8502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8506$as_echo "yes" >&6; }
8507 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008508
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008509 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008510 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008511else
Martin v. Löwis11437992002-04-12 09:54:03 +00008512
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008513 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008515if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008517
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008518 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008519 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008520else
Guido van Rossumad678af1998-10-02 14:42:15 +00008521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8523$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008524if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008526else
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008528LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532/* Override any GCC internal prototype to avoid an error.
8533 Use char because int might match the return type of a GCC
8534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008535#ifdef __cplusplus
8536extern "C"
8537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008538char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ;
8544 return 0;
8545}
8546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008552rm -f core conftest.err conftest.$ac_objext \
8553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008554LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8557$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008558if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008561 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008562 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008563 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008564else
Greg Steinadf63d62000-07-05 10:38:09 +00008565
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8567$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008568if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008570else
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008572LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576/* Override any GCC internal prototype to avoid an error.
8577 Use char because int might match the return type of a GCC
8578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008579#ifdef __cplusplus
8580extern "C"
8581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008582char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008583int
8584main ()
8585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ;
8588 return 0;
8589}
8590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008593else
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596rm -f core conftest.err conftest.$ac_objext \
8597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008598LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8601$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008602if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008604
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008605 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008606 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008607 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008608else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008609
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8611$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008612if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008614else
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008616LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620/* Override any GCC internal prototype to avoid an error.
8621 Use char because int might match the return type of a GCC
8622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623#ifdef __cplusplus
8624extern "C"
8625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008626char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008627int
8628main ()
8629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ;
8632 return 0;
8633}
8634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008637else
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640rm -f core conftest.err conftest.$ac_objext \
8641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008642LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8645$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008646if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008650 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008651 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008652else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8655$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008656if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008660LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8689$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008690if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008694 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008695 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008696else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008697
Martin v. Löwis130fb172001-07-19 11:00:41 +00008698 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008699fi
8700
Guido van Rossum627b2d71993-12-24 10:39:16 +00008701
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008702fi
8703
Guido van Rossum0be3e491997-05-22 20:33:33 +00008704fi
8705
Guido van Rossum49545951997-12-02 19:28:29 +00008706fi
8707
Guido van Rossumb93a8621998-05-07 13:27:32 +00008708fi
8709
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711rm -f core conftest.err conftest.$ac_objext \
8712 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713fi
8714
Martin v. Löwis11437992002-04-12 09:54:03 +00008715
8716fi
8717
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008718
Michael W. Hudson54241132001-12-07 15:38:26 +00008719
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8721$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008722if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008724else
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008726LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730/* Override any GCC internal prototype to avoid an error.
8731 Use char because int might match the return type of a GCC
8732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008733#ifdef __cplusplus
8734extern "C"
8735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008736char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008737int
8738main ()
8739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 ;
8742 return 0;
8743}
8744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008746 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750rm -f core conftest.err conftest.$ac_objext \
8751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008752LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8755$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008756if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008758
Martin v. Löwis130fb172001-07-19 11:00:41 +00008759 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008760 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008761 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008762fi
8763
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008764
Neal Norwitza978ab02002-11-02 16:58:05 +00008765 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8767$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008768if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008770else
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008772LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776/* Override any GCC internal prototype to avoid an error.
8777 Use char because int might match the return type of a GCC
8778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008779#ifdef __cplusplus
8780extern "C"
8781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008782char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008783int
8784main ()
8785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ;
8788 return 0;
8789}
8790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796rm -f core conftest.err conftest.$ac_objext \
8797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008798LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8801$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008802if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008804
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008805 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008806 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008807 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008808fi
8809
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008810 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008811
Martin v. Löwis130fb172001-07-19 11:00:41 +00008812 if test "$USE_THREAD_MODULE" != "#"
8813 then
8814 # If the above checks didn't disable threads, (at least) OSF1
8815 # needs this '-threads' argument during linking.
8816 case $ac_sys_system in
8817 OSF1) LDLAST=-threads;;
8818 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008819 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008821
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822if test "$posix_threads" = "yes"; then
8823 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008824
Matthias Kloseb9621712010-04-24 17:59:49 +00008825$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008826
8827 fi
8828
8829 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8830 case $ac_sys_system/$ac_sys_release in
8831 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008832$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008833
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834 ;;
8835 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008836$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837
8838 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008839 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008840$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008841
8842 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008843 AIX/6)
8844$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8845
8846 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008847 esac
8848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8850$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008851 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008855 ac_cv_pthread_system_supported=no
8856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859#include <pthread.h>
8860 void *foo(void *parm) {
8861 return NULL;
8862 }
8863 main() {
8864 pthread_attr_t attr;
8865 pthread_t id;
8866 if (pthread_attr_init(&attr)) exit(-1);
8867 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8868 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8869 exit(0);
8870 }
8871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008873 ac_cv_pthread_system_supported=yes
8874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008879fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881
Guido van Rossum627b2d71993-12-24 10:39:16 +00008882fi
8883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8885$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008886 if test "$ac_cv_pthread_system_supported" = "yes"; then
8887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889
8890 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 for ac_func in pthread_sigmask
8892do :
8893 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008894if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008895 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008896#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008897_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008898 case $ac_sys_system in
8899 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008900
Matthias Kloseb9621712010-04-24 17:59:49 +00008901$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008902
8903 ;;
8904 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008905fi
8906done
8907
8908fi
8909
8910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8914$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008916if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8920$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921 ipv6=no
8922 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8924$as_echo "yes" >&6; }
8925 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926
8927 ipv6=yes
8928 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008930else
Martin v. Löwis11437992002-04-12 09:54:03 +00008931
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008933
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936 ipv6=no
8937
8938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008940/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941 /* AF_INET6 available check */
8942#include <sys/types.h>
8943#include <sys/socket.h>
8944main()
8945{
8946 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8947 exit(1);
8948 else
8949 exit(0);
8950}
8951
Martin v. Löwis11437992002-04-12 09:54:03 +00008952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008953if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008954
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8956$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008958
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959else
Matthias Kloseb159a552010-04-25 21:00:44 +00008960
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968fi
8969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008971if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8973$as_echo_n "checking if RFC2553 API is available... " >&6; }
8974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008976
8977 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008978#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008979int
8980main ()
8981{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008982struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008983 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ;
8985 return 0;
8986}
Matthias Kloseb159a552010-04-25 21:00:44 +00008987
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008989if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008990
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008992$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008993 ipv6=yes
8994
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008995else
Matthias Kloseb159a552010-04-25 21:00:44 +00008996
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008998$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008999 ipv6=no
9000
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009003fi
9004
9005if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009007
9008fi
9009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010fi
9011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012
9013ipv6type=unknown
9014ipv6lib=none
9015ipv6trylibc=no
9016
9017if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9019$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009020 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9021 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 case $i in
9023 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027#include <netinet/in.h>
9028#ifdef IPV6_INRIA_VERSION
9029yes
9030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009034 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009035fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009036rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037
9038 ;;
9039 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009041/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009042
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043#include <netinet/in.h>
9044#ifdef __KAME__
9045yes
9046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009047_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050 ipv6type=$i;
9051 ipv6lib=inet6
9052 ipv6libdir=/usr/local/v6/lib
9053 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009055rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056
9057 ;;
9058 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009061
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062#include <features.h>
9063#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9064yes
9065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009066_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069 ipv6type=$i;
9070 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009072rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073
9074 ;;
9075 linux-inet6)
9076 if test -d /usr/inet6; then
9077 ipv6type=$i
9078 ipv6lib=inet6
9079 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009080 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081 fi
9082 ;;
9083 solaris)
9084 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009085 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086 ipv6type=$i
9087 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088 fi
9089 fi
9090 ;;
9091 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009093/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095#include <sys/param.h>
9096#ifdef _TOSHIBA_INET6
9097yes
9098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009099_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102 ipv6type=$i;
9103 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009104 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009106rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107
9108 ;;
9109 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113#include </usr/local/v6/include/sys/v6config.h>
9114#ifdef __V6D__
9115yes
9116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009117_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120 ipv6type=$i;
9121 ipv6lib=v6;
9122 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009123 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009125rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009126
9127 ;;
9128 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009130/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132#include <sys/param.h>
9133#ifdef _ZETA_MINAMI_INET6
9134yes
9135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009136_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139 ipv6type=$i;
9140 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009141 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009143rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144
9145 ;;
9146 esac
9147 if test "$ipv6type" != "unknown"; then
9148 break
9149 fi
9150 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9152$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153fi
9154
9155if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9156 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9157 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9158 echo "using lib$ipv6lib"
9159 else
9160 if test $ipv6trylibc = "yes"; then
9161 echo "using libc"
9162 else
9163 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9164 echo "You need to fetch lib$ipv6lib.a from appropriate"
9165 echo 'ipv6 kit and compile beforehand.'
9166 exit 1
9167 fi
9168 fi
9169fi
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9172$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009174/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009175
9176 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009177int
9178main ()
9179{
9180FSIORefNum fRef = 0
9181 ;
9182 return 0;
9183}
Matthias Kloseb159a552010-04-25 21:00:44 +00009184
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009187
Matthias Kloseb159a552010-04-25 21:00:44 +00009188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9192$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009193
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009194else
Matthias Kloseb159a552010-04-25 21:00:44 +00009195
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9197$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009198
9199fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9201
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009202# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9204$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 withval=$with_doc_strings;
9209fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009210
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009211
9212if test -z "$with_doc_strings"
9213then with_doc_strings="yes"
9214fi
9215if test "$with_doc_strings" != "no"
9216then
9217
Matthias Kloseb9621712010-04-24 17:59:49 +00009218$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009219
9220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9222$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009223
Antoine Pitrou042b1282010-08-13 21:15:58 +00009224# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9226$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009231if test "$withval" != no
9232then
9233
Matthias Kloseb9621712010-04-24 17:59:49 +00009234$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009235
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9237$as_echo "yes" >&6; }
9238else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9239$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009240fi
9241else
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244fi
9245
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009246
9247# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9249$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009252if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253 withval=$with_pymalloc;
9254fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009255
Neil Schemenauera35c6882001-02-27 04:45:05 +00009256
Neil Schemenauer16c22972002-03-22 15:34:49 +00009257if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009258then
9259 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009260 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009261fi
9262if test "$with_pymalloc" != "no"
9263then
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009266
9267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9269$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009270
Benjamin Peterson05159c42009-12-03 03:01:27 +00009271# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9273$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009274
9275# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009276if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009277 withval=$with_valgrind;
9278else
9279 with_valgrind=no
9280fi
9281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9283$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009284if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 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 +00009286if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009287
Matthias Kloseb9621712010-04-24 17:59:49 +00009288$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009289
9290else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009291 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009292
9293fi
9294
9295
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009296 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009297fi
9298
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009299# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009300
Guido van Rossum98935bf2001-09-05 19:13:16 +00009301DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009302
Guido van Rossume97ee181999-12-20 21:27:22 +00009303# the dlopen() function means we might want to use dynload_shlib.o. some
9304# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009305for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009306do :
9307 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009308if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009310#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009311_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009312
Guido van Rossume97ee181999-12-20 21:27:22 +00009313fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009314done
Guido van Rossume97ee181999-12-20 21:27:22 +00009315
Michael W. Hudson54241132001-12-07 15:38:26 +00009316
Guido van Rossume97ee181999-12-20 21:27:22 +00009317# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9318# loading of modules.
9319
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9321$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009322if test -z "$DYNLOADFILE"
9323then
9324 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009325 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9326 if test "$ac_cv_func_dlopen" = yes
9327 then DYNLOADFILE="dynload_shlib.o"
9328 else DYNLOADFILE="dynload_aix.o"
9329 fi
9330 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009331 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009332 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9333 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009334 *)
9335 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9336 # out any dynamic loading
9337 if test "$ac_cv_func_dlopen" = yes
9338 then DYNLOADFILE="dynload_shlib.o"
9339 else DYNLOADFILE="dynload_stub.o"
9340 fi
9341 ;;
9342 esac
9343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9345$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009346if test "$DYNLOADFILE" != "dynload_stub.o"
9347then
Martin v. Löwis11437992002-04-12 09:54:03 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009350
9351fi
9352
Neil Schemenauer4e425612001-06-19 15:44:15 +00009353# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9354
Michael W. Hudson54241132001-12-07 15:38:26 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9357$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009358if test -z "$MACHDEP_OBJS"
9359then
Jack Jansene578a632001-08-15 01:27:14 +00009360 MACHDEP_OBJS=$extra_machdep_objs
9361else
9362 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9365$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009366
Guido van Rossum627b2d71993-12-24 10:39:16 +00009367# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009368for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009369 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
9370 fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009371 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009372 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009373 initgroups kill killpg lchmod lchown linkat lstat mbrtowc mkdirat mkfifo \
9374 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
9375 pthread_init putenv readlink readlinkat realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009376 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009377 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009378 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009379 sigaction siginterrupt sigrelse snprintf strftime strlcpy symlinkat \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009380 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009381 truncate uname unlinkat unsetenv utimensat utimes waitpid wait3 wait4 \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009382 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009383do :
9384 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9385ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009386if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009388#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009389_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009391fi
9392done
9393
Michael W. Hudson54241132001-12-07 15:38:26 +00009394
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395# For some functions, having a definition is not sufficient, since
9396# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9398$as_echo_n "checking for chroot... " >&6; }
9399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009402int
9403main ()
9404{
9405void *x=chroot
9406 ;
9407 return 0;
9408}
9409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009413
Matthias Kloseb159a552010-04-25 21:00:44 +00009414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009415$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416else
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009419
9420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9423$as_echo_n "checking for link... " >&6; }
9424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009425/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009426#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009427int
9428main ()
9429{
9430void *x=link
9431 ;
9432 return 0;
9433}
9434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436
Matthias Kloseb9621712010-04-24 17:59:49 +00009437$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009438
Matthias Kloseb159a552010-04-25 21:00:44 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009440$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009441else
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9443$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009444
9445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9448$as_echo_n "checking for symlink... " >&6; }
9449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009450/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009451#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452int
9453main ()
9454{
9455void *x=symlink
9456 ;
9457 return 0;
9458}
9459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463
Matthias Kloseb159a552010-04-25 21:00:44 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009465$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009466else
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9468$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009469
9470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9473$as_echo_n "checking for fchdir... " >&6; }
9474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009475/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476#include <unistd.h>
9477int
9478main ()
9479{
9480void *x=fchdir
9481 ;
9482 return 0;
9483}
9484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009486
Matthias Kloseb9621712010-04-24 17:59:49 +00009487$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009488
Matthias Kloseb159a552010-04-25 21:00:44 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009490$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009491else
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009494
9495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9498$as_echo_n "checking for fsync... " >&6; }
9499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009501#include <unistd.h>
9502int
9503main ()
9504{
9505void *x=fsync
9506 ;
9507 return 0;
9508}
9509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511
Matthias Kloseb9621712010-04-24 17:59:49 +00009512$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009513
Matthias Kloseb159a552010-04-25 21:00:44 +00009514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009516else
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009519
9520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9523$as_echo_n "checking for fdatasync... " >&6; }
9524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009526#include <unistd.h>
9527int
9528main ()
9529{
9530void *x=fdatasync
9531 ;
9532 return 0;
9533}
9534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009538
Matthias Kloseb159a552010-04-25 21:00:44 +00009539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009540$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009541else
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009544
9545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9548$as_echo_n "checking for epoll... " >&6; }
9549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009550/* end confdefs.h. */
9551#include <sys/epoll.h>
9552int
9553main ()
9554{
9555void *x=epoll_create
9556 ;
9557 return 0;
9558}
9559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009561
Matthias Kloseb9621712010-04-24 17:59:49 +00009562$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009563
Matthias Kloseb159a552010-04-25 21:00:44 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009565$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009566else
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009569
9570fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9573$as_echo_n "checking for kqueue... " >&6; }
9574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009575/* end confdefs.h. */
9576
9577#include <sys/types.h>
9578#include <sys/event.h>
9579
9580int
9581main ()
9582{
9583int x=kqueue()
9584 ;
9585 return 0;
9586}
9587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009588if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009589
Matthias Kloseb9621712010-04-24 17:59:49 +00009590$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009591
Matthias Kloseb159a552010-04-25 21:00:44 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009593$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009594else
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009597
9598fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009600# On some systems (eg. FreeBSD 5), we would find a definition of the
9601# functions ctermid_r, setgroups in the library, but no prototype
9602# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9603# address to avoid compiler warnings and potential miscompilations
9604# because of the missing prototypes.
9605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9607$as_echo_n "checking for ctermid_r... " >&6; }
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009610
Martin v. Löwisd5843682002-11-21 20:41:28 +00009611#include <stdio.h>
9612
Martin v. Löwisd5843682002-11-21 20:41:28 +00009613int
9614main ()
9615{
9616void* p = ctermid_r
9617 ;
9618 return 0;
9619}
9620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009627else
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009630
9631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9633
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9635$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009636if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009637 $as_echo_n "(cached) " >&6
9638else
9639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009640/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009641#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009642int
9643main ()
9644{
9645void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009646
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009647 ;
9648 return 0;
9649}
9650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009652 ac_cv_flock_decl=yes
9653else
9654 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009655
9656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009658
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9661$as_echo "$ac_cv_flock_decl" >&6; }
9662if test "x${ac_cv_flock_decl}" = xyes; then
9663 for ac_func in flock
9664do :
9665 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009666if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009667 cat >>confdefs.h <<_ACEOF
9668#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009669_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009670
Antoine Pitroua3000072010-09-07 14:52:42 +00009671else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009673$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009674if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009675 $as_echo_n "(cached) " >&6
9676else
9677 ac_check_lib_save_LIBS=$LIBS
9678LIBS="-lbsd $LIBS"
9679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9680/* end confdefs.h. */
9681
9682/* Override any GCC internal prototype to avoid an error.
9683 Use char because int might match the return type of a GCC
9684 builtin and then its argument prototype would still apply. */
9685#ifdef __cplusplus
9686extern "C"
9687#endif
9688char flock ();
9689int
9690main ()
9691{
9692return flock ();
9693 ;
9694 return 0;
9695}
9696_ACEOF
9697if ac_fn_c_try_link "$LINENO"; then :
9698 ac_cv_lib_bsd_flock=yes
9699else
9700 ac_cv_lib_bsd_flock=no
9701fi
9702rm -f core conftest.err conftest.$ac_objext \
9703 conftest$ac_exeext conftest.$ac_ext
9704LIBS=$ac_check_lib_save_LIBS
9705fi
9706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9707$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009708if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009709 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009710
9711
9712$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9713
9714
9715fi
9716
9717
9718fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009719done
9720
Antoine Pitroua3000072010-09-07 14:52:42 +00009721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9724$as_echo_n "checking for getpagesize... " >&6; }
9725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009727
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009728#include <unistd.h>
9729
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009730int
9731main ()
9732{
9733void* p = getpagesize
9734 ;
9735 return 0;
9736}
9737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009738if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009741
Matthias Kloseb159a552010-04-25 21:00:44 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009743$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009747
9748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009750
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009751for ac_prog in true
9752do
9753 # Extract the first word of "$ac_prog", so it can be a program name with args.
9754set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009757if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009759else
9760 if test -n "$TRUE"; then
9761 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9762else
9763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9764for as_dir in $PATH
9765do
9766 IFS=$as_save_IFS
9767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 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 +00009770 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 $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 +00009772 break 2
9773 fi
9774done
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009777
9778fi
9779fi
9780TRUE=$ac_cv_prog_TRUE
9781if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9783$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009784else
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009787fi
9788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009790 test -n "$TRUE" && break
9791done
9792test -n "$TRUE" || TRUE="/bin/true"
9793
9794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9796$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009797if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009799else
9800 ac_check_lib_save_LIBS=$LIBS
9801LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805/* Override any GCC internal prototype to avoid an error.
9806 Use char because int might match the return type of a GCC
9807 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808#ifdef __cplusplus
9809extern "C"
9810#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009811char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812int
9813main ()
9814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816 ;
9817 return 0;
9818}
9819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009821 ac_cv_lib_c_inet_aton=yes
9822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825rm -f core conftest.err conftest.$ac_objext \
9826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009827LIBS=$ac_check_lib_save_LIBS
9828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9830$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009831if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009832 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009833else
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9835$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009836if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838else
9839 ac_check_lib_save_LIBS=$LIBS
9840LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009842/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844/* Override any GCC internal prototype to avoid an error.
9845 Use char because int might match the return type of a GCC
9846 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847#ifdef __cplusplus
9848extern "C"
9849#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009850char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851int
9852main ()
9853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855 ;
9856 return 0;
9857}
9858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860 ac_cv_lib_resolv_inet_aton=yes
9861else
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864rm -f core conftest.err conftest.$ac_objext \
9865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009866LIBS=$ac_check_lib_save_LIBS
9867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9869$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009870if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009871 cat >>confdefs.h <<_ACEOF
9872#define HAVE_LIBRESOLV 1
9873_ACEOF
9874
9875 LIBS="-lresolv $LIBS"
9876
9877fi
9878
9879
9880fi
9881
9882
Christian Heimesd0764e22007-12-04 15:00:33 +00009883# On Tru64, chflags seems to be present, but calling it will
9884# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9886$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009887if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009889else
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009891 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009892else
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009894/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009895[
Christian Heimesd0764e22007-12-04 15:00:33 +00009896#include <sys/stat.h>
9897#include <unistd.h>
9898int main(int argc, char*argv[])
9899{
9900 if(chflags(argv[0], 0) != 0)
9901 return 1;
9902 return 0;
9903}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009904]
Christian Heimesd0764e22007-12-04 15:00:33 +00009905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009907 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009908else
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009913fi
9914
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9918$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009919if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009921if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009922 ac_cv_have_chflags="yes"
9923else
9924 ac_cv_have_chflags="no"
9925fi
9926
9927fi
9928if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009929
Matthias Kloseb9621712010-04-24 17:59:49 +00009930$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009931
9932fi
9933
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9935$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009936if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009940 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009943/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009944[
Christian Heimesd0764e22007-12-04 15:00:33 +00009945#include <sys/stat.h>
9946#include <unistd.h>
9947int main(int argc, char*argv[])
9948{
9949 if(lchflags(argv[0], 0) != 0)
9950 return 1;
9951 return 0;
9952}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009953]
Christian Heimesd0764e22007-12-04 15:00:33 +00009954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009956 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009962fi
9963
9964
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9967$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009968if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009970if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009971 ac_cv_have_lchflags="yes"
9972else
9973 ac_cv_have_lchflags="no"
9974fi
9975
9976fi
9977if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009978
Matthias Kloseb9621712010-04-24 17:59:49 +00009979$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009980
9981fi
9982
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009983case $ac_sys_system/$ac_sys_release in
9984Darwin/*)
9985 _CUR_CFLAGS="${CFLAGS}"
9986 _CUR_LDFLAGS="${LDFLAGS}"
9987 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9988 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9989 ;;
9990esac
9991
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9993$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009994if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009996else
9997 ac_check_lib_save_LIBS=$LIBS
9998LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010000/* end confdefs.h. */
10001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002/* Override any GCC internal prototype to avoid an error.
10003 Use char because int might match the return type of a GCC
10004 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010005#ifdef __cplusplus
10006extern "C"
10007#endif
10008char inflateCopy ();
10009int
10010main ()
10011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013 ;
10014 return 0;
10015}
10016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010017if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010018 ac_cv_lib_z_inflateCopy=yes
10019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022rm -f core conftest.err conftest.$ac_objext \
10023 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010024LIBS=$ac_check_lib_save_LIBS
10025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10027$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010028if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010031
10032fi
10033
10034
10035case $ac_sys_system/$ac_sys_release in
10036Darwin/*)
10037 CFLAGS="${_CUR_CFLAGS}"
10038 LDFLAGS="${_CUR_LDFLAGS}"
10039 ;;
10040esac
10041
Matthias Kloseb9621712010-04-24 17:59:49 +000010042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10043$as_echo_n "checking for hstrerror... " >&6; }
10044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010046
Martin v. Löwise9416172003-05-03 10:12:45 +000010047#include <netdb.h>
10048
Martin v. Löwise9416172003-05-03 10:12:45 +000010049int
10050main ()
10051{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010053 ;
10054 return 0;
10055}
10056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010060
Matthias Kloseb159a552010-04-25 21:00:44 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010062$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010063else
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010066
10067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068rm -f core conftest.err conftest.$ac_objext \
10069 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10072$as_echo_n "checking for inet_aton... " >&6; }
10073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010074/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010075
Martin v. Löwis86d66262006-02-17 08:40:11 +000010076#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010077#include <sys/socket.h>
10078#include <netinet/in.h>
10079#include <arpa/inet.h>
10080
Martin v. Löwise9416172003-05-03 10:12:45 +000010081int
10082main ()
10083{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010084void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010085 ;
10086 return 0;
10087}
10088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010092
Matthias Kloseb159a552010-04-25 21:00:44 +000010093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010094$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010095else
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010098
10099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010100rm -f core conftest.err conftest.$ac_objext \
10101 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10104$as_echo_n "checking for inet_pton... " >&6; }
10105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010107
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010108#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010109#include <sys/socket.h>
10110#include <netinet/in.h>
10111#include <arpa/inet.h>
10112
Martin v. Löwise9416172003-05-03 10:12:45 +000010113int
10114main ()
10115{
10116void* p = inet_pton
10117 ;
10118 return 0;
10119}
10120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010124
Matthias Kloseb159a552010-04-25 21:00:44 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010130
10131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010133
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010134# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10136$as_echo_n "checking for setgroups... " >&6; }
10137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010139
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010140#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010141#ifdef HAVE_GRP_H
10142#include <grp.h>
10143#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010144
Martin v. Löwisd5843682002-11-21 20:41:28 +000010145int
10146main ()
10147{
10148void* p = setgroups
10149 ;
10150 return 0;
10151}
10152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010156
Matthias Kloseb159a552010-04-25 21:00:44 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010158$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010162
10163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010166# check for openpty and forkpty
10167
10168for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010169do :
10170 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010171if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010173#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010176else
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10178$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010179if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010181else
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010183LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187/* Override any GCC internal prototype to avoid an error.
10188 Use char because int might match the return type of a GCC
10189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010190#ifdef __cplusplus
10191extern "C"
10192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010193char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010194int
10195main ()
10196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 ;
10199 return 0;
10200}
10201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010202if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010207rm -f core conftest.err conftest.$ac_objext \
10208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010209LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10212$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010213if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010216else
Matthias Kloseb9621712010-04-24 17:59:49 +000010217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10218$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010219if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221else
10222 ac_check_lib_save_LIBS=$LIBS
10223LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225/* end confdefs.h. */
10226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227/* Override any GCC internal prototype to avoid an error.
10228 Use char because int might match the return type of a GCC
10229 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230#ifdef __cplusplus
10231extern "C"
10232#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010233char openpty ();
10234int
10235main ()
10236{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010238 ;
10239 return 0;
10240}
10241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010242if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010243 ac_cv_lib_bsd_openpty=yes
10244else
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247rm -f core conftest.err conftest.$ac_objext \
10248 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010249LIBS=$ac_check_lib_save_LIBS
10250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10252$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010253if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255 LIBS="$LIBS -lbsd"
10256fi
10257
10258
10259fi
10260
Fred Drake8cef4cf2000-06-28 16:40:38 +000010261
10262fi
10263done
10264
10265for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010266do :
10267 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010268if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010271_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010272
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273else
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10275$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010276if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010278else
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010280LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284/* Override any GCC internal prototype to avoid an error.
10285 Use char because int might match the return type of a GCC
10286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010287#ifdef __cplusplus
10288extern "C"
10289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010290char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010291int
10292main ()
10293{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ;
10296 return 0;
10297}
10298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010301else
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010304rm -f core conftest.err conftest.$ac_objext \
10305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010306LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10309$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010310if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010312 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10315$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010316if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318else
10319 ac_check_lib_save_LIBS=$LIBS
10320LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010322/* end confdefs.h. */
10323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324/* Override any GCC internal prototype to avoid an error.
10325 Use char because int might match the return type of a GCC
10326 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010327#ifdef __cplusplus
10328extern "C"
10329#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010330char forkpty ();
10331int
10332main ()
10333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010340 ac_cv_lib_bsd_forkpty=yes
10341else
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344rm -f core conftest.err conftest.$ac_objext \
10345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010346LIBS=$ac_check_lib_save_LIBS
10347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10349$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010350if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010352 LIBS="$LIBS -lbsd"
10353fi
10354
10355
10356fi
10357
Fred Drake8cef4cf2000-06-28 16:40:38 +000010358
10359fi
10360done
10361
Jack Jansendd19cf82001-12-06 22:36:17 +000010362
Christian Heimesb186d002008-03-18 15:15:01 +000010363# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010364for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010365do :
10366 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010367if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010368 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010370_ACEOF
10371
10372fi
10373done
10374
10375
Michael W. Hudson54241132001-12-07 15:38:26 +000010376# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010377for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010378do :
10379 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10380ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010381if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010384_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010386fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010387done
10388
Michael W. Hudson54241132001-12-07 15:38:26 +000010389
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010390ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10391if test "x$ac_cv_func_dup2" = xyes; then :
10392 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010393
Martin v. Löwis1142de32002-03-29 16:28:31 +000010394else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010396 *" dup2.$ac_objext "* ) ;;
10397 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010399esac
10400
Martin v. Löwis1142de32002-03-29 16:28:31 +000010401fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010402
10403ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10404if test "x$ac_cv_func_getcwd" = xyes; then :
10405 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10406
10407else
10408 case " $LIBOBJS " in
10409 *" getcwd.$ac_objext "* ) ;;
10410 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10411 ;;
10412esac
10413
10414fi
10415
10416ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10417if test "x$ac_cv_func_strdup" = xyes; then :
10418 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10419
10420else
10421 case " $LIBOBJS " in
10422 *" strdup.$ac_objext "* ) ;;
10423 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10424 ;;
10425esac
10426
10427fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010428
10429
10430for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010431do :
10432 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010433if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010435#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010439#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010440int
10441main ()
10442{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010443getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ;
10445 return 0;
10446}
10447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010449
Matthias Kloseb9621712010-04-24 17:59:49 +000010450$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010451
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010454
Guido van Rossum627b2d71993-12-24 10:39:16 +000010455fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010456done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010457
Jack Jansen150753c2003-03-29 22:07:47 +000010458for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010459do :
10460 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010461if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010462 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010466/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010467#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010468int
10469main ()
10470{
10471setpgrp(0,0);
10472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477
Matthias Kloseb9621712010-04-24 17:59:49 +000010478$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010479
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010482
10483fi
10484done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010485
Thomas Wouters3a584202000-08-05 23:28:51 +000010486for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010487do :
10488 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010489if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010495#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010496int
10497main ()
10498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010499gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ;
10501 return 0;
10502}
10503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010504if ac_fn_c_try_compile "$LINENO"; then :
10505
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506else
Skip Montanaro6dead952003-09-25 14:50:04 +000010507
Matthias Kloseb9621712010-04-24 17:59:49 +000010508$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010509
Martin v. Löwis11437992002-04-12 09:54:03 +000010510
Guido van Rossum627b2d71993-12-24 10:39:16 +000010511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010513
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010514fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010515done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010516
Michael W. Hudson54241132001-12-07 15:38:26 +000010517
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10519$as_echo_n "checking for major... " >&6; }
10520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010521/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010522
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010523#if defined(MAJOR_IN_MKDEV)
10524#include <sys/mkdev.h>
10525#elif defined(MAJOR_IN_SYSMACROS)
10526#include <sys/sysmacros.h>
10527#else
10528#include <sys/types.h>
10529#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010530
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010531int
10532main ()
10533{
10534
10535 makedev(major(0),minor(0));
10536
10537 ;
10538 return 0;
10539}
10540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010542
10543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10547$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010548
10549else
Skip Montanaro6dead952003-09-25 14:50:04 +000010550
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010553
10554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010557
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010558# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010559# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10561$as_echo_n "checking for getaddrinfo... " >&6; }
10562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010563/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010564
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010565#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010566#include <sys/socket.h>
10567#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010568#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010569
Martin v. Löwis11437992002-04-12 09:54:03 +000010570int
10571main ()
10572{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010573getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 ;
10575 return 0;
10576}
10577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010578if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010579 have_getaddrinfo=yes
10580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010583rm -f core conftest.err conftest.$ac_objext \
10584 conftest$ac_exeext conftest.$ac_ext
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10586$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010587if test $have_getaddrinfo = yes
10588then
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10590$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010591 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010593else
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010595 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010596else
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010599
10600#include <sys/types.h>
10601#include <netdb.h>
10602#include <string.h>
10603#include <sys/socket.h>
10604#include <netinet/in.h>
10605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010606int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010607{
10608 int passive, gaierr, inet4 = 0, inet6 = 0;
10609 struct addrinfo hints, *ai, *aitop;
10610 char straddr[INET6_ADDRSTRLEN], strport[16];
10611
10612 for (passive = 0; passive <= 1; passive++) {
10613 memset(&hints, 0, sizeof(hints));
10614 hints.ai_family = AF_UNSPEC;
10615 hints.ai_flags = passive ? AI_PASSIVE : 0;
10616 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010617 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010618 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10619 (void)gai_strerror(gaierr);
10620 goto bad;
10621 }
10622 for (ai = aitop; ai; ai = ai->ai_next) {
10623 if (ai->ai_addr == NULL ||
10624 ai->ai_addrlen == 0 ||
10625 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10626 straddr, sizeof(straddr), strport, sizeof(strport),
10627 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10628 goto bad;
10629 }
10630 switch (ai->ai_family) {
10631 case AF_INET:
10632 if (strcmp(strport, "54321") != 0) {
10633 goto bad;
10634 }
10635 if (passive) {
10636 if (strcmp(straddr, "0.0.0.0") != 0) {
10637 goto bad;
10638 }
10639 } else {
10640 if (strcmp(straddr, "127.0.0.1") != 0) {
10641 goto bad;
10642 }
10643 }
10644 inet4++;
10645 break;
10646 case AF_INET6:
10647 if (strcmp(strport, "54321") != 0) {
10648 goto bad;
10649 }
10650 if (passive) {
10651 if (strcmp(straddr, "::") != 0) {
10652 goto bad;
10653 }
10654 } else {
10655 if (strcmp(straddr, "::1") != 0) {
10656 goto bad;
10657 }
10658 }
10659 inet6++;
10660 break;
10661 case AF_UNSPEC:
10662 goto bad;
10663 break;
10664 default:
10665 /* another family support? */
10666 break;
10667 }
10668 }
10669 }
10670
10671 if (!(inet4 == 0 || inet4 == 2))
10672 goto bad;
10673 if (!(inet6 == 0 || inet6 == 2))
10674 goto bad;
10675
10676 if (aitop)
10677 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010678 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010679
10680 bad:
10681 if (aitop)
10682 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010683 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010684}
10685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010688 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010689else
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010696fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010697
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10701$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10702
Mark Dickinson2df5d282009-12-31 21:22:50 +000010703if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010704then
10705 if test $ipv6 = yes
10706 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010707 echo 'Fatal: You must get working getaddrinfo() function.'
10708 echo ' or you can specify "--disable-ipv6"'.
10709 exit 1
10710 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010714
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010715fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010716
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010717for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010718do :
10719 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010720if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010723_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010724
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010725fi
10726done
10727
Michael W. Hudson54241132001-12-07 15:38:26 +000010728
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10731$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 +000010732if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010736/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010737#include <sys/types.h>
10738#include <sys/time.h>
10739#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741int
10742main ()
10743{
10744if ((struct tm *) 0)
10745return 0;
10746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010751 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10758$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010759if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762
10763fi
10764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10766$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 +000010767if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010772#include <sys/types.h>
10773#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775int
10776main ()
10777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778struct tm tm;
10779 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 ;
10782 return 0;
10783}
10784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010786 ac_cv_struct_tm=time.h
10787else
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10793$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010794if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010797
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800ac_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 +000010801#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010804if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010805
10806cat >>confdefs.h <<_ACEOF
10807#define HAVE_STRUCT_TM_TM_ZONE 1
10808_ACEOF
10809
10810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010812
Martin v. Löwis11437992002-04-12 09:54:03 +000010813if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010816
10817else
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10819"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010820if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824fi
10825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010827#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828_ACEOF
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10831$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010832if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834else
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010837#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838#if !HAVE_DECL_TZNAME
10839extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
Martin v. Löwis11437992002-04-12 09:54:03 +000010842int
10843main ()
10844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ;
10847 return 0;
10848}
10849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010850if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851 ac_cv_var_tzname=yes
10852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010855rm -f core conftest.err conftest.$ac_objext \
10856 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10859$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010860 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010863
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010864 fi
10865fi
10866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867ac_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 +000010868if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010869
10870cat >>confdefs.h <<_ACEOF
10871#define HAVE_STRUCT_STAT_ST_RDEV 1
10872_ACEOF
10873
10874
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010875fi
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877ac_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 +000010878if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010879
Martin v. Löwis11437992002-04-12 09:54:03 +000010880cat >>confdefs.h <<_ACEOF
10881#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10882_ACEOF
10883
10884
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010885fi
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887ac_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 +000010888if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010889
10890cat >>confdefs.h <<_ACEOF
10891#define HAVE_STRUCT_STAT_ST_FLAGS 1
10892_ACEOF
10893
10894
10895fi
10896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897ac_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 +000010898if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010899
10900cat >>confdefs.h <<_ACEOF
10901#define HAVE_STRUCT_STAT_ST_GEN 1
10902_ACEOF
10903
10904
10905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907ac_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 +000010908if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010909
10910cat >>confdefs.h <<_ACEOF
10911#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10912_ACEOF
10913
10914
10915fi
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917ac_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 +000010918if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010919
Martin v. Löwis11437992002-04-12 09:54:03 +000010920cat >>confdefs.h <<_ACEOF
10921#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10922_ACEOF
10923
10924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010926
10927else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010929 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10931 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010932esac
10933
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010934fi
10935
Michael W. Hudson54241132001-12-07 15:38:26 +000010936
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10939$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010940if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942else
Matthias Kloseb159a552010-04-25 21:00:44 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010946#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010947int
10948main ()
10949{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 ;
10952 return 0;
10953}
10954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010955if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956 ac_cv_header_time_altzone=yes
10957else
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962fi
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10965$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010969
10970fi
10971
Guido van Rossumda88dad1995-01-26 00:46:29 +000010972was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10974$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010976/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010977
10978#include <sys/types.h>
10979#include <sys/select.h>
10980#include <sys/time.h>
10981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982int
10983main ()
10984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985;
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
10992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010995 was_it_defined=yes
10996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11000$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11003$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011004if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011006else
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011009#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011010int
11011main ()
11012{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011013struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ;
11015 return 0;
11016}
11017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011019 ac_cv_struct_addrinfo=yes
11020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024fi
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11027$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011028if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031
11032fi
11033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11035$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011036if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011041
11042# include <sys/types.h>
11043# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011044int
11045main ()
11046{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011047struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011053 ac_cv_struct_sockaddr_storage=yes
11054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11058fi
11059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11061$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011062if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011065
11066fi
11067
Guido van Rossum627b2d71993-12-24 10:39:16 +000011068# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11071$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011072if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011074else
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011078int
11079main ()
11080{
11081static int test_array [1 - 2 * !(((char) -1) < 0)];
11082test_array [0] = 0
11083
11084 ;
11085 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011086}
Martin v. Löwis11437992002-04-12 09:54:03 +000011087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011089 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11096$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011097if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011099
11100fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11103$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011104if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011106else
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109
Martin v. Löwis11437992002-04-12 09:54:03 +000011110int
11111main ()
11112{
11113/* FIXME: Include the comments suggested by Paul. */
11114#ifndef __cplusplus
11115 /* Ultrix mips cc rejects this. */
11116 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011119 char const *const *pcpcc;
11120 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 /* NEC SVR4.0.2 mips cc rejects this. */
11122 struct point {int x, y;};
11123 static struct point const zero = {0,0};
11124 /* AIX XL C 1.02.0.0 rejects this.
11125 It does not let you subtract one const X* pointer from another in
11126 an arm of an if-expression whose if-part is not a constant
11127 expression */
11128 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 ++pcpcc;
11132 ppc = (char**) pcpcc;
11133 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 { /* SCO 3.2v4 cc rejects this. */
11135 char *t;
11136 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 }
11141 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11142 int x[] = {25, 17};
11143 const int *foo = &x[0];
11144 ++foo;
11145 }
11146 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11147 typedef const int *iptr;
11148 iptr p = 0;
11149 ++p;
11150 }
11151 { /* AIX XL C 1.02.0.0 rejects this saying
11152 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11153 struct s { int j; const int *ap[3]; };
11154 struct s *b; b->j = 5;
11155 }
11156 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11157 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011161#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011162
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 ;
11164 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011165}
Martin v. Löwis11437992002-04-12 09:54:03 +000011166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011168 ac_cv_c_const=yes
11169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11175$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011179
11180fi
11181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Guido van Rossumda88dad1995-01-26 00:46:29 +000011183works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11185$as_echo_n "checking for working volatile... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011188
Martin v. Löwis11437992002-04-12 09:54:03 +000011189int
11190main ()
11191{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011192volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011193 ;
11194 return 0;
11195}
11196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011197if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011198 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199else
Skip Montanaro6dead952003-09-25 14:50:04 +000011200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011203
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11207$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011208
Guido van Rossumda88dad1995-01-26 00:46:29 +000011209works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11211$as_echo_n "checking for working signed char... " >&6; }
11212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011214
Martin v. Löwis11437992002-04-12 09:54:03 +000011215int
11216main ()
11217{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011224 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011225else
Skip Montanaro6dead952003-09-25 14:50:04 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011228
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011229
Guido van Rossum7f43da71994-08-01 12:15:30 +000011230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11233$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011234
Guido van Rossumda88dad1995-01-26 00:46:29 +000011235have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11237$as_echo_n "checking for prototypes... " >&6; }
11238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011240int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011241int
11242main ()
11243{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011244return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 ;
11246 return 0;
11247}
11248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Matthias Kloseb159a552010-04-25 21:00:44 +000011253 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11257$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011258
Guido van Rossumda88dad1995-01-26 00:46:29 +000011259works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11261$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011264
11265#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011266int foo(int x, ...) {
11267 va_list va;
11268 va_start(va, x);
11269 va_arg(va, int);
11270 va_arg(va, char *);
11271 va_arg(va, double);
11272 return 0;
11273}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011274
Martin v. Löwis11437992002-04-12 09:54:03 +000011275int
11276main ()
11277{
Guido van Rossum90eea071996-08-30 20:58:57 +000011278return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011284
11285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011288 works=yes
11289
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11293$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294
Martin v. Löwisd6320502004-08-12 13:45:08 +000011295# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11297$as_echo_n "checking for socketpair... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011299/* end confdefs.h. */
11300
11301#include <sys/types.h>
11302#include <sys/socket.h>
11303
11304int
11305main ()
11306{
11307void *x=socketpair
11308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011318else
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011321
11322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011324
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011325# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11327$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011330#include <sys/types.h>
11331#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011335struct sockaddr x;
11336x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ;
11338 return 0;
11339}
11340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011341if ac_fn_c_try_compile "$LINENO"; then :
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11343$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011346
11347else
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011353
Guido van Rossumda88dad1995-01-26 00:46:29 +000011354va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11356$as_echo_n "checking whether va_list is an array... " >&6; }
11357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011359
11360#ifdef HAVE_STDARG_PROTOTYPES
11361#include <stdarg.h>
11362#else
11363#include <varargs.h>
11364#endif
11365
Martin v. Löwis11437992002-04-12 09:54:03 +000011366int
11367main ()
11368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011369va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
11375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376else
Skip Montanaro6dead952003-09-25 14:50:04 +000011377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Guido van Rossumda88dad1995-01-26 00:46:29 +000011381 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11386$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011387
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011388# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011389
11390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011392if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11397$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398 OLD_CFLAGS=$CFLAGS
11399 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011401/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011402
11403# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405int
11406main ()
11407{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011408
11409 char *name;
11410 struct hostent *he, *res;
11411 char buffer[2048];
11412 int buflen = 2048;
11413 int h_errnop;
11414
11415 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
11417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011424
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431else
Skip Montanaro6dead952003-09-25 14:50:04 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11436$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011438/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Martin v. Löwis11437992002-04-12 09:54:03 +000011442int
11443main ()
11444{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445
11446 char *name;
11447 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011448 char buffer[2048];
11449 int buflen = 2048;
11450 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451
Matthias Kloseb159a552010-04-25 21:00:44 +000011452 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
11454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011461
Martin v. Löwis11437992002-04-12 09:54:03 +000011462
Matthias Kloseb159a552010-04-25 21:00:44 +000011463$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11466$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011468else
Skip Montanaro6dead952003-09-25 14:50:04 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11473$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475/* end confdefs.h. */
11476
11477# include <netdb.h>
11478
11479int
11480main ()
11481{
11482
11483 char *name;
11484 struct hostent *he;
11485 struct hostent_data data;
11486
11487 (void) gethostbyname_r(name, he, &data);
11488
11489 ;
11490 return 0;
11491}
11492_ACEOF
11493if ac_fn_c_try_compile "$LINENO"; then :
11494
11495 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11496
11497
11498$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11499
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11501$as_echo "yes" >&6; }
11502
11503else
11504
11505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11506$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011516 CFLAGS=$OLD_CFLAGS
11517
11518else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 for ac_func in gethostbyname
11521do :
11522 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011523if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011525#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011526_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011529done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011530
Michael W. Hudson54241132001-12-07 15:38:26 +000011531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011532fi
11533
Michael W. Hudson54241132001-12-07 15:38:26 +000011534
11535
11536
11537
11538
11539
Guido van Rossum627b2d71993-12-24 10:39:16 +000011540# checks for system services
11541# (none yet)
11542
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011543# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011544ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011545if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011546
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011547else
Matthias Kloseb9621712010-04-24 17:59:49 +000011548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11549$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011550if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011552else
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011554LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558/* Override any GCC internal prototype to avoid an error.
11559 Use char because int might match the return type of a GCC
11560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011561#ifdef __cplusplus
11562extern "C"
11563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011564char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011565int
11566main ()
11567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 ;
11570 return 0;
11571}
11572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011578rm -f core conftest.err conftest.$ac_objext \
11579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011580LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11583$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011584if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 cat >>confdefs.h <<_ACEOF
11586#define HAVE_LIBIEEE 1
11587_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011589 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011590
Guido van Rossum627b2d71993-12-24 10:39:16 +000011591fi
11592
Michael W. Hudson54241132001-12-07 15:38:26 +000011593
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011594fi
11595
Michael W. Hudson54241132001-12-07 15:38:26 +000011596
Guido van Rossum7f253911997-05-09 02:42:48 +000011597# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11599$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011602if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011604if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011605then
11606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11610$as_echo "yes" >&6; }
11611else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011613fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011614else
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11616$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617fi
11618
Guido van Rossum7f253911997-05-09 02:42:48 +000011619
Guido van Rossum7f43da71994-08-01 12:15:30 +000011620# check for --with-libm=...
11621
Guido van Rossum563e7081996-09-10 18:20:48 +000011622case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011623Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011624*) LIBM=-lm
11625esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11627$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011630if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011632if test "$withval" = no
11633then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11635$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011636elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011637then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11639$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011640else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011641fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011642else
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11644$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645fi
11646
Guido van Rossum7f43da71994-08-01 12:15:30 +000011647
11648# check for --with-libc=...
11649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11651$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011656if test "$withval" = no
11657then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11659$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011660elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011661then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11663$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011664else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011665fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11668$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669fi
11670
Guido van Rossum7f43da71994-08-01 12:15:30 +000011671
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672# **************************************************
11673# * Check for various properties of floating point *
11674# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11677$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011678if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680else
11681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683 ac_cv_little_endian_double=no
11684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686/* end confdefs.h. */
11687
11688#include <string.h>
11689int main() {
11690 double x = 9006104071832581.0;
11691 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11692 return 0;
11693 else
11694 return 1;
11695}
11696
11697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699 ac_cv_little_endian_double=yes
11700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011705fi
11706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707fi
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11710$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711if test "$ac_cv_little_endian_double" = yes
11712then
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715
11716fi
11717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11719$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011720if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722else
11723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725 ac_cv_big_endian_double=no
11726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728/* end confdefs.h. */
11729
11730#include <string.h>
11731int main() {
11732 double x = 9006104071832581.0;
11733 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11734 return 0;
11735 else
11736 return 1;
11737}
11738
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741 ac_cv_big_endian_double=yes
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747fi
11748
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749fi
11750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11752$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753if test "$ac_cv_big_endian_double" = yes
11754then
11755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757
11758fi
11759
11760# Some ARM platforms use a mixed-endian representation for doubles.
11761# While Python doesn't currently have full support for these platforms
11762# (see e.g., issue 1762561), we can at least make sure that float <-> string
11763# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11765$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011766if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768else
11769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771 ac_cv_mixed_endian_double=no
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774/* end confdefs.h. */
11775
11776#include <string.h>
11777int main() {
11778 double x = 9006104071832581.0;
11779 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11780 return 0;
11781 else
11782 return 1;
11783}
11784
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787 ac_cv_mixed_endian_double=yes
11788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011793fi
11794
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011795fi
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11798$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799if test "$ac_cv_mixed_endian_double" = yes
11800then
11801
Matthias Kloseb9621712010-04-24 17:59:49 +000011802$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803
11804fi
11805
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011806# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011807# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011808# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011809# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011810# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011811# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011812
11813# This inline assembler syntax may also work for suncc and icc,
11814# so we try it on all platforms.
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11817$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011819/* end confdefs.h. */
11820
11821int
11822main ()
11823{
11824
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011825 unsigned short cw;
11826 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11827 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828
11829 ;
11830 return 0;
11831}
11832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834 have_gcc_asm_for_x87=yes
11835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011837fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11840$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011841if test "$have_gcc_asm_for_x87" = yes
11842then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011845
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011847
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011848# Detect whether system arithmetic is subject to x87-style double
11849# rounding issues. The result of this test has little meaning on non
11850# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11851# mode is round-to-nearest and double rounding issues are present, and
11852# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11854$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855# $BASECFLAGS may affect the result
11856ac_save_cc="$CC"
11857CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011859 ac_cv_x87_double_rounding=no
11860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011862/* end confdefs.h. */
11863
11864#include <stdlib.h>
11865#include <math.h>
11866int main() {
11867 volatile double x, y, z;
11868 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11869 x = 0.99999999999999989; /* 1-2**-53 */
11870 y = 1./x;
11871 if (y != 1.)
11872 exit(0);
11873 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11874 x = 1e16;
11875 y = 2.99999;
11876 z = x + y;
11877 if (z != 1e16+4.)
11878 exit(0);
11879 /* both tests show evidence of double rounding */
11880 exit(1);
11881}
11882
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011885 ac_cv_x87_double_rounding=no
11886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011891fi
11892
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011893CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11895$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011896if test "$ac_cv_x87_double_rounding" = yes
11897then
11898
Matthias Kloseb9621712010-04-24 17:59:49 +000011899$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011900
11901fi
11902
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011903# ************************************
11904# * Check for mathematical functions *
11905# ************************************
11906
11907LIBS_SAVE=$LIBS
11908LIBS="$LIBS $LIBM"
11909
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011910for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11911do :
11912 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11913ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011914if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915 cat >>confdefs.h <<_ACEOF
11916#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11917_ACEOF
11918
11919fi
11920done
11921
11922for ac_func in hypot lgamma log1p round tgamma
11923do :
11924 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11925ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011926if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927 cat >>confdefs.h <<_ACEOF
11928#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11929_ACEOF
11930
11931fi
11932done
11933
11934ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11935"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011936if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011937 ac_have_decl=1
11938else
11939 ac_have_decl=0
11940fi
11941
11942cat >>confdefs.h <<_ACEOF
11943#define HAVE_DECL_ISINF $ac_have_decl
11944_ACEOF
11945ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11946"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011947if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011948 ac_have_decl=1
11949else
11950 ac_have_decl=0
11951fi
11952
11953cat >>confdefs.h <<_ACEOF
11954#define HAVE_DECL_ISNAN $ac_have_decl
11955_ACEOF
11956ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11957"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011958if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011959 ac_have_decl=1
11960else
11961 ac_have_decl=0
11962fi
11963
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_DECL_ISFINITE $ac_have_decl
11966_ACEOF
11967
11968
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011969# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11970# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11972$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011973if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011975else
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011978 ac_cv_tanh_preserves_zero_sign=no
11979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011981/* end confdefs.h. */
11982
11983#include <math.h>
11984#include <stdlib.h>
11985int main() {
11986 /* return 0 if either negative zeros don't exist
11987 on this platform or if negative zeros exist
11988 and tanh(-0.) == -0. */
11989 if (atan2(0., -1.) == atan2(-0., -1.) ||
11990 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11991 else exit(1);
11992}
11993
11994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011996 ac_cv_tanh_preserves_zero_sign=yes
11997else
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12001 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012002fi
12003
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012004fi
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12007$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012008if test "$ac_cv_tanh_preserves_zero_sign" = yes
12009then
12010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012012
12013fi
12014
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012015if test "$ac_cv_func_log1p" = yes
12016then
12017 # On some versions of AIX, log1p(-0.) returns 0. instead of
12018 # -0. See issue #9920.
12019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12020$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012021 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012022 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012023else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012024
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012025 if test "$cross_compiling" = yes; then :
12026 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012027else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12029/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012030
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012031 #include <math.h>
12032 #include <stdlib.h>
12033 int main() {
12034 /* Fail if the signs of log1p(-0.) and -0. can be
12035 distinguished. */
12036 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12037 return 0;
12038 else
12039 return 1;
12040 }
12041
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012042_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012043if ac_fn_c_try_run "$LINENO"; then :
12044 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012045else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012046 ac_cv_log1p_drops_zero_sign=yes
12047fi
12048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012050fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012051
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012052fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012053
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12055$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12056fi
12057if test "$ac_cv_log1p_drops_zero_sign" = yes
12058then
12059
12060$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12061
12062fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012063
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012064LIBS=$LIBS_SAVE
12065
Mark Dickinsona614f042009-11-28 12:48:43 +000012066# For multiprocessing module, check that sem_open
12067# actually works. For FreeBSD versions <= 7.2,
12068# the kernel module that provides POSIX semaphores
12069# isn't loaded by default, so an attempt to call
12070# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12072$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012073if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012077 ac_cv_posix_semaphores_enabled=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012080/* end confdefs.h. */
12081
12082#include <unistd.h>
12083#include <fcntl.h>
12084#include <stdio.h>
12085#include <semaphore.h>
12086#include <sys/stat.h>
12087
12088int main(void) {
12089 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12090 if (a == SEM_FAILED) {
12091 perror("sem_open");
12092 return 1;
12093 }
12094 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012095 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012096 return 0;
12097}
12098
12099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012101 ac_cv_posix_semaphores_enabled=yes
12102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012107fi
12108
12109
Mark Dickinsona614f042009-11-28 12:48:43 +000012110fi
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12113$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012114if test $ac_cv_posix_semaphores_enabled = no
12115then
12116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012118
12119fi
12120
Mark Dickinson10683072009-04-18 21:18:19 +000012121# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12123$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012124if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012128 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012131/* end confdefs.h. */
12132
12133#include <unistd.h>
12134#include <fcntl.h>
12135#include <stdio.h>
12136#include <semaphore.h>
12137#include <sys/stat.h>
12138
12139int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012140 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012141 int count;
12142 int res;
12143 if(a==SEM_FAILED){
12144 perror("sem_open");
12145 return 1;
12146
12147 }
12148 res = sem_getvalue(a, &count);
12149 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012150 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012151 return res==-1 ? 1 : 0;
12152}
12153
Mark Dickinson10683072009-04-18 21:18:19 +000012154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012156 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012162fi
12163
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165fi
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12168$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169if test $ac_cv_broken_sem_getvalue = yes
12170then
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012173
12174fi
12175
Mark Dickinsonbd792642009-03-18 20:06:12 +000012176# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12178$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012179# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012181 enableval=$enable_big_digits; case $enable_big_digits in
12182yes)
12183 enable_big_digits=30 ;;
12184no)
12185 enable_big_digits=15 ;;
1218615|30)
12187 ;;
12188*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012189 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 +000012190esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12192$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012193
12194cat >>confdefs.h <<_ACEOF
12195#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12196_ACEOF
12197
12198
12199else
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12201$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012202fi
12203
12204
Guido van Rossumef2255b2000-03-10 22:30:29 +000012205# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012206ac_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 +000012207if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012212 wchar_h="yes"
12213
Guido van Rossumef2255b2000-03-10 22:30:29 +000012214else
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012216
12217fi
12218
Michael W. Hudson54241132001-12-07 15:38:26 +000012219
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012221# determine wchar_t size
12222if test "$wchar_h" = yes
12223then
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12227# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12229$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012230if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12234"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236else
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 if test "$ac_cv_type_wchar_t" = yes; then
12238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012240as_fn_error 77 "cannot compute sizeof (wchar_t)
12241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242 else
12243 ac_cv_sizeof_wchar_t=0
12244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12249$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250
12251
12252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012254#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012255_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256
Michael W. Hudson54241132001-12-07 15:38:26 +000012257
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012258fi
12259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12261$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012262have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012264/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012265
12266#include <tcl.h>
12267#if TCL_UTF_MAX != 6
12268# error "NOT UCS4_TCL"
12269#endif
12270int
12271main ()
12272{
12273
12274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012279
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012282
12283 have_ucs4_tcl=yes
12284
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12288$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012289
Skip Montanaro6dead952003-09-25 14:50:04 +000012290# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012291if test "$wchar_h" = yes
12292then
12293 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12295$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012296 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012298else
12299
Matthias Kloseb9621712010-04-24 17:59:49 +000012300 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012301 ac_cv_wchar_t_signed=yes
12302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012305
12306 #include <wchar.h>
12307 int main()
12308 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012309 /* Success: exit code 0 */
12310 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012311 }
12312
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012315 ac_cv_wchar_t_signed=yes
12316else
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12320 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012321fi
12322
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012323fi
12324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12326$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327fi
12328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12330$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012331
12332# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012333if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012334 withval=$with_wide_unicode;
12335if test "$withval" != no
12336then unicode_size="4"
12337else unicode_size="2"
12338fi
12339
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012340else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
Georg Brandl52d168a2008-01-07 18:10:24 +000012342case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012343 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012344 *) unicode_size="2" ;;
12345esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012346
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012347fi
12348
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012349
12350
Georg Brandl52d168a2008-01-07 18:10:24 +000012351case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012352 4)
12353 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12354
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012355 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012356 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012358 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012359esac
12360
Michael W. Hudson54241132001-12-07 15:38:26 +000012361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362
Georg Brandl52d168a2008-01-07 18:10:24 +000012363# wchar_t is only usable if it maps to an unsigned type
12364if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012365 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012366then
12367 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012372
Georg Brandl52d168a2008-01-07 18:10:24 +000012373elif test "$ac_cv_sizeof_short" = "$unicode_size"
12374then
12375 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378elif test "$ac_cv_sizeof_long" = "$unicode_size"
12379then
12380 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382
Georg Brandl52d168a2008-01-07 18:10:24 +000012383else
12384 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12387$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012388
12389# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12391$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012392if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 ac_cv_c_bigendian=unknown
12396 # See if we're dealing with a universal compiler.
12397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12398/* end confdefs.h. */
12399#ifndef __APPLE_CC__
12400 not a universal capable compiler
12401 #endif
12402 typedef int dummy;
12403
Skip Montanaro6dead952003-09-25 14:50:04 +000012404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_compile "$LINENO"; then :
12406
12407 # Check for potential -arch flags. It is not universal unless
12408 # there are at least two -arch flags with different values.
12409 ac_arch=
12410 ac_prev=
12411 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12412 if test -n "$ac_prev"; then
12413 case $ac_word in
12414 i?86 | x86_64 | ppc | ppc64)
12415 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12416 ac_arch=$ac_word
12417 else
12418 ac_cv_c_bigendian=universal
12419 break
12420 fi
12421 ;;
12422 esac
12423 ac_prev=
12424 elif test "x$ac_word" = "x-arch"; then
12425 ac_prev=arch
12426 fi
12427 done
12428fi
12429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12430 if test $ac_cv_c_bigendian = unknown; then
12431 # See if sys/param.h defines the BYTE_ORDER macro.
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012434#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012436
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
Matthias Kloseb9621712010-04-24 17:59:49 +000012440#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12441 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12442 && LITTLE_ENDIAN)
12443 bogus endian macros
12444 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
12446 ;
12447 return 0;
12448}
12449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012454#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456
Martin v. Löwis11437992002-04-12 09:54:03 +000012457int
12458main ()
12459{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012460#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 not big endian
12462 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012463
12464 ;
12465 return 0;
12466}
12467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012468if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469 ac_cv_c_bigendian=yes
12470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012474fi
12475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12476 fi
12477 if test $ac_cv_c_bigendian = unknown; then
12478 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012481#include <limits.h>
12482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483int
12484main ()
12485{
Matthias Kloseb9621712010-04-24 17:59:49 +000012486#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12487 bogus endian macros
12488 #endif
12489
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 ;
12491 return 0;
12492}
12493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012494if ac_fn_c_try_compile "$LINENO"; then :
12495 # It does; now see whether it defined to _BIG_ENDIAN or not.
12496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497/* end confdefs.h. */
12498#include <limits.h>
12499
12500int
12501main ()
12502{
12503#ifndef _BIG_ENDIAN
12504 not big endian
12505 #endif
12506
12507 ;
12508 return 0;
12509}
12510_ACEOF
12511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012513else
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12517fi
12518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12519 fi
12520 if test $ac_cv_c_bigendian = unknown; then
12521 # Compile a test program.
12522 if test "$cross_compiling" = yes; then :
12523 # Try to guess by grepping values from an object file.
12524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12525/* end confdefs.h. */
12526short int ascii_mm[] =
12527 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12528 short int ascii_ii[] =
12529 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12530 int use_ascii (int i) {
12531 return ascii_mm[i] + ascii_ii[i];
12532 }
12533 short int ebcdic_ii[] =
12534 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12535 short int ebcdic_mm[] =
12536 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12537 int use_ebcdic (int i) {
12538 return ebcdic_mm[i] + ebcdic_ii[i];
12539 }
12540 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542int
12543main ()
12544{
12545return use_ascii (foo) == use_ebcdic (foo);
12546 ;
12547 return 0;
12548}
12549_ACEOF
12550if ac_fn_c_try_compile "$LINENO"; then :
12551 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12552 ac_cv_c_bigendian=yes
12553 fi
12554 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12555 if test "$ac_cv_c_bigendian" = unknown; then
12556 ac_cv_c_bigendian=no
12557 else
12558 # finding both strings is unlikely to happen, but who knows?
12559 ac_cv_c_bigendian=unknown
12560 fi
12561 fi
12562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012564else
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012568int
12569main ()
12570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 /* Are we little or big endian? From Harbison&Steele. */
12573 union
12574 {
12575 long int l;
12576 char c[sizeof (long int)];
12577 } u;
12578 u.l = 1;
12579 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580
12581 ;
12582 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012583}
Martin v. Löwis11437992002-04-12 09:54:03 +000012584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012586 ac_cv_c_bigendian=no
12587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12597$as_echo "$ac_cv_c_bigendian" >&6; }
12598 case $ac_cv_c_bigendian in #(
12599 yes)
12600 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12601;; #(
12602 no)
12603 ;; #(
12604 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 ;; #(
12609 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012610 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012611 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012615# ABI version string for Python extension modules. This appears between the
12616# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12617# from the following attributes which affect the ABI of this Python build (in
12618# this order):
12619#
12620# * The Python implementation (always 'cpython-' for us)
12621# * The major and minor version numbers
12622# * --with-pydebug (adds a 'd')
12623# * --with-pymalloc (adds a 'm')
12624# * --with-wide-unicode (adds a 'u')
12625#
12626# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012627# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12628# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012629
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12631$as_echo_n "checking ABIFLAGS... " >&6; }
12632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12633$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12635$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012636SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12638$as_echo "$SOABI" >&6; }
12639
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12641$as_echo_n "checking LDVERSION... " >&6; }
12642LDVERSION='$(VERSION)$(ABIFLAGS)'
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12644$as_echo "$LDVERSION" >&6; }
12645
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012646# SO is the extension of shared libraries `(including the dot!)
12647# -- usually .so, .sl on HP-UX, .dll on Cygwin
12648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12649$as_echo_n "checking SO... " >&6; }
12650if test -z "$SO"
12651then
12652 case $ac_sys_system in
12653 hp*|HP*)
12654 case `uname -m` in
12655 ia64) SO=.so;;
12656 *) SO=.sl;;
12657 esac
12658 ;;
12659 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012660 Linux*|GNU*)
12661 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012662 *) SO=.so;;
12663 esac
12664else
12665 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012666 echo
12667 echo '====================================================================='
12668 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012669 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012670 echo '+ Do you really mean to change the extension for shared libraries? +'
12671 echo '+ Continuing in 10 seconds to let you to ponder. +'
12672 echo '+ +'
12673 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012674 sleep 10
12675fi
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12677$as_echo "$SO" >&6; }
12678
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012679# Check whether right shifting a negative integer extends the sign bit
12680# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12682$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012683if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012685else
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012688 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012691/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012692
12693int main()
12694{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012695 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012696}
12697
Martin v. Löwis11437992002-04-12 09:54:03 +000012698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012699if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700 ac_cv_rshift_extends_sign=yes
12701else
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012706fi
12707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708fi
12709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12711$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012712if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012713then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012716
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012717fi
12718
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012719# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12721$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012722if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012724else
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012728#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012732
12733 FILE *f = fopen("/dev/null", "r");
12734 flockfile(f);
12735 getc_unlocked(f);
12736 funlockfile(f);
12737
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ;
12739 return 0;
12740}
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012743 ac_cv_have_getc_unlocked=yes
12744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 ac_cv_have_getc_unlocked=no
12746fi
12747rm -f core conftest.err conftest.$ac_objext \
12748 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12752$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012753if test "$ac_cv_have_getc_unlocked" = yes
12754then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012757
12758fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012759
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012760# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012761# save the value of LIBS so we don't actually link Python with readline
12762LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012763
Gregory P. Smith18820942008-09-07 06:24:49 +000012764# On some systems we need to link readline to a termcap compatible
12765# library. NOTE: Keep the precedence of listed libraries synchronised
12766# with setup.py.
12767py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12769$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012770for py_libtermcap in "" ncursesw ncurses curses termcap; do
12771 if test -z "$py_libtermcap"; then
12772 READLINE_LIBS="-lreadline"
12773 else
12774 READLINE_LIBS="-lreadline -l$py_libtermcap"
12775 fi
12776 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778/* end confdefs.h. */
12779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780/* Override any GCC internal prototype to avoid an error.
12781 Use char because int might match the return type of a GCC
12782 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012783#ifdef __cplusplus
12784extern "C"
12785#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012786char readline ();
12787int
12788main ()
12789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012791 ;
12792 return 0;
12793}
12794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012796 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012798rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012800 if test $py_cv_lib_readline = yes; then
12801 break
12802 fi
12803done
12804# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12805#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012806if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12808$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12811$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012814
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012815fi
12816
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012817# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12819$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012820if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012822else
12823 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012824LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012826/* end confdefs.h. */
12827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828/* Override any GCC internal prototype to avoid an error.
12829 Use char because int might match the return type of a GCC
12830 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012831#ifdef __cplusplus
12832extern "C"
12833#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834char rl_callback_handler_install ();
12835int
12836main ()
12837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012844 ac_cv_lib_readline_rl_callback_handler_install=yes
12845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848rm -f core conftest.err conftest.$ac_objext \
12849 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850LIBS=$ac_check_lib_save_LIBS
12851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12853$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012854if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012857
12858fi
12859
12860
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012861# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012864#include <readline/readline.h>
12865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012867 have_readline=yes
12868else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012869 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012870
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012871fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012872rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012873if test $have_readline = yes
12874then
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012877#include <readline/readline.h>
12878
12879_ACEOF
12880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884
12885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012886rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012889/* end confdefs.h. */
12890#include <readline/readline.h>
12891
12892_ACEOF
12893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012897
12898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012899rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012900
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012901fi
12902
Martin v. Löwis0daad592001-09-30 21:09:59 +000012903# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12905$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012906if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012910LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914/* Override any GCC internal prototype to avoid an error.
12915 Use char because int might match the return type of a GCC
12916 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012917#ifdef __cplusplus
12918extern "C"
12919#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012920char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012921int
12922main ()
12923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 ;
12926 return 0;
12927}
12928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012934rm -f core conftest.err conftest.$ac_objext \
12935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012936LIBS=$ac_check_lib_save_LIBS
12937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12939$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012940if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012943
Martin v. Löwis0daad592001-09-30 21:09:59 +000012944fi
12945
Michael W. Hudson54241132001-12-07 15:38:26 +000012946
Thomas Wouters89d996e2007-09-08 17:39:28 +000012947# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12949$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012950if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012952else
12953 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012954LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012956/* end confdefs.h. */
12957
12958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
12961#ifdef __cplusplus
12962extern "C"
12963#endif
12964char rl_completion_display_matches_hook ();
12965int
12966main ()
12967{
12968return rl_completion_display_matches_hook ();
12969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012974 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012978rm -f core conftest.err conftest.$ac_objext \
12979 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012980LIBS=$ac_check_lib_save_LIBS
12981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12983$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012984if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012987
12988fi
12989
12990
Martin v. Löwis0daad592001-09-30 21:09:59 +000012991# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12993$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012994if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012998LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013005#ifdef __cplusplus
13006extern "C"
13007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013008char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013009int
13010main ()
13011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 ;
13014 return 0;
13015}
13016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013019else
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013022rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013024LIBS=$ac_check_lib_save_LIBS
13025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13027$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013028if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013031
Guido van Rossum353ae582001-07-10 16:45:32 +000013032fi
13033
Jack Jansendd19cf82001-12-06 22:36:17 +000013034
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013037/* end confdefs.h. */
13038#include <readline/readline.h>
13039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013041 have_readline=yes
13042else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013044
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013045fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013046rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047if test $have_readline = yes
13048then
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050/* end confdefs.h. */
13051#include <readline/readline.h>
13052
13053_ACEOF
13054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058
13059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013060rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013061
13062fi
13063
Martin v. Löwis82bca632006-02-10 20:49:30 +000013064# End of readline checks: restore LIBS
13065LIBS=$LIBS_no_readline
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13068$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013069if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013071else
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013074 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013077/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013078
13079int main()
13080{
13081 int val1 = nice(1);
13082 if (val1 != -1 && val1 == nice(2))
13083 exit(0);
13084 exit(1);
13085}
13086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013089 ac_cv_broken_nice=yes
13090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13094 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013095fi
13096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097fi
13098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13100$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013101if test "$ac_cv_broken_nice" = yes
13102then
Martin v. Löwis11437992002-04-12 09:54:03 +000013103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013105
13106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13109$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013110if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013114 ac_cv_broken_poll=no
13115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117/* end confdefs.h. */
13118
13119#include <poll.h>
13120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121int main()
13122{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013123 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013125
13126 close (42);
13127
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013131 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013132 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013133 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134 return 1;
13135}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013136
13137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013138if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013139 ac_cv_broken_poll=yes
13140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147fi
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13150$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151if test "$ac_cv_broken_poll" = yes
13152then
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013155
13156fi
13157
Brett Cannon43802422005-02-10 20:48:03 +000013158# 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 +000013159# (which is not required by ISO C or UNIX spec) and/or if we support
13160# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013161ac_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 +000013162#include <$ac_cv_struct_tm>
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013165if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013166
13167cat >>confdefs.h <<_ACEOF
13168#define HAVE_STRUCT_TM_TM_ZONE 1
13169_ACEOF
13170
13171
13172fi
13173
13174if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013177
13178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13180"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013181if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185fi
13186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013188#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189_ACEOF
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13192$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013193if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195else
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013197/* end confdefs.h. */
13198#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199#if !HAVE_DECL_TZNAME
13200extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013201#endif
13202
13203int
13204main ()
13205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013207 ;
13208 return 0;
13209}
13210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013211if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013212 ac_cv_var_tzname=yes
13213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013216rm -f core conftest.err conftest.$ac_objext \
13217 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13220$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013221 if test $ac_cv_var_tzname = yes; then
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013224
13225 fi
13226fi
13227
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013228
Martin v. Löwis1d459062005-03-14 21:23:33 +000013229# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13231$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013232if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013234else
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013237 ac_cv_working_tzset=no
13238else
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013240/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013241
13242#include <stdlib.h>
13243#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013244#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013245
13246#if HAVE_TZNAME
13247extern char *tzname[];
13248#endif
13249
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013250int main()
13251{
Brett Cannon18367812003-09-19 00:59:16 +000013252 /* Note that we need to ensure that not only does tzset(3)
13253 do 'something' with localtime, but it works as documented
13254 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013255 This includes making sure that tzname is set properly if
13256 tm->tm_zone does not exist since it is the alternative way
13257 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013258
13259 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013260 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013261 */
13262
Martin v. Löwis1d459062005-03-14 21:23:33 +000013263 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013264 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13265
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013266 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013267 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013268 if (localtime(&groundhogday)->tm_hour != 0)
13269 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013270#if HAVE_TZNAME
13271 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13272 if (strcmp(tzname[0], "UTC") ||
13273 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13274 exit(1);
13275#endif
Brett Cannon18367812003-09-19 00:59:16 +000013276
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013277 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013278 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013279 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013280 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013281#if HAVE_TZNAME
13282 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13283 exit(1);
13284#endif
Brett Cannon18367812003-09-19 00:59:16 +000013285
13286 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13287 tzset();
13288 if (localtime(&groundhogday)->tm_hour != 11)
13289 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013290#if HAVE_TZNAME
13291 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13292 exit(1);
13293#endif
13294
13295#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013296 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13297 exit(1);
13298 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13299 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013300#endif
Brett Cannon18367812003-09-19 00:59:16 +000013301
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013302 exit(0);
13303}
13304
13305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013307 ac_cv_working_tzset=yes
13308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313fi
13314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315fi
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13318$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013319if test "$ac_cv_working_tzset" = yes
13320then
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013323
13324fi
13325
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013326# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13328$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013329if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013334#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013335int
13336main ()
13337{
13338
13339struct stat st;
13340st.st_mtim.tv_nsec = 1;
13341
13342 ;
13343 return 0;
13344}
13345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013347 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352fi
13353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13355$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013356if test "$ac_cv_stat_tv_nsec" = yes
13357then
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013360
13361fi
13362
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013363# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13365$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013366if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013370/* end confdefs.h. */
13371#include <sys/stat.h>
13372int
13373main ()
13374{
13375
13376struct stat st;
13377st.st_mtimespec.tv_nsec = 1;
13378
13379 ;
13380 return 0;
13381}
13382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013384 ac_cv_stat_tv_nsec2=yes
13385else
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13389fi
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13392$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013393if test "$ac_cv_stat_tv_nsec2" = yes
13394then
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013397
13398fi
13399
Jack Jansen666b1e72001-10-31 12:11:48 +000013400# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13402$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013403if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013407/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013408#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013409int
13410main ()
13411{
Jack Jansen666b1e72001-10-31 12:11:48 +000013412
13413 int rtn;
13414 rtn = mvwdelch(0,0,0);
13415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 ;
13417 return 0;
13418}
13419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013421 ac_cv_mvwdelch_is_expression=yes
13422else
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13426fi
13427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13429$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013430
13431if test "$ac_cv_mvwdelch_is_expression" = yes
13432then
Martin v. Löwis11437992002-04-12 09:54:03 +000013433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013435
13436fi
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13439$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013440if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013445#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013446int
13447main ()
13448{
Jack Jansen666b1e72001-10-31 12:11:48 +000013449
13450 WINDOW *w;
13451 w->_flags = 0;
13452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453 ;
13454 return 0;
13455}
13456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013458 ac_cv_window_has_flags=yes
13459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13463fi
13464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13466$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013467
Jack Jansen666b1e72001-10-31 12:11:48 +000013468
13469if test "$ac_cv_window_has_flags" = yes
13470then
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013473
13474fi
13475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13477$as_echo_n "checking for is_term_resized... " >&6; }
13478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013479/* end confdefs.h. */
13480#include <curses.h>
13481int
13482main ()
13483{
13484void *x=is_term_resized
13485 ;
13486 return 0;
13487}
13488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013492
Matthias Kloseb159a552010-04-25 21:00:44 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013494$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13497$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013498
13499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13503$as_echo_n "checking for resize_term... " >&6; }
13504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013505/* end confdefs.h. */
13506#include <curses.h>
13507int
13508main ()
13509{
13510void *x=resize_term
13511 ;
13512 return 0;
13513}
13514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013515if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013518
Matthias Kloseb159a552010-04-25 21:00:44 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13523$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013524
13525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13529$as_echo_n "checking for resizeterm... " >&6; }
13530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531/* end confdefs.h. */
13532#include <curses.h>
13533int
13534main ()
13535{
13536void *x=resizeterm
13537 ;
13538 return 0;
13539}
13540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013544
Matthias Kloseb159a552010-04-25 21:00:44 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13549$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013550
13551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13553
Matthias Kloseb9621712010-04-24 17:59:49 +000013554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13555$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013556
13557if test -r /dev/ptmx
13558then
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13560$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013563
Thomas Wouters89f507f2006-12-13 04:49:30 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13566$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13570$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013571
13572if test -r /dev/ptc
13573then
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13575$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013578
Thomas Wouters89f507f2006-12-13 04:49:30 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013582fi
13583
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013584if test "$have_long_long" = yes
13585then
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13587$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013588 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013592 ac_cv_have_long_long_format=no
13593else
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013595/* end confdefs.h. */
13596
13597 #include <stdio.h>
13598 #include <stddef.h>
13599 #include <string.h>
13600
13601 #ifdef HAVE_SYS_TYPES_H
13602 #include <sys/types.h>
13603 #endif
13604
13605 int main()
13606 {
13607 char buffer[256];
13608
13609 if (sprintf(buffer, "%lld", (long long)123) < 0)
13610 return 1;
13611 if (strcmp(buffer, "123"))
13612 return 1;
13613
13614 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13615 return 1;
13616 if (strcmp(buffer, "-123"))
13617 return 1;
13618
13619 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13620 return 1;
13621 if (strcmp(buffer, "123"))
13622 return 1;
13623
13624 return 0;
13625 }
13626
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629 ac_cv_have_long_long_format=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013635fi
13636
13637
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013638fi
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13641$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013642fi
13643
Mark Dickinson89d7d412009-12-31 20:50:59 +000013644if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013645then
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013648
13649fi
13650
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013651if test $ac_sys_system = Darwin
13652then
13653 LIBS="$LIBS -framework CoreFoundation"
13654fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13657$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013658if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013662 ac_cv_have_size_t_format="cross -- assuming yes"
13663
Thomas Wouters477c8d52006-05-27 19:21:47 +000013664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013666/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013667
Thomas Wouters477c8d52006-05-27 19:21:47 +000013668#include <stdio.h>
13669#include <stddef.h>
13670#include <string.h>
13671
Christian Heimes2c181612007-12-17 20:04:13 +000013672#ifdef HAVE_SYS_TYPES_H
13673#include <sys/types.h>
13674#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013675
13676#ifdef HAVE_SSIZE_T
13677typedef ssize_t Py_ssize_t;
13678#elif SIZEOF_VOID_P == SIZEOF_LONG
13679typedef long Py_ssize_t;
13680#else
13681typedef int Py_ssize_t;
13682#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683
Christian Heimes2c181612007-12-17 20:04:13 +000013684int main()
13685{
13686 char buffer[256];
13687
Thomas Wouters477c8d52006-05-27 19:21:47 +000013688 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13689 return 1;
13690
Thomas Wouters89f507f2006-12-13 04:49:30 +000013691 if (strcmp(buffer, "123"))
13692 return 1;
13693
13694 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13695 return 1;
13696
13697 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013698 return 1;
13699
13700 return 0;
13701}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013705 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013711fi
13712
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13715$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013716if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013719
13720fi
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013723#ifdef HAVE_SYS_TYPES_H
13724#include <sys/types.h>
13725#endif
13726#ifdef HAVE_SYS_SOCKET_H
13727#include <sys/socket.h>
13728#endif
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013731if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013736
13737fi
13738
Michael W. Hudson54241132001-12-07 15:38:26 +000013739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13741$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013742if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013746 ac_cv_broken_mbstowcs=no
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013749/* end confdefs.h. */
13750
13751#include<stdlib.h>
13752int main() {
13753 size_t len = -1;
13754 const char *str = "text";
13755 len = mbstowcs(NULL, str, 0);
13756 return (len != 4);
13757}
13758
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013761 ac_cv_broken_mbstowcs=no
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013767fi
13768
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13772$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013773if test "$ac_cv_broken_mbstowcs" = yes
13774then
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013777
13778fi
13779
Antoine Pitrou042b1282010-08-13 21:15:58 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13781$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013782if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013783 $as_echo_n "(cached) " >&6
13784else
13785 if test "$cross_compiling" = yes; then :
13786 ac_cv_computed_gotos=no
13787else
13788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13789/* end confdefs.h. */
13790
13791int main(int argc, char **argv)
13792{
13793 static void *targets[1] = { &&LABEL1 };
13794 goto LABEL2;
13795LABEL1:
13796 return 0;
13797LABEL2:
13798 goto *targets[0];
13799 return 1;
13800}
13801
13802_ACEOF
13803if ac_fn_c_try_run "$LINENO"; then :
13804 ac_cv_computed_gotos=yes
13805else
13806 ac_cv_computed_gotos=no
13807fi
13808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13809 conftest.$ac_objext conftest.beam conftest.$ac_ext
13810fi
13811
13812fi
13813
13814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13815$as_echo "$ac_cv_computed_gotos" >&6; }
13816if test "$ac_cv_computed_gotos" = yes
13817then
13818
13819$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13820
13821fi
13822
Antoine Pitroub52ec782009-01-25 16:34:23 +000013823# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13825$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013826
13827# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013829 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013830if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013831then
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13836$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013837fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013838if test "$withval" = no
13839then
13840
13841$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13844$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013845fi
13846
Antoine Pitrou042b1282010-08-13 21:15:58 +000013847else
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13849$as_echo "no value specified" >&6; }
13850fi
13851
Antoine Pitroub52ec782009-01-25 16:34:23 +000013852
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013853case $ac_sys_system in
13854AIX*)
13855
13856$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13857 ;;
13858esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013859
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Jesus Cea6a792292010-05-03 21:18:48 +000013861case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013862 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 +000013863esac
13864
Gregory P. Smith138fa432010-12-13 08:00:52 +000013865ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013866if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013867
13868$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13869
13870fi
Jesus Cea6a792292010-05-03 21:18:48 +000013871
13872
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013873
13874
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013875for h in `(cd $srcdir;echo Python/thread_*.h)`
13876do
13877 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13878done
13879
Michael W. Hudson54241132001-12-07 15:38:26 +000013880
Neal Norwitzd24499d2005-12-18 21:36:39 +000013881SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13883$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013884for dir in $SRCDIRS; do
13885 if test ! -d $dir; then
13886 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013887 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013888done
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13890$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013891
Guido van Rossum627b2d71993-12-24 10:39:16 +000013892# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013893ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013894
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013895ac_config_files="$ac_config_files Modules/ld_so_aix"
13896
Martin v. Löwis11437992002-04-12 09:54:03 +000013897cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898# This file is a shell script that caches the results of configure
13899# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013900# scripts and configure runs, see configure's option --config-cache.
13901# It is not useful on other systems. If it contains results you don't
13902# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903#
Martin v. Löwis11437992002-04-12 09:54:03 +000013904# config.status only pays attention to the cache file if you give it
13905# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906#
Skip Montanaro6dead952003-09-25 14:50:04 +000013907# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013908# loading this file, other *unset* `ac_cv_foo' will be assigned the
13909# following values.
13910
13911_ACEOF
13912
Guido van Rossumf78abae1997-01-21 22:02:36 +000013913# The following way of writing the cache mishandles newlines in values,
13914# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013916# Ultrix sh set writes to stderr and can't be redirected directly,
13917# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918(
13919 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13920 eval ac_val=\$$ac_var
13921 case $ac_val in #(
13922 *${as_nl}*)
13923 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13925$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 esac
13927 case $ac_var in #(
13928 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13930 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 esac ;;
13932 esac
13933 done
13934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13937 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 # `set' does not quote correctly, so add quotes: double-quote
13939 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013941 "s/'/'\\\\''/g;
13942 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 *)
13945 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 esac |
13949 sort
13950) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13956 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13958 :end' >>confcache
13959if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13960 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013961 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13963$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013964 if test ! -f "$cache_file" || test -h "$cache_file"; then
13965 cat confcache >"$cache_file"
13966 else
13967 case $cache_file in #(
13968 */* | ?:*)
13969 mv -f confcache "$cache_file"$$ &&
13970 mv -f "$cache_file"$$ "$cache_file" ;; #(
13971 *)
13972 mv -f confcache "$cache_file" ;;
13973 esac
13974 fi
13975 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013976 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13978$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013979 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013981rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013982
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013983test "x$prefix" = xNONE && prefix=$ac_default_prefix
13984# Let make expand exec_prefix.
13985test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013986
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013987DEFS=-DHAVE_CONFIG_H
13988
Skip Montanaro6dead952003-09-25 14:50:04 +000013989ac_libobjs=
13990ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013991U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013992for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13993 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013994 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13997 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13999 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014000done
14001LIBOBJS=$ac_libobjs
14002
14003LTLIBOBJS=$ac_ltlibobjs
14004
14005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014008: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014009ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014010ac_clean_files_save=$ac_clean_files
14011ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14013$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14014as_write_fail=0
14015cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014016#! $SHELL
14017# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014018# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014020# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014023ac_cs_recheck=false
14024ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026SHELL=\${CONFIG_SHELL-$SHELL}
14027export SHELL
14028_ASEOF
14029cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14030## -------------------- ##
14031## M4sh Initialization. ##
14032## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034# Be more Bourne compatible
14035DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014036if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 emulate sh
14038 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014040 # is contrary to our usage. Disable this feature.
14041 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014043else
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 case `(set -o) 2>/dev/null` in #(
14045 *posix*) :
14046 set -o posix ;; #(
14047 *) :
14048 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014050fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014051
14052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053as_nl='
14054'
14055export as_nl
14056# Printing a long string crashes Solaris 7 /usr/bin/printf.
14057as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14058as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14059as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14060# Prefer a ksh shell builtin over an external printf program on Solaris,
14061# but without wasting forks for bash or zsh.
14062if test -z "$BASH_VERSION$ZSH_VERSION" \
14063 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14064 as_echo='print -r --'
14065 as_echo_n='print -rn --'
14066elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14067 as_echo='printf %s\n'
14068 as_echo_n='printf %s'
14069else
14070 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14071 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14072 as_echo_n='/usr/ucb/echo -n'
14073 else
14074 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14075 as_echo_n_body='eval
14076 arg=$1;
14077 case $arg in #(
14078 *"$as_nl"*)
14079 expr "X$arg" : "X\\(.*\\)$as_nl";
14080 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14081 esac;
14082 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14083 '
14084 export as_echo_n_body
14085 as_echo_n='sh -c $as_echo_n_body as_echo'
14086 fi
14087 export as_echo_body
14088 as_echo='sh -c $as_echo_body as_echo'
14089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
14091# The user is always right.
14092if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 PATH_SEPARATOR=:
14094 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14095 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14096 PATH_SEPARATOR=';'
14097 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100
14101# IFS
14102# We need space, tab and new line, in precisely that order. Quoting is
14103# there to prevent editors from complaining about space-tab.
14104# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14105# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106IFS=" "" $as_nl"
14107
14108# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014109as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014110case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111 *[\\/]* ) as_myself=$0 ;;
14112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014113for as_dir in $PATH
14114do
14115 IFS=$as_save_IFS
14116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14118 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121 ;;
14122esac
14123# We did not find ourselves, most probably we were run as `sh COMMAND'
14124# in which case we are not to be found in the path.
14125if test "x$as_myself" = x; then
14126 as_myself=$0
14127fi
14128if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14130 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131fi
14132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133# Unset variables that we do not need and which cause bugs (e.g. in
14134# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14135# suppresses any "Segmentation fault" message there. '((' could
14136# trigger a bug in pdksh 5.2.14.
14137for as_var in BASH_ENV ENV MAIL MAILPATH
14138do eval test x\${$as_var+set} = xset \
14139 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140done
14141PS1='$ '
14142PS2='> '
14143PS4='+ '
14144
14145# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014146LC_ALL=C
14147export LC_ALL
14148LANGUAGE=C
14149export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150
Matthias Kloseb9621712010-04-24 17:59:49 +000014151# CDPATH.
14152(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14153
14154
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014155# as_fn_error STATUS ERROR [LINENO LOG_FD]
14156# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014157# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14158# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014159# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014160as_fn_error ()
14161{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014162 as_status=$1; test $as_status -eq 0 && as_status=1
14163 if test "$4"; then
14164 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14165 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014167 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 as_fn_exit $as_status
14169} # as_fn_error
14170
14171
14172# as_fn_set_status STATUS
14173# -----------------------
14174# Set $? to STATUS, without forking.
14175as_fn_set_status ()
14176{
14177 return $1
14178} # as_fn_set_status
14179
14180# as_fn_exit STATUS
14181# -----------------
14182# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14183as_fn_exit ()
14184{
14185 set +e
14186 as_fn_set_status $1
14187 exit $1
14188} # as_fn_exit
14189
14190# as_fn_unset VAR
14191# ---------------
14192# Portably unset VAR.
14193as_fn_unset ()
14194{
14195 { eval $1=; unset $1;}
14196}
14197as_unset=as_fn_unset
14198# as_fn_append VAR VALUE
14199# ----------------------
14200# Append the text in VALUE to the end of the definition contained in VAR. Take
14201# advantage of any shell optimizations that allow amortized linear growth over
14202# repeated appends, instead of the typical quadratic growth present in naive
14203# implementations.
14204if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14205 eval 'as_fn_append ()
14206 {
14207 eval $1+=\$2
14208 }'
14209else
14210 as_fn_append ()
14211 {
14212 eval $1=\$$1\$2
14213 }
14214fi # as_fn_append
14215
14216# as_fn_arith ARG...
14217# ------------------
14218# Perform arithmetic evaluation on the ARGs, and store the result in the
14219# global $as_val. Take advantage of shells that can avoid forks. The arguments
14220# must be portable across $(()) and expr.
14221if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14222 eval 'as_fn_arith ()
14223 {
14224 as_val=$(( $* ))
14225 }'
14226else
14227 as_fn_arith ()
14228 {
14229 as_val=`expr "$@" || test $? -eq 1`
14230 }
14231fi # as_fn_arith
14232
14233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234if expr a : '\(a\)' >/dev/null 2>&1 &&
14235 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14236 as_expr=expr
14237else
14238 as_expr=false
14239fi
14240
14241if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14242 as_basename=basename
14243else
14244 as_basename=false
14245fi
14246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14248 as_dirname=dirname
14249else
14250 as_dirname=false
14251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253as_me=`$as_basename -- "$0" ||
14254$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14255 X"$0" : 'X\(//\)$' \| \
14256 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258 sed '/^.*\/\([^/][^/]*\)\/*$/{
14259 s//\1/
14260 q
14261 }
14262 /^X\/\(\/\/\)$/{
14263 s//\1/
14264 q
14265 }
14266 /^X\/\(\/\).*/{
14267 s//\1/
14268 q
14269 }
14270 s/.*/./; q'`
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272# Avoid depending upon Character Ranges.
14273as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14274as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14275as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14276as_cr_digits='0123456789'
14277as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278
14279ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014280case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 xy) ECHO_C='\c';;
14285 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14286 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287 esac;;
14288*)
14289 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293if test -d conf$$.dir; then
14294 rm -f conf$$.dir/conf$$.file
14295else
14296 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014299if (echo >conf$$.file) 2>/dev/null; then
14300 if ln -s conf$$.file conf$$ 2>/dev/null; then
14301 as_ln_s='ln -s'
14302 # ... but there are two gotchas:
14303 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14304 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14305 # In both cases, we have to default to `cp -p'.
14306 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14307 as_ln_s='cp -p'
14308 elif ln conf$$.file conf$$ 2>/dev/null; then
14309 as_ln_s=ln
14310 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014313else
14314 as_ln_s='cp -p'
14315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14317rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
Matthias Kloseb9621712010-04-24 17:59:49 +000014319
14320# as_fn_mkdir_p
14321# -------------
14322# Create "$as_dir" as a directory, including parents if necessary.
14323as_fn_mkdir_p ()
14324{
14325
14326 case $as_dir in #(
14327 -*) as_dir=./$as_dir;;
14328 esac
14329 test -d "$as_dir" || eval $as_mkdir_p || {
14330 as_dirs=
14331 while :; do
14332 case $as_dir in #(
14333 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14334 *) as_qdir=$as_dir;;
14335 esac
14336 as_dirs="'$as_qdir' $as_dirs"
14337 as_dir=`$as_dirname -- "$as_dir" ||
14338$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14339 X"$as_dir" : 'X\(//\)[^/]' \| \
14340 X"$as_dir" : 'X\(//\)$' \| \
14341 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14342$as_echo X"$as_dir" |
14343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14344 s//\1/
14345 q
14346 }
14347 /^X\(\/\/\)[^/].*/{
14348 s//\1/
14349 q
14350 }
14351 /^X\(\/\/\)$/{
14352 s//\1/
14353 q
14354 }
14355 /^X\(\/\).*/{
14356 s//\1/
14357 q
14358 }
14359 s/.*/./; q'`
14360 test -d "$as_dir" && break
14361 done
14362 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014363 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014364
14365
14366} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014367if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014369else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014370 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014371 as_mkdir_p=false
14372fi
14373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374if test -x / >/dev/null 2>&1; then
14375 as_test_x='test -x'
14376else
14377 if ls -dL / >/dev/null 2>&1; then
14378 as_ls_L_option=L
14379 else
14380 as_ls_L_option=
14381 fi
14382 as_test_x='
14383 eval sh -c '\''
14384 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 case $1 in #(
14388 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391 ???[sx]*):;;*)false;;esac;fi
14392 '\'' sh
14393 '
14394fi
14395as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014398as_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 +000014399
14400# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014401as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014402
14403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014405## ----------------------------------- ##
14406## Main body of $CONFIG_STATUS script. ##
14407## ----------------------------------- ##
14408_ASEOF
14409test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14412# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014413# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414# values after options handling.
14415ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014416This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014417generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
14419 CONFIG_FILES = $CONFIG_FILES
14420 CONFIG_HEADERS = $CONFIG_HEADERS
14421 CONFIG_LINKS = $CONFIG_LINKS
14422 CONFIG_COMMANDS = $CONFIG_COMMANDS
14423 $ $0 $@
14424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425on `(hostname || uname -n) 2>/dev/null | sed 1q`
14426"
14427
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430case $ac_config_files in *"
14431"*) set x $ac_config_files; shift; ac_config_files=$*;;
14432esac
14433
14434case $ac_config_headers in *"
14435"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14436esac
14437
14438
14439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014440# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014441config_files="$ac_config_files"
14442config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014447ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014448\`$as_me' instantiates files and other configuration actions
14449from templates according to the current configuration. Unless the files
14450and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 --config print configuration, then exit
14457 -q, --quiet, --silent
14458 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 -d, --debug don't remove temporary files
14460 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 --file=FILE[:TEMPLATE]
14462 instantiate the configuration file FILE
14463 --header=FILE[:TEMPLATE]
14464 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
14466Configuration files:
14467$config_files
14468
14469Configuration headers:
14470$config_headers
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14476ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014477ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014478python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014479configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014482Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014483This config.status script is free software; the Free Software Foundation
14484gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485
14486ac_pwd='$ac_pwd'
14487srcdir='$srcdir'
14488INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014489test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014490_ACEOF
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14493# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014494ac_need_defaults=:
14495while test $# != 0
14496do
14497 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014498 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14500 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014501 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014503 --*=)
14504 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14505 ac_optarg=
14506 ac_shift=:
14507 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014509 ac_option=$1
14510 ac_optarg=$2
14511 ac_shift=shift
14512 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 esac
14514
Skip Montanaro6dead952003-09-25 14:50:04 +000014515 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014517 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14518 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 $as_echo "$ac_cs_version"; exit ;;
14521 --config | --confi | --conf | --con | --co | --c )
14522 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 debug=: ;;
14525 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014526 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 case $ac_optarg in
14528 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014529 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 esac
14531 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 ac_need_defaults=false;;
14533 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014534 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 case $ac_optarg in
14536 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14537 esac
14538 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 --he | --h)
14541 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014542 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014543Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014546 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14547 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14548 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
14550 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014551 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014552Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
14557 esac
14558 shift
14559done
14560
Skip Montanaro6dead952003-09-25 14:50:04 +000014561ac_configure_extra_args=
14562
14563if $ac_cs_silent; then
14564 exec 6>/dev/null
14565 ac_configure_extra_args="$ac_configure_extra_args --silent"
14566fi
14567
14568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014570if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14572 shift
14573 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14574 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014577fi
14578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581exec 5>>config.log
14582{
14583 echo
14584 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14585## Running $as_me. ##
14586_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
14596# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014597for ac_config_target in $ac_config_targets
14598do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 case $ac_config_target in
14600 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14601 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14602 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014603 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14604 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14606 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014607 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014608 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014610 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 esac
14612done
14613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615# If the user did not use the arguments to specify the items to instantiate,
14616# then the envvar interface is used. Set only those that are not.
14617# We use the long form for the default assignment because of an extremely
14618# bizarre bug on SunOS 4.1.3.
14619if $ac_need_defaults; then
14620 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14621 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14622fi
14623
Skip Montanaro6dead952003-09-25 14:50:04 +000014624# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014626# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627# Hook for its removal unless debugging.
14628# Note that there is a small window in which the directory will not be cleaned:
14629# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014630$debug ||
14631{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014632 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014634 : "${ac_tmp:=$tmp}"
14635 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014638}
Martin v. Löwis11437992002-04-12 09:54:03 +000014639# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014640
Martin v. Löwis11437992002-04-12 09:54:03 +000014641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014643 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014644} ||
14645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646 tmp=./conf$$-$RANDOM
14647 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014648} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14649ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651# Set up the scripts for CONFIG_FILES section.
14652# No need to generate them if there are no CONFIG_FILES.
14653# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656
14657ac_cr=`echo X | tr X '\015'`
14658# On cygwin, bash can eat \r inside `` if the user requested igncr.
14659# But we know of no other shell where ac_cr would be empty at this
14660# point, so we can use a bashism as a fallback.
14661if test "x$ac_cr" = x; then
14662 eval ac_cr=\$\'\\r\'
14663fi
14664ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14665if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014666 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014667else
14668 ac_cs_awk_cr=$ac_cr
14669fi
14670
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014671echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014672_ACEOF
14673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675{
14676 echo "cat >conf$$subs.awk <<_ACEOF" &&
14677 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14678 echo "_ACEOF"
14679} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014680 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14681ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682ac_delim='%!_!# '
14683for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014685 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14688 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689 break
14690 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014691 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014692 else
14693 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695done
Matthias Kloseb9621712010-04-24 17:59:49 +000014696rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014699cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014701sed -n '
14702h
14703s/^/S["/; s/!.*/"]=/
14704p
14705g
14706s/^[^!]*!//
14707:repl
14708t repl
14709s/'"$ac_delim"'$//
14710t delim
14711:nl
14712h
14713s/\(.\{148\}\)..*/\1/
14714t more1
14715s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14716p
14717n
14718b repl
14719:more1
14720s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14721p
14722g
14723s/.\{148\}//
14724t nl
14725:delim
14726h
14727s/\(.\{148\}\)..*/\1/
14728t more2
14729s/["\\]/\\&/g; s/^/"/; s/$/"/
14730p
14731b
14732:more2
14733s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14734p
14735g
14736s/.\{148\}//
14737t delim
14738' <conf$$subs.awk | sed '
14739/^[^""]/{
14740 N
14741 s/\n//
14742}
14743' >>$CONFIG_STATUS || ac_write_fail=1
14744rm -f conf$$subs.awk
14745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14746_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014747cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 for (key in S) S_is_set[key] = 1
14749 FS = ""
14750
14751}
14752{
14753 line = $ 0
14754 nfields = split(line, field, "@")
14755 substed = 0
14756 len = length(field[1])
14757 for (i = 2; i < nfields; i++) {
14758 key = field[i]
14759 keylen = length(key)
14760 if (S_is_set[key]) {
14761 value = S[key]
14762 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14763 len += length(value) + length(field[++i])
14764 substed = 1
14765 } else
14766 len += 1 + keylen
14767 }
14768
14769 print line
14770}
14771
14772_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14775if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14776 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14777else
14778 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014779fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14780 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014781_ACEOF
14782
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014783# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14784# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785# trailing colons and then remove the whole line if VPATH becomes empty
14786# (actually we leave an empty line to preserve line numbers).
14787if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014788 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14789h
14790s///
14791s/^/:/
14792s/[ ]*$/:/
14793s/:\$(srcdir):/:/g
14794s/:\${srcdir}:/:/g
14795s/:@srcdir@:/:/g
14796s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014798x
14799s/\(=[ ]*\).*/\1/
14800G
14801s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802s/^[^=]*=[ ]*$//
14803}'
14804fi
14805
Matthias Kloseb9621712010-04-24 17:59:49 +000014806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014807fi # test -n "$CONFIG_FILES"
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809# Set up the scripts for CONFIG_HEADERS section.
14810# No need to generate them if there are no CONFIG_HEADERS.
14811# This happens for instance with `./config.status Makefile'.
14812if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014813cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014814BEGIN {
14815_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817# Transform confdefs.h into an awk script `defines.awk', embedded as
14818# here-document in config.status, that substitutes the proper values into
14819# config.h.in to produce config.h.
14820
14821# Create a delimiter string that does not exist in confdefs.h, to ease
14822# handling of long lines.
14823ac_delim='%!_!# '
14824for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014825 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14826 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 break
14828 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014829 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 else
14831 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14832 fi
14833done
14834
14835# For the awk script, D is an array of macro values keyed by name,
14836# likewise P contains macro parameters if any. Preserve backslash
14837# newline sequences.
14838
14839ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14840sed -n '
14841s/.\{148\}/&'"$ac_delim"'/g
14842t rset
14843:rset
14844s/^[ ]*#[ ]*define[ ][ ]*/ /
14845t def
14846d
14847:def
14848s/\\$//
14849t bsnl
14850s/["\\]/\\&/g
14851s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14852D["\1"]=" \3"/p
14853s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14854d
14855:bsnl
14856s/["\\]/\\&/g
14857s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14858D["\1"]=" \3\\\\\\n"\\/p
14859t cont
14860s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14861t cont
14862d
14863:cont
14864n
14865s/.\{148\}/&'"$ac_delim"'/g
14866t clear
14867:clear
14868s/\\$//
14869t bsnlc
14870s/["\\]/\\&/g; s/^/"/; s/$/"/p
14871d
14872:bsnlc
14873s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14874b cont
14875' <confdefs.h | sed '
14876s/'"$ac_delim"'/"\\\
14877"/g' >>$CONFIG_STATUS || ac_write_fail=1
14878
14879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14880 for (key in D) D_is_set[key] = 1
14881 FS = ""
14882}
14883/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14884 line = \$ 0
14885 split(line, arg, " ")
14886 if (arg[1] == "#") {
14887 defundef = arg[2]
14888 mac1 = arg[3]
14889 } else {
14890 defundef = substr(arg[1], 2)
14891 mac1 = arg[2]
14892 }
14893 split(mac1, mac2, "(") #)
14894 macro = mac2[1]
14895 prefix = substr(line, 1, index(line, defundef) - 1)
14896 if (D_is_set[macro]) {
14897 # Preserve the white space surrounding the "#".
14898 print prefix "define", macro P[macro] D[macro]
14899 next
14900 } else {
14901 # Replace #undef with comments. This is necessary, for example,
14902 # in the case of _POSIX_SOURCE, which is predefined and required
14903 # on some systems where configure will not decide to define it.
14904 if (defundef == "undef") {
14905 print "/*", prefix defundef, macro, "*/"
14906 next
14907 }
14908 }
14909}
14910{ print }
14911_ACAWK
14912_ACEOF
14913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014914 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014915fi # test -n "$CONFIG_HEADERS"
14916
14917
14918eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14919shift
14920for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921do
14922 case $ac_tag in
14923 :[FHLC]) ac_mode=$ac_tag; continue;;
14924 esac
14925 case $ac_mode$ac_tag in
14926 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014927 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 :[FH]-) ac_tag=-:-;;
14929 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14930 esac
14931 ac_save_IFS=$IFS
14932 IFS=:
14933 set x $ac_tag
14934 IFS=$ac_save_IFS
14935 shift
14936 ac_file=$1
14937 shift
14938
14939 case $ac_mode in
14940 :L) ac_source=$1;;
14941 :[FH])
14942 ac_file_inputs=
14943 for ac_f
14944 do
14945 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014946 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 *) # Look for the file first in the build tree, then in the source tree
14948 # (if the path is not absolute). The absolute path cannot be DOS-style,
14949 # because $ac_f cannot contain `:'.
14950 test -f "$ac_f" ||
14951 case $ac_f in
14952 [\\/$]*) false;;
14953 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14954 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014955 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14958 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 done
14960
14961 # Let's still pretend it is `configure' which instantiates (i.e., don't
14962 # use $as_me), people would be surprised to read:
14963 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 configure_input='Generated from '`
14965 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14966 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 if test x"$ac_file" != x-; then
14968 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14970$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 # Neutralize special characters interpreted by sed in replacement strings.
14973 case $configure_input in #(
14974 *\&* | *\|* | *\\* )
14975 ac_sed_conf_input=`$as_echo "$configure_input" |
14976 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14977 *) ac_sed_conf_input=$configure_input;;
14978 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979
14980 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014981 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14982 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 esac
14984 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 esac
14986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014988$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 X"$ac_file" : 'X\(//\)[^/]' \| \
14990 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14994 s//\1/
14995 q
14996 }
14997 /^X\(\/\/\)[^/].*/{
14998 s//\1/
14999 q
15000 }
15001 /^X\(\/\/\)$/{
15002 s//\1/
15003 q
15004 }
15005 /^X\(\/\).*/{
15006 s//\1/
15007 q
15008 }
15009 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_builddir=.
15012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013case "$ac_dir" in
15014.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15015*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 case $ac_top_builddir_sub in
15020 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15021 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15022 esac ;;
15023esac
15024ac_abs_top_builddir=$ac_pwd
15025ac_abs_builddir=$ac_pwd$ac_dir_suffix
15026# for backward compatibility:
15027ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
15029case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 ac_top_srcdir=$ac_top_builddir_sub
15033 ac_abs_top_srcdir=$ac_pwd ;;
15034 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 ac_top_srcdir=$srcdir
15037 ac_abs_top_srcdir=$srcdir ;;
15038 *) # Relative name.
15039 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15040 ac_top_srcdir=$ac_top_build_prefix$srcdir
15041 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015042esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 case $ac_mode in
15047 :F)
15048 #
15049 # CONFIG_FILE
15050 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
15052 case $INSTALL in
15053 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015056_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059# If the template does not know about datarootdir, expand it.
15060# FIXME: This hack should be removed a few years after 2.60.
15061ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015062ac_sed_dataroot='
15063/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 p
15065 q
15066}
15067/@datadir@/p
15068/@docdir@/p
15069/@infodir@/p
15070/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015071/@mandir@/p'
15072case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073*datarootdir*) ac_datarootdir_seen=yes;;
15074*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15076$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015078cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079 ac_datarootdir_hack='
15080 s&@datadir@&$datadir&g
15081 s&@docdir@&$docdir&g
15082 s&@infodir@&$infodir&g
15083 s&@localedir@&$localedir&g
15084 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086esac
15087_ACEOF
15088
15089# Neutralize VPATH when `$srcdir' = `.'.
15090# Shell code in configure.ac might set extrasub.
15091# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15093ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015094$extrasub
15095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015097:t
15098/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015099s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015101s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102s&@srcdir@&$ac_srcdir&;t t
15103s&@abs_srcdir@&$ac_abs_srcdir&;t t
15104s&@top_srcdir@&$ac_top_srcdir&;t t
15105s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15106s&@builddir@&$ac_builddir&;t t
15107s&@abs_builddir@&$ac_abs_builddir&;t t
15108s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15109s&@INSTALL@&$ac_INSTALL&;t t
15110$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015111"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015112eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15113 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015116 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15117 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15118 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 { $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 +000015120which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015121$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015122which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015123
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015124 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015126 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15127 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015129 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130 ;;
15131 :H)
15132 #
15133 # CONFIG_HEADER
15134 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 {
15137 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015138 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15139 } >"$ac_tmp/config.h" \
15140 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15141 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15143$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015146 mv "$ac_tmp/config.h" "$ac_file" \
15147 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 fi
15149 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015151 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15152 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
15157 esac
15158
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015159
15160 case $ac_file$ac_mode in
15161 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15162
15163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164done # for ac_tag
15165
Guido van Rossum627b2d71993-12-24 10:39:16 +000015166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015168_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015169ac_clean_files=$ac_clean_files_save
15170
Matthias Kloseb9621712010-04-24 17:59:49 +000015171test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015172 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015173
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
15175# configure is writing to config.log, and then calls config.status.
15176# config.status does its own redirection, appending to config.log.
15177# Unfortunately, on DOS this fails, as config.log is still kept open
15178# by configure, so config.status won't be able to write to it; its
15179# output is simply discarded. So we exec the FD to /dev/null,
15180# effectively closing config.log, so it can be properly (re)opened and
15181# appended to by config.status. When coming back to configure, we
15182# need to make the FD available again.
15183if test "$no_create" != yes; then
15184 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015185 ac_config_status_args=
15186 test "$silent" = yes &&
15187 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015189 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 exec 5>>config.log
15191 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15192 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015193 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015194fi
15195if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15197$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015198fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015199
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015200
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015201echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015202if test ! -f Modules/Setup
15203then
15204 cp $srcdir/Modules/Setup.dist Modules/Setup
15205fi
15206
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015207echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015208if test ! -f Modules/Setup.local
15209then
15210 echo "# Edit this file for local setup changes" >Modules/Setup.local
15211fi
15212
15213echo "creating Makefile"
15214$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15215 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015216 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015217mv config.c Modules