blob: 9d85e359b1da0245492ee391232deb38eeff32ac [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.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020095as_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.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +0200221 # 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
Antoine Pitrou5cd3e302011-07-27 01:16:18 +0200226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl187c1112011-07-03 09:23:20 +0200647HAS_PYTHON
648DISABLE_ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100649HAS_HG
650HGBRANCH
651HGTAG
652HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000653SVNVERSION
654ARFLAGS
655AR
656RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000657USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000658GNULD
659LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000660LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000661RUNSHARED
662INSTSONAME
663LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000664PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000665BLDLIBRARY
666DLLLIBRARY
667LDLIBRARY
668LIBRARY
669BUILDEXEEXT
670EGREP
671GREP
672CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200673NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000674MAINCC
675CXX
676OBJEXT
677EXEEXT
678ac_ct_CC
679CPPFLAGS
680LDFLAGS
681CFLAGS
682CC
683EXPORT_MACOSX_DEPLOYMENT_TARGET
684CONFIGURE_MACOSX_DEPLOYMENT_TARGET
685SGI_ABI
686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
704target_alias
705host_alias
706build_alias
707LIBS
708ECHO_T
709ECHO_N
710ECHO_C
711DEFS
712mandir
713localedir
714libdir
715psdir
716pdfdir
717dvidir
718htmldir
719infodir
720docdir
721oldincludedir
722includedir
723localstatedir
724sharedstatedir
725sysconfdir
726datadir
727datarootdir
728libexecdir
729sbindir
730bindir
731program_transform_name
732prefix
733exec_prefix
734PACKAGE_URL
735PACKAGE_BUGREPORT
736PACKAGE_STRING
737PACKAGE_VERSION
738PACKAGE_TARNAME
739PACKAGE_NAME
740PATH_SEPARATOR
741SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000742ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000743ac_user_opts='
744enable_option_checking
745enable_universalsdk
746with_universal_archs
747with_framework_name
748enable_framework
749with_gcc
750with_cxx_main
751with_suffix
752enable_shared
753enable_profiling
754with_pydebug
755with_libs
756with_system_expat
757with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000758enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_dbmliborder
760with_signal_module
761with_dec_threads
762with_threads
763with_thread
764enable_ipv6
765with_doc_strings
766with_tsc
767with_pymalloc
768with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000769with_fpectl
770with_libm
771with_libc
772enable_big_digits
773with_wide_unicode
774with_computed_gotos
775'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000776 ac_precious_vars='build_alias
777host_alias
778target_alias
779CC
780CFLAGS
781LDFLAGS
782LIBS
783CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000784CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000788ac_init_help=
789ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000790ac_unrecognized_opts=
791ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792# The variables have the same names as the options, with
793# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000794cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797no_recursion=
798prefix=NONE
799program_prefix=NONE
800program_suffix=NONE
801program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806x_includes=NONE
807x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000808
809# Installation directory options.
810# These are left unexpanded so users can "make install exec_prefix=/foo"
811# and all the variables that are supposed to be based on exec_prefix
812# by default will actually change.
813# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815bindir='${exec_prefix}/bin'
816sbindir='${exec_prefix}/sbin'
817libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818datarootdir='${prefix}/share'
819datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820sysconfdir='${prefix}/etc'
821sharedstatedir='${prefix}/com'
822localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823includedir='${prefix}/include'
824oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
826infodir='${datarootdir}/info'
827htmldir='${docdir}'
828dvidir='${docdir}'
829pdfdir='${docdir}'
830psdir='${docdir}'
831libdir='${exec_prefix}/lib'
832localedir='${datarootdir}/locale'
833mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000838do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 # If the previous option needs an argument, assign it.
840 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842 ac_prev=
843 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000844 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000847 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
848 *=) ac_optarg= ;;
849 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Accept the important Cygnus configure options, so we can diagnose typos.
853
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 case $ac_dashdash$ac_option in
855 --)
856 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 -bindir | --bindir | --bindi | --bind | --bin | --bi)
859 ac_prev=bindir ;;
860 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
863 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 -cache-file | --cache-file | --cache-fil | --cache-fi \
869 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
870 ac_prev=cache_file ;;
871 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
872 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 cache_file=$ac_optarg ;;
874
875 --config-cache | -C)
876 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
884 | --dataroo | --dataro | --datar)
885 ac_prev=datarootdir ;;
886 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
887 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
888 datarootdir=$ac_optarg ;;
889
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000893 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000894 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000895 ac_useropt_orig=$ac_useropt
896 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
897 case $ac_user_opts in
898 *"
899"enable_$ac_useropt"
900"*) ;;
901 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
902 ac_unrecognized_sep=', ';;
903 esac
904 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905
906 -docdir | --docdir | --docdi | --doc | --do)
907 ac_prev=docdir ;;
908 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909 docdir=$ac_optarg ;;
910
911 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912 ac_prev=dvidir ;;
913 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
916 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000920 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925"enable_$ac_useropt"
926"*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
933 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
934 | --exec | --exe | --ex)
935 ac_prev=exec_prefix ;;
936 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
937 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
938 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 # Obsolete; use --with-gas.
943 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 -help | --help | --hel | --he | -h)
946 ac_init_help=long ;;
947 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
948 ac_init_help=recursive ;;
949 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
950 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
958 ac_prev=htmldir ;;
959 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
960 | --ht=*)
961 htmldir=$ac_optarg ;;
962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 -includedir | --includedir | --includedi | --included | --include \
964 | --includ | --inclu | --incl | --inc)
965 ac_prev=includedir ;;
966 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
967 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
970 -infodir | --infodir | --infodi | --infod | --info | --inf)
971 ac_prev=infodir ;;
972 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
975 -libdir | --libdir | --libdi | --libd)
976 ac_prev=libdir ;;
977 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
981 | --libexe | --libex | --libe)
982 ac_prev=libexecdir ;;
983 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
984 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000987 -localedir | --localedir | --localedi | --localed | --locale)
988 ac_prev=localedir ;;
989 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
990 localedir=$ac_optarg ;;
991
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994 ac_prev=localstatedir ;;
995 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000996 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
999 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1000 ac_prev=mandir ;;
1001 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Obsolete; use --without-fp.
1006 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 no_create=yes ;;
1011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1013 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1014 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1017 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1018 | --oldin | --oldi | --old | --ol | --o)
1019 ac_prev=oldincludedir ;;
1020 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1021 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1022 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1026 ac_prev=prefix ;;
1027 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
1030 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1031 | --program-pre | --program-pr | --program-p)
1032 ac_prev=program_prefix ;;
1033 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1034 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1038 | --program-suf | --program-su | --program-s)
1039 ac_prev=program_suffix ;;
1040 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1041 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -program-transform-name | --program-transform-name \
1045 | --program-transform-nam | --program-transform-na \
1046 | --program-transform-n | --program-transform- \
1047 | --program-transform | --program-transfor \
1048 | --program-transfo | --program-transf \
1049 | --program-trans | --program-tran \
1050 | --progr-tra | --program-tr | --program-t)
1051 ac_prev=program_transform_name ;;
1052 -program-transform-name=* | --program-transform-name=* \
1053 | --program-transform-nam=* | --program-transform-na=* \
1054 | --program-transform-n=* | --program-transform-=* \
1055 | --program-transform=* | --program-transfor=* \
1056 | --program-transfo=* | --program-transf=* \
1057 | --program-trans=* | --program-tran=* \
1058 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1062 ac_prev=pdfdir ;;
1063 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1064 pdfdir=$ac_optarg ;;
1065
1066 -psdir | --psdir | --psdi | --psd | --ps)
1067 ac_prev=psdir ;;
1068 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1069 psdir=$ac_optarg ;;
1070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 silent=yes ;;
1074
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1076 ac_prev=sbindir ;;
1077 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1078 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
1081 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1082 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1083 | --sharedst | --shareds | --shared | --share | --shar \
1084 | --sha | --sh)
1085 ac_prev=sharedstatedir ;;
1086 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1087 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1088 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1089 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092 -site | --site | --sit)
1093 ac_prev=site ;;
1094 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1098 ac_prev=srcdir ;;
1099 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001102 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1103 | --syscon | --sysco | --sysc | --sys | --sy)
1104 ac_prev=sysconfdir ;;
1105 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1106 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1115 verbose=yes ;;
1116
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 -version | --version | --versio | --versi | --vers | -V)
1118 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001124 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001140 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145"with_$ac_useropt"
1146"*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 --x)
1153 # Obsolete; use --with-x.
1154 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1157 | --x-incl | --x-inc | --x-in | --x-i)
1158 ac_prev=x_includes ;;
1159 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1160 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
1163 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1164 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1165 ac_prev=x_libraries ;;
1166 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1167 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001170 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1171Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 ;;
1173
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 *=*)
1175 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1176 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 case $ac_envvar in #(
1178 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001179 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 export $ac_envvar ;;
1183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001189 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ;;
1191
1192 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001193done
1194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001197 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198fi
1199
Matthias Kloseb9621712010-04-24 17:59:49 +00001200if test -n "$ac_unrecognized_opts"; then
1201 case $enable_option_checking in
1202 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001203 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1205 esac
1206fi
1207
1208# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1210 datadir sysconfdir sharedstatedir localstatedir includedir \
1211 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1212 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 # Remove trailing slashes.
1216 case $ac_val in
1217 */ )
1218 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1219 eval $ac_var=\$ac_val;;
1220 esac
1221 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223 [\\/$]* | ?:[\\/]* ) continue;;
1224 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001226 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001227done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229# There might be people who depend on the old broken behavior: `$host'
1230# used to hold the argument of --host etc.
1231# FIXME: To remove some day.
1232build=$build_alias
1233host=$host_alias
1234target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Martin v. Löwis11437992002-04-12 09:54:03 +00001236# FIXME: To remove some day.
1237if test "x$host_alias" != x; then
1238 if test "x$build_alias" = x; then
1239 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001240 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1241 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 elif test "x$build_alias" != "x$host_alias"; then
1243 cross_compiling=yes
1244 fi
1245fi
1246
1247ac_tool_prefix=
1248test -n "$host_alias" && ac_tool_prefix=$host_alias-
1249
1250test "$silent" = yes && exec 6>/dev/null
1251
Guido van Rossum627b2d71993-12-24 10:39:16 +00001252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253ac_pwd=`pwd` && test -n "$ac_pwd" &&
1254ac_ls_di=`ls -di .` &&
1255ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001256 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001258 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259
1260
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261# Find the source files, if location was not specified.
1262if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 ac_confdir=`$as_dirname -- "$as_myself" ||
1266$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1267 X"$as_myself" : 'X\(//\)[^/]' \| \
1268 X"$as_myself" : 'X\(//\)$' \| \
1269 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1270$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)[^/].*/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\/\)$/{
1280 s//\1/
1281 q
1282 }
1283 /^X\(\/\).*/{
1284 s//\1/
1285 q
1286 }
1287 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290 srcdir=..
1291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292else
1293 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295if test ! -r "$srcdir/$ac_unique_file"; then
1296 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001297 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1300ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001301 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 pwd)`
1303# When building in place, set srcdir=.
1304if test "$ac_abs_confdir" = "$ac_pwd"; then
1305 srcdir=.
1306fi
1307# Remove unnecessary trailing slashes from srcdir.
1308# Double slashes in file names in object file debugging info
1309# mess up M-x gdb in Emacs.
1310case $srcdir in
1311*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1312esac
1313for ac_var in $ac_precious_vars; do
1314 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1315 eval ac_env_${ac_var}_value=\$${ac_var}
1316 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1317 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1318done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320#
1321# Report the --help message.
1322#
1323if test "$ac_init_help" = "long"; then
1324 # Omit some internal or obsolete options to make the list less imposing.
1325 # This message is too long to be a string in the A/UX 3.1 sh.
1326 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001327\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Usage: $0 [OPTION]... [VAR=VALUE]...
1330
1331To assign environment variables (e.g., CC, CFLAGS...), specify them as
1332VAR=VALUE. See below for descriptions of some of the useful variables.
1333
1334Defaults for the options are specified in brackets.
1335
1336Configuration:
1337 -h, --help display this help and exit
1338 --help=short display options specific to this package
1339 --help=recursive display the short help of all the included packages
1340 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001341 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001342 --cache-file=FILE cache test results in FILE [disabled]
1343 -C, --config-cache alias for \`--cache-file=config.cache'
1344 -n, --no-create do not create output files
1345 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1346
Martin v. Löwis11437992002-04-12 09:54:03 +00001347Installation directories:
1348 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001350 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001351 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353By default, \`make install' will install all the files in
1354\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1355an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1356for instance \`--prefix=\$HOME'.
1357
1358For better control, use the options below.
1359
1360Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001361 --bindir=DIR user executables [EPREFIX/bin]
1362 --sbindir=DIR system admin executables [EPREFIX/sbin]
1363 --libexecdir=DIR program executables [EPREFIX/libexec]
1364 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1365 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1366 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1367 --libdir=DIR object code libraries [EPREFIX/lib]
1368 --includedir=DIR C header files [PREFIX/include]
1369 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1370 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1371 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1372 --infodir=DIR info documentation [DATAROOTDIR/info]
1373 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1374 --mandir=DIR man documentation [DATAROOTDIR/man]
1375 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1376 --htmldir=DIR html documentation [DOCDIR]
1377 --dvidir=DIR dvi documentation [DOCDIR]
1378 --pdfdir=DIR pdf documentation [DOCDIR]
1379 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
1381
1382 cat <<\_ACEOF
1383_ACEOF
1384fi
1385
1386if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001387 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001388 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001389 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 cat <<\_ACEOF
1391
1392Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1395 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001396 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001397 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001398 --enable-framework[=INSTALLDIR]
1399 Build (MacOSX|Darwin) framework
1400 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001401 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001402 --enable-loadable-sqlite-extensions
1403 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001404 --enable-ipv6 Enable ipv6 (with ipv4) support
1405 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001406 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409Optional Packages:
1410 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1411 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001412 --with-universal-archs=ARCH
1413 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001414 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001415 --with-framework-name=FRAMEWORK
1416 specify an alternate name of the framework built
1417 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001419 --with-cxx-main=<compiler>
1420 compile main() and link python executable with C++
1421 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-suffix=.exe set executable suffix
1423 --with-pydebug build with Py_DEBUG defined
1424 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001425 --with-system-expat build pyexpat module using an installed expat
1426 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001427 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001428 --with-dbmliborder=db1:db2:...
1429 order to check db backends for dbm. Valid value is a
1430 colon separated string with the backend names
1431 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-signal-module disable/enable signal module
1433 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1434 --with(out)-threads[=DIRECTORY]
1435 disable/enable thread support
1436 --with(out)-thread[=DIRECTORY]
1437 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001439 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001441 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-fpectl enable SIGFPE catching
1443 --with-libm=STRING math library
1444 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001445 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001446 --with(out)-computed-gotos
1447 Use computed gotos in evaluation loop (enabled by
1448 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
1450Some influential environment variables:
1451 CC C compiler command
1452 CFLAGS C compiler flags
1453 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1454 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 CPP C preprocessor
1459
1460Use these variables to override the choices made by `configure' or to help
1461it to find libraries and programs with nonstandard names/locations.
1462
Georg Brandle2e15612009-05-20 18:25:10 +00001463Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001466fi
1467
1468if test "$ac_init_help" = "recursive"; then
1469 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 test -d "$ac_dir" ||
1472 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1473 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_builddir=.
1475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476case "$ac_dir" in
1477.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1478*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 case $ac_top_builddir_sub in
1483 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1485 esac ;;
1486esac
1487ac_abs_top_builddir=$ac_pwd
1488ac_abs_builddir=$ac_pwd$ac_dir_suffix
1489# for backward compatibility:
1490ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001491
1492case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 ac_top_srcdir=$ac_top_builddir_sub
1496 ac_abs_top_srcdir=$ac_pwd ;;
1497 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 ac_top_srcdir=$srcdir
1500 ac_abs_top_srcdir=$srcdir ;;
1501 *) # Relative name.
1502 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1503 ac_top_srcdir=$ac_top_build_prefix$srcdir
1504 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001505esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508 cd "$ac_dir" || { ac_status=$?; continue; }
1509 # Check for guested configure.
1510 if test -f "$ac_srcdir/configure.gnu"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1513 elif test -f "$ac_srcdir/configure"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 fi || ac_status=$?
1519 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 done
1521fi
1522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001524if $ac_init_version; then
1525 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001526python configure 3.2
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001527generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001529Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530This configure script is free software; the Free Software Foundation
1531gives unlimited permission to copy, distribute and modify it.
1532_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001535
1536## ------------------------ ##
1537## Autoconf initialization. ##
1538## ------------------------ ##
1539
1540# ac_fn_c_try_compile LINENO
1541# --------------------------
1542# Try to compile conftest.$ac_ext, and return whether this succeeded.
1543ac_fn_c_try_compile ()
1544{
1545 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1546 rm -f conftest.$ac_objext
1547 if { { ac_try="$ac_compile"
1548case "(($ac_try" in
1549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1550 *) ac_try_echo=$ac_try;;
1551esac
1552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1553$as_echo "$ac_try_echo"; } >&5
1554 (eval "$ac_compile") 2>conftest.err
1555 ac_status=$?
1556 if test -s conftest.err; then
1557 grep -v '^ *+' conftest.err >conftest.er1
1558 cat conftest.er1 >&5
1559 mv -f conftest.er1 conftest.err
1560 fi
1561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1562 test $ac_status = 0; } && {
1563 test -z "$ac_c_werror_flag" ||
1564 test ! -s conftest.err
1565 } && test -s conftest.$ac_objext; then :
1566 ac_retval=0
1567else
1568 $as_echo "$as_me: failed program was:" >&5
1569sed 's/^/| /' conftest.$ac_ext >&5
1570
1571 ac_retval=1
1572fi
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001573 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 as_fn_set_status $ac_retval
1575
1576} # ac_fn_c_try_compile
1577
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001578# ac_fn_c_try_link LINENO
1579# -----------------------
1580# Try to link conftest.$ac_ext, and return whether this succeeded.
1581ac_fn_c_try_link ()
1582{
1583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1584 rm -f conftest.$ac_objext conftest$ac_exeext
1585 if { { ac_try="$ac_link"
1586case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_link") 2>conftest.err
1593 ac_status=$?
1594 if test -s conftest.err; then
1595 grep -v '^ *+' conftest.err >conftest.er1
1596 cat conftest.er1 >&5
1597 mv -f conftest.er1 conftest.err
1598 fi
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; } && {
1601 test -z "$ac_c_werror_flag" ||
1602 test ! -s conftest.err
1603 } && test -s conftest$ac_exeext && {
1604 test "$cross_compiling" = yes ||
1605 $as_test_x conftest$ac_exeext
1606 }; then :
1607 ac_retval=0
1608else
1609 $as_echo "$as_me: failed program was:" >&5
1610sed 's/^/| /' conftest.$ac_ext >&5
1611
1612 ac_retval=1
1613fi
1614 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1615 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1616 # interfere with the next link command; also delete a directory that is
1617 # left behind by Apple's compiler. We do this before executing the actions.
1618 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001619 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001620 as_fn_set_status $ac_retval
1621
1622} # ac_fn_c_try_link
1623
Matthias Kloseb9621712010-04-24 17:59:49 +00001624# ac_fn_c_try_cpp LINENO
1625# ----------------------
1626# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1627ac_fn_c_try_cpp ()
1628{
1629 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1630 if { { ac_try="$ac_cpp conftest.$ac_ext"
1631case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634esac
1635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636$as_echo "$ac_try_echo"; } >&5
1637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001645 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001646 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 }; then :
1649 ac_retval=0
1650else
1651 $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654 ac_retval=1
1655fi
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001656 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001657 as_fn_set_status $ac_retval
1658
1659} # ac_fn_c_try_cpp
1660
1661# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1662# -------------------------------------------------------
1663# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1664# the include files in INCLUDES and setting the cache variable VAR
1665# accordingly.
1666ac_fn_c_check_header_mongrel ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001669 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001672if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 $as_echo_n "(cached) " >&6
1674fi
1675eval ac_res=\$$3
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1677$as_echo "$ac_res" >&6; }
1678else
1679 # Is the header compilable?
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1681$as_echo_n "checking $2 usability... " >&6; }
1682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1683/* end confdefs.h. */
1684$4
1685#include <$2>
1686_ACEOF
1687if ac_fn_c_try_compile "$LINENO"; then :
1688 ac_header_compiler=yes
1689else
1690 ac_header_compiler=no
1691fi
1692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1694$as_echo "$ac_header_compiler" >&6; }
1695
1696# Is the header present?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1698$as_echo_n "checking $2 presence... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701#include <$2>
1702_ACEOF
1703if ac_fn_c_try_cpp "$LINENO"; then :
1704 ac_header_preproc=yes
1705else
1706 ac_header_preproc=no
1707fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001708rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1710$as_echo "$ac_header_preproc" >&6; }
1711
1712# So? What about this header?
1713case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1714 yes:no: )
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1716$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1719 ;;
1720 no:yes:* )
1721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1722$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1724$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1726$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1728$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1730$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001731( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001732## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001733## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 ) | sed "s/^/$as_me: WARNING: /" >&2
1735 ;;
1736esac
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1738$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001739if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 $as_echo_n "(cached) " >&6
1741else
1742 eval "$3=\$ac_header_compiler"
1743fi
1744eval ac_res=\$$3
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746$as_echo "$ac_res" >&6; }
1747fi
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001749
1750} # ac_fn_c_check_header_mongrel
1751
1752# ac_fn_c_try_run LINENO
1753# ----------------------
1754# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1755# that executables *can* be run.
1756ac_fn_c_try_run ()
1757{
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759 if { { ac_try="$ac_link"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_link") 2>&5
1767 ac_status=$?
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1770 { { case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_try") 2>&5
1777 ac_status=$?
1778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1779 test $ac_status = 0; }; }; then :
1780 ac_retval=0
1781else
1782 $as_echo "$as_me: program exited with status $ac_status" >&5
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
1785
1786 ac_retval=$ac_status
1787fi
1788 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 as_fn_set_status $ac_retval
1791
1792} # ac_fn_c_try_run
1793
1794# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1795# -------------------------------------------------------
1796# Tests whether HEADER exists and can be compiled using the include files in
1797# INCLUDES, setting the cache variable VAR accordingly.
1798ac_fn_c_check_header_compile ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1802$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001803if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001804 $as_echo_n "(cached) " >&6
1805else
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_compile "$LINENO"; then :
1812 eval "$3=yes"
1813else
1814 eval "$3=no"
1815fi
1816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001822
1823} # ac_fn_c_check_header_compile
1824
Matthias Kloseb9621712010-04-24 17:59:49 +00001825# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1826# -------------------------------------------
1827# Tests whether TYPE exists after having included INCLUDES, setting cache
1828# variable VAR accordingly.
1829ac_fn_c_check_type ()
1830{
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1833$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001834if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001835 $as_echo_n "(cached) " >&6
1836else
1837 eval "$3=no"
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof ($2))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1852/* end confdefs.h. */
1853$4
1854int
1855main ()
1856{
1857if (sizeof (($2)))
1858 return 0;
1859 ;
1860 return 0;
1861}
1862_ACEOF
1863if ac_fn_c_try_compile "$LINENO"; then :
1864
1865else
1866 eval "$3=yes"
1867fi
1868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1869fi
1870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1871fi
1872eval ac_res=\$$3
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876
1877} # ac_fn_c_check_type
1878
1879# ac_fn_c_find_uintX_t LINENO BITS VAR
1880# ------------------------------------
1881# Finds an unsigned integer type with width BITS, setting cache variable VAR
1882# accordingly.
1883ac_fn_c_find_uintX_t ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1887$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001888if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 $as_echo_n "(cached) " >&6
1890else
1891 eval "$3=no"
1892 # Order is important - never check a type that is potentially smaller
1893 # than half of the expected target width.
1894 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1895 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$ac_includes_default
1899int
1900main ()
1901{
1902static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1903test_array [0] = 0
1904
1905 ;
1906 return 0;
1907}
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 case $ac_type in #(
1911 uint$2_t) :
1912 eval "$3=yes" ;; #(
1913 *) :
1914 eval "$3=\$ac_type" ;;
1915esac
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001918 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920else
1921 break
1922fi
1923 done
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_find_uintX_t
1931
1932# ac_fn_c_find_intX_t LINENO BITS VAR
1933# -----------------------------------
1934# Finds a signed integer type with width BITS, setting cache variable VAR
1935# accordingly.
1936ac_fn_c_find_intX_t ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1940$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 # Order is important - never check a type that is potentially smaller
1946 # than half of the expected target width.
1947 for ac_type in int$2_t 'int' 'long int' \
1948 'long long int' 'short int' 'signed char'; do
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001952 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001953int
1954main ()
1955{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001956static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001957test_array [0] = 0
1958
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001967 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001968int
1969main ()
1970{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001971static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001972 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1973test_array [0] = 0
1974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980
1981else
1982 case $ac_type in #(
1983 int$2_t) :
1984 eval "$3=yes" ;; #(
1985 *) :
1986 eval "$3=\$ac_type" ;;
1987esac
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994else
1995 break
1996fi
1997 done
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004} # ac_fn_c_find_intX_t
2005
2006# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2007# --------------------------------------------
2008# Tries to find the compile-time value of EXPR in a program that includes
2009# INCLUDES, setting VAR accordingly. Returns whether the value could be
2010# computed
2011ac_fn_c_compute_int ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 if test "$cross_compiling" = yes; then
2015 # Depending upon the size, compute the lo and hi bounds.
2016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) >= 0)];
2023test_array [0] = 0
2024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_lo=0 ac_mid=0
2031 while :; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2039test_array [0] = 0
2040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=$ac_mid; break
2047else
2048 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2049 if test $ac_lo -le $ac_mid; then
2050 ac_lo= ac_hi=
2051 break
2052 fi
2053 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 done
2057else
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) < 0)];
2065test_array [0] = 0
2066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=-1 ac_mid=-1
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2081test_array [0] = 0
2082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_lo=$ac_mid; break
2089else
2090 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2091 if test $ac_mid -le $ac_hi; then
2092 ac_lo= ac_hi=
2093 break
2094 fi
2095 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098 done
2099else
2100 ac_lo= ac_hi=
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103fi
2104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105# Binary search between lo and hi bounds.
2106while test "x$ac_lo" != "x$ac_hi"; do
2107 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115test_array [0] = 0
2116
2117 ;
2118 return 0;
2119}
2120_ACEOF
2121if ac_fn_c_try_compile "$LINENO"; then :
2122 ac_hi=$ac_mid
2123else
2124 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127done
2128case $ac_lo in #((
2129?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2130'') ac_retval=1 ;;
2131esac
2132 else
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136static long int longval () { return $2; }
2137static unsigned long int ulongval () { return $2; }
2138#include <stdio.h>
2139#include <stdlib.h>
2140int
2141main ()
2142{
2143
2144 FILE *f = fopen ("conftest.val", "w");
2145 if (! f)
2146 return 1;
2147 if (($2) < 0)
2148 {
2149 long int i = longval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%ld", i);
2153 }
2154 else
2155 {
2156 unsigned long int i = ulongval ();
2157 if (i != ($2))
2158 return 1;
2159 fprintf (f, "%lu", i);
2160 }
2161 /* Do not output a trailing newline, as this causes \r\n confusion
2162 on some platforms. */
2163 return ferror (f) || fclose (f) != 0;
2164
2165 ;
2166 return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_run "$LINENO"; then :
2170 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2171else
2172 ac_retval=1
2173fi
2174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2175 conftest.$ac_objext conftest.beam conftest.$ac_ext
2176rm -f conftest.val
2177
2178 fi
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002179 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 as_fn_set_status $ac_retval
2181
2182} # ac_fn_c_compute_int
2183
2184# ac_fn_c_check_func LINENO FUNC VAR
2185# ----------------------------------
2186# Tests whether FUNC exists, setting the cache variable VAR accordingly
2187ac_fn_c_check_func ()
2188{
2189 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191$as_echo_n "checking for $2... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002192if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002193 $as_echo_n "(cached) " >&6
2194else
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
2197/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2198 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2199#define $2 innocuous_$2
2200
2201/* System header to define __stub macros and hopefully few prototypes,
2202 which can conflict with char $2 (); below.
2203 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2204 <limits.h> exists even on freestanding compilers. */
2205
2206#ifdef __STDC__
2207# include <limits.h>
2208#else
2209# include <assert.h>
2210#endif
2211
2212#undef $2
2213
2214/* Override any GCC internal prototype to avoid an error.
2215 Use char because int might match the return type of a GCC
2216 builtin and then its argument prototype would still apply. */
2217#ifdef __cplusplus
2218extern "C"
2219#endif
2220char $2 ();
2221/* The GNU C library defines this for functions which it implements
2222 to always fail with ENOSYS. Some functions are actually named
2223 something starting with __ and the normal name is an alias. */
2224#if defined __stub_$2 || defined __stub___$2
2225choke me
2226#endif
2227
2228int
2229main ()
2230{
2231return $2 ();
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236if ac_fn_c_try_link "$LINENO"; then :
2237 eval "$3=yes"
2238else
2239 eval "$3=no"
2240fi
2241rm -f core conftest.err conftest.$ac_objext \
2242 conftest$ac_exeext conftest.$ac_ext
2243fi
2244eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002248
2249} # ac_fn_c_check_func
2250
2251# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2252# ----------------------------------------------------
2253# Tries to find if the field MEMBER exists in type AGGR, after including
2254# INCLUDES, setting cache variable VAR accordingly.
2255ac_fn_c_check_member ()
2256{
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2259$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002260if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002261 $as_echo_n "(cached) " >&6
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$5
2266int
2267main ()
2268{
2269static $2 ac_aggr;
2270if (ac_aggr.$3)
2271return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$4=yes"
2278else
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h. */
2281$5
2282int
2283main ()
2284{
2285static $2 ac_aggr;
2286if (sizeof ac_aggr.$3)
2287return 0;
2288 ;
2289 return 0;
2290}
2291_ACEOF
2292if ac_fn_c_try_compile "$LINENO"; then :
2293 eval "$4=yes"
2294else
2295 eval "$4=no"
2296fi
2297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300fi
2301eval ac_res=\$$4
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_member
2307
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
2310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2311# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002312ac_fn_c_check_decl ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002319if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002320 $as_echo_n "(cached) " >&6
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
2326main ()
2327{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002351
2352} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002354This file contains any messages produced by compilers while
2355running configure, to aid debugging if configure makes a mistake.
2356
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002357It was created by python $as_me 3.2, which was
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002358generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002359
2360 $ $0 $@
2361
2362_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002364{
2365cat <<_ASUNAME
2366## --------- ##
2367## Platform. ##
2368## --------- ##
2369
2370hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2371uname -m = `(uname -m) 2>/dev/null || echo unknown`
2372uname -r = `(uname -r) 2>/dev/null || echo unknown`
2373uname -s = `(uname -s) 2>/dev/null || echo unknown`
2374uname -v = `(uname -v) 2>/dev/null || echo unknown`
2375
2376/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2377/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2378
2379/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2380/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2381/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002383/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2384/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2385/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2386
2387_ASUNAME
2388
2389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2390for as_dir in $PATH
2391do
2392 IFS=$as_save_IFS
2393 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002394 $as_echo "PATH: $as_dir"
2395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398} >&5
2399
2400cat >&5 <<_ACEOF
2401
2402
2403## ----------- ##
2404## Core tests. ##
2405## ----------- ##
2406
2407_ACEOF
2408
2409
2410# Keep a trace of the command line.
2411# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002413# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002415ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002416ac_configure_args0=
2417ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002418ac_must_keep_next=false
2419for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002420do
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 for ac_arg
2422 do
2423 case $ac_arg in
2424 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2425 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2426 | -silent | --silent | --silen | --sile | --sil)
2427 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 esac
2431 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002436 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002438 case $ac_arg in
2439 *=* | --config-cache | -C | -disable-* | --disable-* \
2440 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2441 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2442 | -with-* | --with-* | -without-* | --without-* | --x)
2443 case "$ac_configure_args0 " in
2444 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2445 esac
2446 ;;
2447 -* ) ac_must_keep_next=true ;;
2448 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 ;;
2452 esac
2453 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002454done
Matthias Kloseb9621712010-04-24 17:59:49 +00002455{ ac_configure_args0=; unset ac_configure_args0;}
2456{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
2458# When interrupted or exit'd, cleanup temporary files, and complete
2459# config.log. We remove comments because anyway the quotes in there
2460# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461# WARNING: Use '\'' to represent an apostrophe within the trap.
2462# 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 +00002463trap 'exit_status=$?
2464 # Save into config.log some information that might help in debugging.
2465 {
2466 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002467
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002468 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002469## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002470## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 echo
2472 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473(
2474 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2475 eval ac_val=\$$ac_var
2476 case $ac_val in #(
2477 *${as_nl}*)
2478 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2480$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac
2482 case $ac_var in #(
2483 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002484 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2485 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac ;;
2487 esac
2488 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2491 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 "s/'\''/'\''\\\\'\'''\''/g;
2494 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2495 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002496 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002498 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac |
2500 sort
2501)
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002503
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002504 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002505## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002506## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_vars
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517
2518 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002519 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002521## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002522 echo
2523 for ac_var in $ac_subst_files
2524 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 eval ac_val=\$$ac_var
2526 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 done | sort
2531 echo
2532 fi
2533
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002535 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002536## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002537## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 fi
2542 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 $as_echo "$as_me: caught signal $ac_signal"
2544 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 rm -f core *.core core.conftest.* &&
2547 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002550for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002551 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
2553ac_signal=0
2554
2555# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558$as_echo "/* confdefs.h */" > confdefs.h
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560# Predefined preprocessor variables.
2561
2562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_NAME "$PACKAGE_NAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_VERSION "$PACKAGE_VERSION"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_STRING "$PACKAGE_STRING"
2576_ACEOF
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2580_ACEOF
2581
Matthias Kloseb9621712010-04-24 17:59:49 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_URL "$PACKAGE_URL"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
2587# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002588# Prefer an explicitly selected file to automatically selected ones.
2589ac_site_file1=NONE
2590ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002592 # We do not want a PATH search for config.site.
2593 case $CONFIG_SITE in #((
2594 -*) ac_site_file1=./$CONFIG_SITE;;
2595 */*) ac_site_file1=$CONFIG_SITE;;
2596 *) ac_site_file1=./$CONFIG_SITE;;
2597 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$prefix/share/config.site
2600 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601else
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 ac_site_file1=$ac_default_prefix/share/config.site
2603 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002605for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606do
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 test "x$ac_site_file" = xNONE && continue
2608 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2610$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002612 . "$ac_site_file" \
2613 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2615as_fn_error $? "failed to load site script $ac_site_file
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02002616See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617 fi
2618done
2619
2620if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 # Some versions of bash will fail to source /dev/null (special files
2622 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2623 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2624 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2625$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2628 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 esac
2630 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631else
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2633$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 >$cache_file
2635fi
2636
2637# Check that the precious variables saved in the cache have kept the same
2638# value.
2639ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2642 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2644 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 case $ac_old_set,$ac_new_set in
2646 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2648$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 +00002649 ac_cache_corrupted=: ;;
2650 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2652$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 ac_cache_corrupted=: ;;
2654 ,);;
2655 *)
2656 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 # differences in whitespace do not lead to failure.
2658 ac_old_val_w=`echo x $ac_old_val`
2659 ac_new_val_w=`echo x $ac_new_val`
2660 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2662$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2663 ac_cache_corrupted=:
2664 else
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2666$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2667 eval $ac_var=\$ac_old_val
2668 fi
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2670$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2672$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 fi;;
2674 esac
2675 # Pass precious variables to config.status.
2676 if test "$ac_new_set" = set; then
2677 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 *) ac_arg=$ac_var=$ac_new_val ;;
2680 esac
2681 case " $ac_configure_args " in
2682 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 esac
2685 fi
2686done
2687if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2691$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002692 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002694## -------------------- ##
2695## Main body of script. ##
2696## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697
Guido van Rossum7f43da71994-08-01 12:15:30 +00002698ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002703
Guido van Rossum627b2d71993-12-24 10:39:16 +00002704
Michael W. Hudson54241132001-12-07 15:38:26 +00002705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
2708
Martin v. Löwis11437992002-04-12 09:54:03 +00002709
Benjamin Petersond23f8222009-04-05 19:13:16 +00002710if test "$prefix" != "/"; then
2711 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2712fi
2713
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715
2716
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002717# We don't use PACKAGE_ variables, and they cause conflicts
2718# with other autoconf-based packages that include Python.h
2719grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2720rm confdefs.h
2721mv confdefs.h.new confdefs.h
2722
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002723
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002724VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002725
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002726# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002727
2728SOVERSION=1.0
2729
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002730# The later defininition of _XOPEN_SOURCE disables certain features
2731# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002734
2735
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002741
2742
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2745# them.
2746
Matthias Kloseb9621712010-04-24 17:59:49 +00002747$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002748
2749
Martin v. Löwisd6320502004-08-12 13:45:08 +00002750# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2751# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2752
Matthias Kloseb9621712010-04-24 17:59:49 +00002753$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002754
2755
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002756# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2757# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2758# them.
2759
Matthias Kloseb9621712010-04-24 17:59:49 +00002760$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002761
2762
2763
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002764define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002765
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002766# Arguments passed to configure.
2767
2768CONFIG_ARGS="$ac_configure_args"
2769
Matthias Kloseb9621712010-04-24 17:59:49 +00002770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2771$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002772# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002773if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 case $enableval in
2776 yes)
2777 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 if test ! -d "${enableval}"
2779 then
2780 enableval=/
2781 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002782 ;;
2783 esac
2784 case $enableval in
2785 no)
2786 UNIVERSALSDK=
2787 enable_universalsdk=
2788 ;;
2789 *)
2790 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791 if test ! -d "${UNIVERSALSDK}"
2792 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002793 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795 ;;
2796 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002798
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799else
2800
2801 UNIVERSALSDK=
2802 enable_universalsdk=
2803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002805
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002806if test -n "${UNIVERSALSDK}"
2807then
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2809$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002810else
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2812$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002813fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002815
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002816
2817
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002819
Matthias Kloseb9621712010-04-24 17:59:49 +00002820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2821$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002822
2823# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002824if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002825 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2827$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002828 UNIVERSAL_ARCHS="$withval"
2829
2830else
2831
Matthias Kloseb9621712010-04-24 17:59:49 +00002832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2833$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002834
2835fi
2836
2837
2838
2839
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002840
2841# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002842if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002843 withval=$with_framework_name;
2844 PYTHONFRAMEWORK=${withval}
2845 PYTHONFRAMEWORKDIR=${withval}.framework
2846 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2847
2848else
2849
2850 PYTHONFRAMEWORK=Python
2851 PYTHONFRAMEWORKDIR=Python.framework
2852 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2853
2854fi
2855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002856# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002857if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002859 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002861 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 esac
2863 case $enableval in
2864 no)
2865 PYTHONFRAMEWORK=
2866 PYTHONFRAMEWORKDIR=no-framework
2867 PYTHONFRAMEWORKPREFIX=
2868 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869 FRAMEWORKINSTALLFIRST=
2870 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002871 FRAMEWORKALTINSTALLFIRST=
2872 FRAMEWORKALTINSTALLLAST=
2873 if test "x${prefix}" = "xNONE"; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2875 else
2876 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2877 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002879 ;;
2880 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002881 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002882 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002883 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002884 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002885 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2886 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002888
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002889 if test "x${prefix}" = "xNONE" ; then
2890 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002891
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002892 else
2893 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2894 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002895
2896 case "${enableval}" in
2897 /System*)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 if test "${prefix}" = "NONE" ; then
2900 # See below
2901 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2902 fi
2903 ;;
2904
2905 /Library*)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908
2909 */Library/Frameworks)
2910 MDIR="`dirname "${enableval}"`"
2911 MDIR="`dirname "${MDIR}"`"
2912 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2913
2914 if test "${prefix}" = "NONE"; then
2915 # User hasn't specified the
2916 # --prefix option, but wants to install
2917 # the framework in a non-default location,
2918 # ensure that the compatibility links get
2919 # installed relative to that prefix as well
2920 # instead of in /usr/local.
2921 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2922 fi
2923 ;;
2924
2925 *)
2926 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2927 ;;
2928 esac
2929
Jack Jansen127e56e2001-09-11 14:41:54 +00002930 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002932 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002933 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002938 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2939
2940 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Guido van Rossum563e7081996-09-10 18:20:48 +00002944else
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Jack Jansene578a632001-08-15 01:27:14 +00002946 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002947 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002948 PYTHONFRAMEWORKPREFIX=
2949 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002950 FRAMEWORKINSTALLFIRST=
2951 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952 FRAMEWORKALTINSTALLFIRST=
2953 FRAMEWORKALTINSTALLLAST=
2954 if test "x${prefix}" = "xNONE" ; then
2955 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2956 else
2957 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2958 fi
Jack Jansene578a632001-08-15 01:27:14 +00002959 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962fi
2963
Thomas Wouters477c8d52006-05-27 19:21:47 +00002964
2965
Michael W. Hudson54241132001-12-07 15:38:26 +00002966
2967
2968
2969
Jack Jansene578a632001-08-15 01:27:14 +00002970
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002971
2972
2973
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002974
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002975
Jack Jansene578a632001-08-15 01:27:14 +00002976##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002977## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002978## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002979##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002980# Set name for machine-dependent library files
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2983$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984if test -z "$MACHDEP"
2985then
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002987 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002988 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_md_system=`echo $ac_sys_system |
2994 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2995 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002996 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002997 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002998
Guido van Rossum07397971997-04-29 21:49:50 +00002999 case $MACHDEP in
Victor Stinner4cf66042011-08-20 14:01:05 +02003000 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003001 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003002 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003003 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003004 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003005 esac
3006fi
Guido van Rossum91922671997-10-09 20:24:13 +00003007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3009# disable features if it is defined, without any means to access these
3010# features as extensions. For these systems, we skip the definition of
3011# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3012# some feature, make sure there is no alternative way to access this
3013# feature. Also, when using wildcards, make sure you have verified the
3014# need for not defining _XOPEN_SOURCE on all systems matching the
3015# wildcard, and that the wildcard does not include future systems
3016# (which may remove their limitations).
3017case $ac_sys_system/$ac_sys_release in
3018 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3019 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003020 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003021 # In addition, Stefan Krah confirms that issue #1244610 exists through
3022 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003023 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003024 define_xopen_source=no
3025 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3026 # also defined. This can be overridden by defining _BSD_SOURCE
3027 # As this has a different meaning on Linux, only define it on OpenBSD
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003030
3031 ;;
Charles-François Natalibeed47e2011-07-22 23:48:44 +02003032 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003033 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3034 # also defined. This can be overridden by defining _BSD_SOURCE
3035 # As this has a different meaning on Linux, only define it on OpenBSD
3036
Matthias Kloseb9621712010-04-24 17:59:49 +00003037$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003038
3039 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3042 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003043 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 +00003044 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003045 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3046 # request to enable features supported by the standard as a request
3047 # to disable features not supported by the standard. The best way
3048 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3049 # entirely and define __EXTENSIONS__ instead.
3050 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003051 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003052 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3053 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003054 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003055 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003056 define_xopen_source=no;;
3057 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003058 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003059 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003060 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003061 # On FreeBSD 4, the math functions C89 does not cover are never defined
3062 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3063 FreeBSD/4.*)
3064 define_xopen_source=no;;
3065 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3066 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3067 # identifies itself as Darwin/7.*
3068 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3069 # disables platform specific features beyond repair.
3070 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3071 # has no effect, don't bother defining them
3072 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003073 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003074 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003075 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003076 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3077 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3078 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003079 AIX/4)
3080 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003081 AIX/5)
3082 if test `uname -r` -eq 1; then
3083 define_xopen_source=no
3084 fi
3085 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003086 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3087 # defining NI_NUMERICHOST.
3088 QNX/6.3.2)
3089 define_xopen_source=no
3090 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092esac
3093
3094if test $define_xopen_source = yes
3095then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3101 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3102 # several APIs are not declared. Since this is also needed in some
3103 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
3107
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003110
3111
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003112fi
3113
Guido van Rossum91922671997-10-09 20:24:13 +00003114#
3115# SGI compilers allow the specification of the both the ABI and the
3116# ISA on the command line. Depending on the values of these switches,
3117# different and often incompatable code will be generated.
3118#
3119# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3120# thus supply support for various ABI/ISA combinations. The MACHDEP
3121# variable is also adjusted.
3122#
3123
3124if test ! -z "$SGI_ABI"
3125then
3126 CC="cc $SGI_ABI"
3127 LDFLAGS="$SGI_ABI $LDFLAGS"
3128 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3131$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003132
Jack Jansen6b08a402004-06-03 12:41:45 +00003133# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3134# it may influence the way we can build extensions, so distutils
3135# needs to check it
3136
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137
Jack Jansen6b08a402004-06-03 12:41:45 +00003138CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003140
Matthias Kloseb9621712010-04-24 17:59:49 +00003141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3142$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003143ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3145$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003146
Guido van Rossum627b2d71993-12-24 10:39:16 +00003147# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003148
3149# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3150# for debug/optimization stuff. BASECFLAGS is for flags that are required
3151# just to get things to compile and link. Users are free to override OPT
3152# when running configure or make. The build should not break if they do.
3153# BASECFLAGS should generally not be messed with, however.
3154
3155# XXX shouldn't some/most/all of this code be merged with the stuff later
3156# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3158$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003161if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003163 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003164 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003165 without_gcc=yes;;
3166 yes) CC=gcc
3167 without_gcc=no;;
3168 *) CC=$withval
3169 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003170 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003171else
Martin v. Löwis11437992002-04-12 09:54:03 +00003172
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003173 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003174 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003175 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003176 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178fi
3179
Matthias Kloseb9621712010-04-24 17:59:49 +00003180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3181$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003182
Guido van Rossum8b131c51995-03-09 14:10:13 +00003183# If the user switches compilers, we can't believe the cache
3184if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3185then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003186 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003187(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003188fi
3189
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003190# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3191# when the compiler supports them, but we don't always want -O2, and
3192# we set -g later.
3193if test -z "$CFLAGS"; then
3194 CFLAGS=
3195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003196ac_ext=c
3197ac_cpp='$CPP $CPPFLAGS'
3198ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3199ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3200ac_compiler_gnu=$ac_cv_c_compiler_gnu
3201if test -n "$ac_tool_prefix"; then
3202 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3203set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3205$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003206if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003208else
3209 if test -n "$CC"; then
3210 ac_cv_prog_CC="$CC" # Let the user override the test.
3211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3213for as_dir in $PATH
3214do
3215 IFS=$as_save_IFS
3216 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 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 +00003219 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 $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 +00003221 break 2
3222 fi
3223done
Matthias Kloseb9621712010-04-24 17:59:49 +00003224 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Jack Jansendd19cf82001-12-06 22:36:17 +00003227fi
3228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003229CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003230if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3232$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003233else
Matthias Kloseb9621712010-04-24 17:59:49 +00003234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3235$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003236fi
3237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238
Martin v. Löwis11437992002-04-12 09:54:03 +00003239fi
3240if test -z "$ac_cv_prog_CC"; then
3241 ac_ct_CC=$CC
3242 # Extract the first word of "gcc", so it can be a program name with args.
3243set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3245$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003246if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003248else
3249 if test -n "$ac_ct_CC"; then
3250 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3251else
3252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3253for as_dir in $PATH
3254do
3255 IFS=$as_save_IFS
3256 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 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 +00003259 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 $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 +00003261 break 2
3262 fi
3263done
Matthias Kloseb9621712010-04-24 17:59:49 +00003264 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
3267fi
3268fi
3269ac_ct_CC=$ac_cv_prog_ac_ct_CC
3270if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3272$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003273else
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3275$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003276fi
3277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 if test "x$ac_ct_CC" = x; then
3279 CC=""
3280 else
3281 case $cross_compiling:$ac_tool_warned in
3282yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285ac_tool_warned=yes ;;
3286esac
3287 CC=$ac_ct_CC
3288 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003289else
3290 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003291fi
3292
Jack Jansendd19cf82001-12-06 22:36:17 +00003293if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294 if test -n "$ac_tool_prefix"; then
3295 # 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 +00003296set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3298$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003299if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003301else
3302 if test -n "$CC"; then
3303 ac_cv_prog_CC="$CC" # Let the user override the test.
3304else
Martin v. Löwis11437992002-04-12 09:54:03 +00003305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3306for as_dir in $PATH
3307do
3308 IFS=$as_save_IFS
3309 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 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 +00003312 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 $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 +00003314 break 2
3315 fi
3316done
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003318IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003319
3320fi
3321fi
3322CC=$ac_cv_prog_CC
3323if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3325$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003326else
Matthias Kloseb9621712010-04-24 17:59:49 +00003327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3328$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003329fi
3330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003333fi
3334if test -z "$CC"; then
3335 # Extract the first word of "cc", so it can be a program name with args.
3336set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3338$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003339if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003340 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003341else
3342 if test -n "$CC"; then
3343 ac_cv_prog_CC="$CC" # Let the user override the test.
3344else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003351 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003352 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 +00003353 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3354 ac_prog_rejected=yes
3355 continue
3356 fi
3357 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003358 $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 +00003359 break 2
3360 fi
3361done
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003364
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365if test $ac_prog_rejected = yes; then
3366 # We found a bogon in the path, so make sure we never use it.
3367 set dummy $ac_cv_prog_CC
3368 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370 # We chose a different compiler from the bogus one.
3371 # However, it has the same basename, so the bogon will be chosen
3372 # first if we set CC to just the basename; use the full file name.
3373 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003374 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375 fi
3376fi
3377fi
3378fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003380if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3382$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383else
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003386fi
3387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388
Martin v. Löwis11437992002-04-12 09:54:03 +00003389fi
3390if test -z "$CC"; then
3391 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 do
3394 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3395set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003398if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003400else
3401 if test -n "$CC"; then
3402 ac_cv_prog_CC="$CC" # Let the user override the test.
3403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405for as_dir in $PATH
3406do
3407 IFS=$as_save_IFS
3408 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410 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 +00003411 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $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 +00003413 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
3419fi
3420fi
3421CC=$ac_cv_prog_CC
3422if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3424$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003425else
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3427$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003428fi
3429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 test -n "$CC" && break
3432 done
3433fi
3434if test -z "$CC"; then
3435 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003437do
3438 # Extract the first word of "$ac_prog", so it can be a program name with args.
3439set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3441$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003442if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003444else
3445 if test -n "$ac_ct_CC"; then
3446 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3447else
3448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454 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 +00003455 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 $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 +00003457 break 2
3458 fi
3459done
Matthias Kloseb9621712010-04-24 17:59:49 +00003460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003462
Martin v. Löwis11437992002-04-12 09:54:03 +00003463fi
3464fi
3465ac_ct_CC=$ac_cv_prog_ac_ct_CC
3466if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3468$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469else
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3471$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 test -n "$ac_ct_CC" && break
3476done
Michael W. Hudson54241132001-12-07 15:38:26 +00003477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 if test "x$ac_ct_CC" = x; then
3479 CC=""
3480 else
3481 case $cross_compiling:$ac_tool_warned in
3482yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3484$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485ac_tool_warned=yes ;;
3486esac
3487 CC=$ac_ct_CC
3488 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003489fi
3490
3491fi
3492
3493
Matthias Kloseb9621712010-04-24 17:59:49 +00003494test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003496as_fn_error $? "no acceptable C compiler found in \$PATH
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003497See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003498
3499# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003500$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3501set X $ac_compile
3502ac_compiler=$2
3503for ac_option in --version -v -V -qversion; do
3504 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003505case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;;
3508esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003509eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3510$as_echo "$ac_try_echo"; } >&5
3511 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 if test -s conftest.err; then
3514 sed '10a\
3515... rest of stderr output deleted ...
3516 10q' conftest.err >conftest.er1
3517 cat conftest.er1 >&5
3518 fi
3519 rm -f conftest.er1 conftest.err
3520 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521 test $ac_status = 0; }
3522done
Martin v. Löwis11437992002-04-12 09:54:03 +00003523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003525/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003526
Martin v. Löwis11437992002-04-12 09:54:03 +00003527int
3528main ()
3529{
3530
3531 ;
3532 return 0;
3533}
3534_ACEOF
3535ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003536ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003537# Try to create an executable without -o first, disregard a.out.
3538# It will help us diagnose broken compilers, and finding out an intuition
3539# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3541$as_echo_n "checking whether the C compiler works... " >&6; }
3542ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3543
3544# The possible output files:
3545ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547ac_rmfiles=
3548for ac_file in $ac_files
3549do
3550 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3553 esac
3554done
3555rm -f $ac_rmfiles
3556
Matthias Kloseb9621712010-04-24 17:59:49 +00003557if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558case "(($ac_try" in
3559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560 *) ac_try_echo=$ac_try;;
3561esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3563$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3567 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3569# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3570# in a Makefile. We should not override ac_cv_exeext if it was cached,
3571# so that the user can short-circuit this test for compilers unknown to
3572# Autoconf.
3573for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003574do
3575 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003578 ;;
3579 [ab].out )
3580 # We found the default executable, but exeext='' is most
3581 # certainly right.
3582 break;;
3583 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585 then :; else
3586 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3587 fi
3588 # We set ac_cv_exeext here because the later test for it is not
3589 # safe: cross compilers may not add the suffix if given an `-o'
3590 # argument, so we may need to know it at that point already.
3591 # Even if this section looks crufty: it has the advantage of
3592 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593 break;;
3594 * )
3595 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 esac
3597done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598test "$ac_cv_exeext" = no && ac_cv_exeext=
3599
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003600else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601 ac_file=''
3602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603if test -z "$ac_file"; then :
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605$as_echo "no" >&6; }
3606$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003607sed 's/^/| /' conftest.$ac_ext >&5
3608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003611as_fn_error 77 "C compiler cannot create executables
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003612See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003613else
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3615$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3618$as_echo_n "checking for C compiler default output file name... " >&6; }
3619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3620$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622
Matthias Kloseb9621712010-04-24 17:59:49 +00003623rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3626$as_echo_n "checking for suffix of executables... " >&6; }
3627if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628case "(($ac_try" in
3629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3630 *) ac_try_echo=$ac_try;;
3631esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3633$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3637 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003638 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3639# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3640# work properly (i.e., refer to `conftest.exe'), while it won't with
3641# `rm'.
3642for ac_file in conftest.exe conftest conftest.*; do
3643 test -f "$ac_file" || continue
3644 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003646 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3647 break;;
3648 * ) break;;
3649 esac
3650done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003654as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003655See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657rm -f conftest conftest$ac_cv_exeext
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3659$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003660
3661rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003662EXEEXT=$ac_cv_exeext
3663ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3665/* end confdefs.h. */
3666#include <stdio.h>
3667int
3668main ()
3669{
3670FILE *f = fopen ("conftest.out", "w");
3671 return ferror (f) || fclose (f) != 0;
3672
3673 ;
3674 return 0;
3675}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003677ac_clean_files="$ac_clean_files conftest.out"
3678# Check that the compiler produces executables we can run. If not, either
3679# the compiler is broken, or we cross compile.
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3681$as_echo_n "checking whether we are cross compiling... " >&6; }
3682if test "$cross_compiling" != yes; then
3683 { { ac_try="$ac_link"
3684case "(($ac_try" in
3685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3686 *) ac_try_echo=$ac_try;;
3687esac
3688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3689$as_echo "$ac_try_echo"; } >&5
3690 (eval "$ac_link") 2>&5
3691 ac_status=$?
3692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3693 test $ac_status = 0; }
3694 if { ac_try='./conftest$ac_cv_exeext'
3695 { { case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
3699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3700$as_echo "$ac_try_echo"; } >&5
3701 (eval "$ac_try") 2>&5
3702 ac_status=$?
3703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3704 test $ac_status = 0; }; }; then
3705 cross_compiling=no
3706 else
3707 if test "$cross_compiling" = maybe; then
3708 cross_compiling=yes
3709 else
3710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003712as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003713If you meant to cross compile, use \`--host'.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003714See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 fi
3716 fi
3717fi
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3719$as_echo "$cross_compiling" >&6; }
3720
3721rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3722ac_clean_files=$ac_clean_files_save
3723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3724$as_echo_n "checking for suffix of object files... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003725if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $as_echo_n "(cached) " >&6
3727else
3728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003729/* end confdefs.h. */
3730
3731int
3732main ()
3733{
3734
3735 ;
3736 return 0;
3737}
3738_ACEOF
3739rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003740if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;;
3744esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003745eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3746$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3750 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 for ac_file in conftest.o conftest.obj conftest.*; do
3752 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3756 break;;
3757 esac
3758done
3759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003761sed 's/^/| /' conftest.$ac_ext >&5
3762
Matthias Kloseb9621712010-04-24 17:59:49 +00003763{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003765as_fn_error $? "cannot compute suffix of object files: cannot compile
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003766See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003768rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3771$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003772OBJEXT=$ac_cv_objext
3773ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3775$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003776if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003778else
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782int
3783main ()
3784{
3785#ifndef __GNUC__
3786 choke me
3787#endif
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 ac_compiler_gnu=yes
3795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003799ac_cv_c_compiler_gnu=$ac_compiler_gnu
3800
3801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3803$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3804if test $ac_compiler_gnu = yes; then
3805 GCC=yes
3806else
3807 GCC=
3808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809ac_test_CFLAGS=${CFLAGS+set}
3810ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3812$as_echo_n "checking whether $CC accepts -g... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003813if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 ac_save_c_werror_flag=$ac_c_werror_flag
3817 ac_c_werror_flag=yes
3818 ac_cv_prog_cc_g=no
3819 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823int
3824main ()
3825{
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003832 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 CFLAGS=""
3835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Matthias Kloseb9621712010-04-24 17:59:49 +00003848else
3849 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852/* end confdefs.h. */
3853
3854int
3855main ()
3856{
3857
3858 ;
3859 return 0;
3860}
3861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003862if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3870 ac_c_werror_flag=$ac_save_c_werror_flag
3871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3873$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003874if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876elif test $ac_cv_prog_cc_g = yes; then
3877 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003878 CFLAGS="-g -O2"
3879 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003880 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881 fi
3882else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003883 if test "$GCC" = yes; then
3884 CFLAGS="-O2"
3885 else
3886 CFLAGS=
3887 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3890$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02003891if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003893else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003895ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003897/* end confdefs.h. */
3898#include <stdarg.h>
3899#include <stdio.h>
3900#include <sys/types.h>
3901#include <sys/stat.h>
3902/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3903struct buf { int x; };
3904FILE * (*rcsopen) (struct buf *, struct stat *, int);
3905static char *e (p, i)
3906 char **p;
3907 int i;
3908{
3909 return p[i];
3910}
3911static char *f (char * (*g) (char **, int), char **p, ...)
3912{
3913 char *s;
3914 va_list v;
3915 va_start (v,p);
3916 s = g (p, va_arg (v,int));
3917 va_end (v);
3918 return s;
3919}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003920
3921/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3922 function prototypes and stuff, but not '\xHH' hex character constants.
3923 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003925 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3926 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003928int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3931 inside strings and character constants. */
3932#define FOO(x) 'x'
3933int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3934
Skip Montanaro6dead952003-09-25 14:50:04 +00003935int test (int i, double x);
3936struct s1 {int (*f) (int a);};
3937struct s2 {int (*f) (double a);};
3938int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3939int argc;
3940char **argv;
3941int
3942main ()
3943{
3944return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3945 ;
3946 return 0;
3947}
3948_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3950 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956rm -f core conftest.err conftest.$ac_objext
3957 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003958done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003960CC=$ac_save_CC
3961
3962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963# AC_CACHE_VAL
3964case "x$ac_cv_prog_cc_c89" in
3965 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3967$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3970$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003971 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3974$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003975esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003976if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003979
Martin v. Löwis11437992002-04-12 09:54:03 +00003980ac_ext=c
3981ac_cpp='$CPP $CPPFLAGS'
3982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3984ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003986
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003987
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3990$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003993if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003995
3996 case $withval in
3997 no) with_cxx_main=no
3998 MAINCC='$(CC)';;
3999 yes) with_cxx_main=yes
4000 MAINCC='$(CXX)';;
4001 *) with_cxx_main=yes
4002 MAINCC=$withval
4003 if test -z "$CXX"
4004 then
4005 CXX=$withval
4006 fi;;
4007 esac
4008else
4009
4010 with_cxx_main=no
4011 MAINCC='$(CC)'
4012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013fi
4014
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4016$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017
4018preset_cxx="$CXX"
4019if test -z "$CXX"
4020then
4021 case "$CC" in
4022 gcc) # Extract the first word of "g++", so it can be a program name with args.
4023set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4025$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004026if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028else
4029 case $CXX in
4030 [\\/]* | ?:[\\/]*)
4031 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4032 ;;
4033 *)
4034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035for as_dir in notfound
4036do
4037 IFS=$as_save_IFS
4038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 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 +00004041 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043 break 2
4044 fi
4045done
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048
4049 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4050 ;;
4051esac
4052fi
4053CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004054if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4056$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004057else
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062 ;;
4063 cc) # Extract the first word of "c++", so it can be a program name with args.
4064set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004067if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069else
4070 case $CXX in
4071 [\\/]* | ?:[\\/]*)
4072 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4073 ;;
4074 *)
4075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in notfound
4077do
4078 IFS=$as_save_IFS
4079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081 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 +00004082 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004084 break 2
4085 fi
4086done
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089
4090 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4091 ;;
4092esac
4093fi
4094CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004095if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4097$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103 ;;
4104 esac
4105 if test "$CXX" = "notfound"
4106 then
4107 CXX=""
4108 fi
4109fi
4110if test -z "$CXX"
4111then
4112 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4113do
4114 # Extract the first word of "$ac_prog", so it can be a program name with args.
4115set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004118if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004120else
4121 if test -n "$CXX"; then
4122 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4123else
4124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 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 +00004131 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004133 break 2
4134 fi
4135done
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138
4139fi
4140fi
4141CXX=$ac_cv_prog_CXX
4142if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4144$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4147$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148fi
4149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004151 test -n "$CXX" && break
4152done
4153test -n "$CXX" || CXX="notfound"
4154
4155 if test "$CXX" = "notfound"
4156 then
4157 CXX=""
4158 fi
4159fi
4160if test "$preset_cxx" != "$CXX"
4161then
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004163
4164 By default, distutils will build C++ extension modules with \"$CXX\".
4165 If this is not intended, then set CXX on the configure command line.
4166 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004167$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004168
4169 By default, distutils will build C++ extension modules with \"$CXX\".
4170 If this is not intended, then set CXX on the configure command line.
4171 " >&2;}
4172fi
4173
4174
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4176$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4177save_LDFLAGS="$LDFLAGS"
4178LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004179
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4181/* end confdefs.h. */
4182
4183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
4191if ac_fn_c_try_link "$LINENO"; then :
4192 NO_AS_NEEDED="-Wl,--no-as-needed"
4193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4194$as_echo "yes" >&6; }
4195else
4196 NO_AS_NEEDED=""
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4198$as_echo "no" >&6; }
4199fi
4200rm -f core conftest.err conftest.$ac_objext \
4201 conftest$ac_exeext conftest.$ac_ext
4202LDFLAGS="$save_LDFLAGS"
4203
4204
4205
4206# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_ext=c
4208ac_cpp='$CPP $CPPFLAGS'
4209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4213$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004214# On Suns, sometimes $CPP names a directory.
4215if test -n "$CPP" && test -d "$CPP"; then
4216 CPP=
4217fi
4218if test -z "$CPP"; then
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004219 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004221else
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Double quotes because CPP needs to be expanded
4223 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4224 do
4225 ac_preproc_ok=false
4226for ac_c_preproc_warn_flag in '' yes
4227do
4228 # Use a header file that comes with gcc, so configuring glibc
4229 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004230 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4231 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004232 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
4236#ifdef __STDC__
4237# include <limits.h>
4238#else
4239# include <assert.h>
4240#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004241 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004244
Matthias Kloseb9621712010-04-24 17:59:49 +00004245else
Martin v. Löwis11437992002-04-12 09:54:03 +00004246 # Broken: fails on valid input.
4247continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004248fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004249rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004255#include <ac_nonexistent.h>
4256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004257if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Broken: success on invalid input.
4259continue
4260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Passes both tests.
4262ac_preproc_ok=:
4263break
4264fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004265rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004266
4267done
4268# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004269rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 break
4272fi
4273
4274 done
4275 ac_cv_prog_CPP=$CPP
4276
4277fi
4278 CPP=$ac_cv_prog_CPP
4279else
4280 ac_cv_prog_CPP=$CPP
4281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4283$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004284ac_preproc_ok=false
4285for ac_c_preproc_warn_flag in '' yes
4286do
4287 # Use a header file that comes with gcc, so configuring glibc
4288 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004289 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4290 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 # On the NeXT, cc -E runs the code through the compiler's parser,
4292 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294/* end confdefs.h. */
4295#ifdef __STDC__
4296# include <limits.h>
4297#else
4298# include <assert.h>
4299#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004303
Matthias Kloseb9621712010-04-24 17:59:49 +00004304else
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # Broken: fails on valid input.
4306continue
4307fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004308rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004314#include <ac_nonexistent.h>
4315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # Broken: success on invalid input.
4318continue
4319else
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 # Passes both tests.
4321ac_preproc_ok=:
4322break
4323fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004324rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004325
4326done
4327# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004328rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004329if $ac_preproc_ok; then :
4330
Martin v. Löwis11437992002-04-12 09:54:03 +00004331else
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004334as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004335See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004336fi
4337
4338ac_ext=c
4339ac_cpp='$CPP $CPPFLAGS'
4340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4342ac_compiler_gnu=$ac_cv_c_compiler_gnu
4343
4344
Matthias Kloseb9621712010-04-24 17:59:49 +00004345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4346$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004347if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004349else
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 # Loop through the user's path and test for each of PROGNAME-LIST
4353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4355do
4356 IFS=$as_save_IFS
4357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 for ac_prog in grep ggrep; do
4359 for ac_exec_ext in '' $ac_executable_extensions; do
4360 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4361 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4362# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 # Check for GNU $ac_path_GREP
4364case `"$ac_path_GREP" --version 2>&1` in
4365*GNU*)
4366 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4367*)
4368 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 while :
4371 do
4372 cat "conftest.in" "conftest.in" >"conftest.tmp"
4373 mv "conftest.tmp" "conftest.in"
4374 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4377 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004378 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4380 # Best one so far, save it but keep looking for a better one
4381 ac_cv_path_GREP="$ac_path_GREP"
4382 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004383 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 # 10*(2^10) chars as input seems more than enough
4385 test $ac_count -gt 10 && break
4386 done
4387 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4388esac
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 $ac_path_GREP_found && break 3
4391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004396 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 +00004397 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398else
4399 ac_cv_path_GREP=$GREP
4400fi
4401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4404$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 GREP="$ac_cv_path_GREP"
4406
4407
Matthias Kloseb9621712010-04-24 17:59:49 +00004408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4409$as_echo_n "checking for egrep... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004410if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412else
4413 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4414 then ac_cv_path_EGREP="$GREP -E"
4415 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 # Loop through the user's path and test for each of PROGNAME-LIST
4419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4421do
4422 IFS=$as_save_IFS
4423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 for ac_prog in egrep; do
4425 for ac_exec_ext in '' $ac_executable_extensions; do
4426 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4427 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4428# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 # Check for GNU $ac_path_EGREP
4430case `"$ac_path_EGREP" --version 2>&1` in
4431*GNU*)
4432 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4433*)
4434 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 while :
4437 do
4438 cat "conftest.in" "conftest.in" >"conftest.tmp"
4439 mv "conftest.tmp" "conftest.in"
4440 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4443 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004445 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4446 # Best one so far, save it but keep looking for a better one
4447 ac_cv_path_EGREP="$ac_path_EGREP"
4448 ac_path_EGREP_max=$ac_count
4449 fi
4450 # 10*(2^10) chars as input seems more than enough
4451 test $ac_count -gt 10 && break
4452 done
4453 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4454esac
4455
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $ac_path_EGREP_found && break 3
4457 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004462 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 +00004463 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464else
4465 ac_cv_path_EGREP=$EGREP
4466fi
4467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004468 fi
4469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4471$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004473
4474
Matthias Kloseb9621712010-04-24 17:59:49 +00004475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4476$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004477if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 $as_echo_n "(cached) " >&6
4479else
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004481/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004482#include <stdlib.h>
4483#include <stdarg.h>
4484#include <string.h>
4485#include <float.h>
4486
4487int
4488main ()
4489{
4490
4491 ;
4492 return 0;
4493}
4494_ACEOF
4495if ac_fn_c_try_compile "$LINENO"; then :
4496 ac_cv_header_stdc=yes
4497else
4498 ac_cv_header_stdc=no
4499fi
4500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4501
4502if test $ac_cv_header_stdc = yes; then
4503 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004507
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004508_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004511
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004512else
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004515rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004516
Matthias Kloseb9621712010-04-24 17:59:49 +00004517fi
4518
4519if test $ac_cv_header_stdc = yes; then
4520 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4522/* end confdefs.h. */
4523#include <stdlib.h>
4524
4525_ACEOF
4526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4527 $EGREP "free" >/dev/null 2>&1; then :
4528
4529else
4530 ac_cv_header_stdc=no
4531fi
4532rm -f conftest*
4533
4534fi
4535
4536if test $ac_cv_header_stdc = yes; then
4537 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4538 if test "$cross_compiling" = yes; then :
4539 :
4540else
4541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4542/* end confdefs.h. */
4543#include <ctype.h>
4544#include <stdlib.h>
4545#if ((' ' & 0x0FF) == 0x020)
4546# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4547# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4548#else
4549# define ISLOWER(c) \
4550 (('a' <= (c) && (c) <= 'i') \
4551 || ('j' <= (c) && (c) <= 'r') \
4552 || ('s' <= (c) && (c) <= 'z'))
4553# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4554#endif
4555
4556#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4557int
4558main ()
4559{
4560 int i;
4561 for (i = 0; i < 256; i++)
4562 if (XOR (islower (i), ISLOWER (i))
4563 || toupper (i) != TOUPPER (i))
4564 return 2;
4565 return 0;
4566}
4567_ACEOF
4568if ac_fn_c_try_run "$LINENO"; then :
4569
4570else
4571 ac_cv_header_stdc=no
4572fi
4573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4574 conftest.$ac_objext conftest.beam conftest.$ac_ext
4575fi
4576
4577fi
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4580$as_echo "$ac_cv_header_stdc" >&6; }
4581if test $ac_cv_header_stdc = yes; then
4582
4583$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4584
4585fi
4586
4587# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4588for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4589 inttypes.h stdint.h unistd.h
4590do :
4591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4592ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4593"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004594if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004595 cat >>confdefs.h <<_ACEOF
4596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4597_ACEOF
4598
4599fi
4600
4601done
4602
4603
4604
4605 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004606if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004607 MINIX=yes
4608else
4609 MINIX=
4610fi
4611
4612
4613 if test "$MINIX" = yes; then
4614
4615$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4616
4617
4618$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4619
4620
4621$as_echo "#define _MINIX 1" >>confdefs.h
4622
4623 fi
4624
4625
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4627$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004628if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004629 $as_echo_n "(cached) " >&6
4630else
4631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4632/* end confdefs.h. */
4633
4634# define __EXTENSIONS__ 1
4635 $ac_includes_default
4636int
4637main ()
4638{
4639
4640 ;
4641 return 0;
4642}
4643_ACEOF
4644if ac_fn_c_try_compile "$LINENO"; then :
4645 ac_cv_safe_to_define___extensions__=yes
4646else
4647 ac_cv_safe_to_define___extensions__=no
4648fi
4649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4650fi
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4652$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4653 test $ac_cv_safe_to_define___extensions__ = yes &&
4654 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4655
4656 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4657
4658 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4659
4660 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4661
4662 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4663
4664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666# Check for unsupported systems
4667case $ac_sys_system/$ac_sys_release in
4668atheos*|Linux*/1*)
4669 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4670 echo See README for details.
4671 exit 1;;
4672esac
4673
4674
Matthias Kloseb9621712010-04-24 17:59:49 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4676$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677
4678# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004679if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680 withval=$with_suffix;
4681 case $withval in
4682 no) EXEEXT=;;
4683 yes) EXEEXT=.exe;;
4684 *) EXEEXT=$withval;;
4685 esac
4686fi
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4689$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690
4691# Test whether we're running on a non-case-sensitive system, in which
4692# case we give a warning if no ext is given
4693
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4695$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696if test ! -d CaseSensitiveTestDir; then
4697mkdir CaseSensitiveTestDir
4698fi
4699
4700if test -d casesensitivetestdir
4701then
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4703$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704 BUILDEXEEXT=.exe
4705else
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708 BUILDEXEEXT=$EXEEXT
4709fi
4710rmdir CaseSensitiveTestDir
4711
4712case $MACHDEP in
4713bsdos*)
4714 case $CC in
4715 gcc) CC="$CC -D_HAVE_BSDI";;
4716 esac;;
4717esac
4718
4719case $ac_sys_system in
4720hp*|HP*)
4721 case $CC in
4722 cc|*/cc) CC="$CC -Ae";;
4723 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724esac
4725
4726
4727
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4729$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730if test -z "$LIBRARY"
4731then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004732 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4735$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# LDLIBRARY is the name of the library to link against (as opposed to the
4738# name of the library into which to insert object files). BLDLIBRARY is also
4739# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4740# is blank as the main program is not linked directly against LDLIBRARY.
4741# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4742# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4743# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4744# DLLLIBRARY is the shared (i.e., DLL) library.
4745#
4746# RUNSHARED is used to run shared python without installed libraries
4747#
4748# INSTSONAME is the name of the shared library that will be use to install
4749# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004750#
4751# LDVERSION is the shared library version number, normally the Python version
4752# with the ABI build flags appended.
4753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754
4755
4756
4757
4758
4759
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761LDLIBRARY="$LIBRARY"
4762BLDLIBRARY='$(LDLIBRARY)'
4763INSTSONAME='$(LDLIBRARY)'
4764DLLLIBRARY=''
4765LDLIBRARYDIR=''
4766RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004767LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768
4769# LINKCC is the command that links the python executable -- default is $(CC).
4770# If CXX is set, and if it is needed to link a main function that was
4771# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4772# python might then depend on the C++ runtime
4773# This is altered for AIX in order to build the export list before
4774# linking.
4775
Matthias Kloseb9621712010-04-24 17:59:49 +00004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4777$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778if test -z "$LINKCC"
4779then
4780 LINKCC='$(PURIFY) $(MAINCC)'
4781 case $ac_sys_system in
4782 AIX*)
4783 exp_extra="\"\""
4784 if test $ac_sys_release -ge 5 -o \
4785 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4786 exp_extra="."
4787 fi
4788 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789 QNX*)
4790 # qcc must be used because the other compilers do not
4791 # support -N.
4792 LINKCC=qcc;;
4793 esac
4794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4796$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797
4798# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4799# make sure we default having it set to "no": this is used by
4800# distutils.unixccompiler to know if it should add --enable-new-dtags
4801# to linker command lines, and failing to detect GNU ld simply results
4802# in the same bahaviour as before.
4803
Matthias Kloseb9621712010-04-24 17:59:49 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4805$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806ac_prog=ld
4807if test "$GCC" = yes; then
4808 ac_prog=`$CC -print-prog-name=ld`
4809fi
4810case `"$ac_prog" -V 2>&1 < /dev/null` in
4811 *GNU*)
4812 GNULD=yes;;
4813 *)
4814 GNULD=no;;
4815esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4817$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4820$as_echo_n "checking for inline... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02004821if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004822 $as_echo_n "(cached) " >&6
4823else
4824 ac_cv_c_inline=no
4825for ac_kw in inline __inline__ __inline; do
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827/* end confdefs.h. */
4828#ifndef __cplusplus
4829typedef int foo_t;
4830static $ac_kw foo_t static_foo () {return 0; }
4831$ac_kw foo_t foo () {return 0; }
4832#endif
4833
4834_ACEOF
4835if ac_fn_c_try_compile "$LINENO"; then :
4836 ac_cv_c_inline=$ac_kw
4837fi
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839 test "$ac_cv_c_inline" != no && break
4840done
4841
4842fi
4843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4844$as_echo "$ac_cv_c_inline" >&6; }
4845
4846case $ac_cv_c_inline in
4847 inline | yes) ;;
4848 *)
4849 case $ac_cv_c_inline in
4850 no) ac_val=;;
4851 *) ac_val=$ac_cv_c_inline;;
4852 esac
4853 cat >>confdefs.h <<_ACEOF
4854#ifndef __cplusplus
4855#define inline $ac_val
4856#endif
4857_ACEOF
4858 ;;
4859esac
4860
4861if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004862
4863$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004864
4865
4866fi
4867
4868
Matthias Kloseb9621712010-04-24 17:59:49 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4870$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004872if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 enableval=$enable_shared;
4874fi
4875
4876
4877if test -z "$enable_shared"
4878then
4879 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004880 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881 enable_shared="yes";;
4882 *)
4883 enable_shared="no";;
4884 esac
4885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4887$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4890$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893 enableval=$enable_profiling; ac_save_cc="$CC"
4894 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 ac_enable_profiling="no"
4897else
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899/* end confdefs.h. */
4900int main() { return 0; }
4901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 ac_enable_profiling="yes"
4904else
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909fi
4910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911 CC="$ac_save_cc"
4912fi
4913
Matthias Kloseb9621712010-04-24 17:59:49 +00004914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4915$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916
4917case "$ac_enable_profiling" in
4918 "yes")
4919 BASECFLAGS="-pg $BASECFLAGS"
4920 LDFLAGS="-pg $LDFLAGS"
4921 ;;
4922esac
4923
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4925$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926
4927# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4928# library that we build, but we do not want to link against it (we
4929# will find it with a -framework option). For this reason there is an
4930# extra variable BLDLIBRARY against which Python and the extension
4931# modules are linked, BLDLIBRARY. This is normally the same as
4932# LDLIBRARY, but empty for MacOSX framework builds.
4933if test "$enable_framework"
4934then
4935 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4936 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4937 BLDLIBRARY=''
4938else
4939 BLDLIBRARY='$(LDLIBRARY)'
4940fi
4941
4942# Other platforms follow
4943if test $enable_shared = "yes"; then
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946
4947 case $ac_sys_system in
4948 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).dll.a'
4950 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004953 LDLIBRARY='libpython$(LDVERSION).so'
4954 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4956 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004957 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004958 then
4959 PY3LIBRARY=libpython3.so
4960 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02004962 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004963 LDLIBRARY='libpython$(LDVERSION).so'
4964 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4966 case $ac_sys_system in
4967 FreeBSD*)
4968 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4969 ;;
4970 esac
4971 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004972 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004973 then
4974 PY3LIBRARY=libpython3.so
4975 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004976 ;;
4977 hp*|HP*)
4978 case `uname -m` in
4979 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 ;;
4982 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004983 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984 ;;
4985 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004986 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4988 ;;
4989 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).so'
4991 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4993 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004995 LDLIBRARY='libpython$(LDVERSION).dylib'
4996 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4998 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004999 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005000 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005001 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5002 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003
5004 esac
5005else # shared is disabled
5006 case $ac_sys_system in
5007 CYGWIN*)
5008 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005009 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010 ;;
5011 esac
5012fi
5013
Matthias Kloseb9621712010-04-24 17:59:49 +00005014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5015$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016
5017if test -n "$ac_tool_prefix"; then
5018 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5019set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005022if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024else
5025 if test -n "$RANLIB"; then
5026 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5035 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041IFS=$as_save_IFS
5042
5043fi
5044fi
5045RANLIB=$ac_cv_prog_RANLIB
5046if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5048$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052fi
5053
5054
5055fi
5056if test -z "$ac_cv_prog_RANLIB"; then
5057 ac_ct_RANLIB=$RANLIB
5058 # Extract the first word of "ranlib", so it can be a program name with args.
5059set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005062if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064else
5065 if test -n "$ac_ct_RANLIB"; then
5066 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5067else
5068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077 break 2
5078 fi
5079done
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081IFS=$as_save_IFS
5082
5083fi
5084fi
5085ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5086if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5088$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089else
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092fi
5093
5094 if test "x$ac_ct_RANLIB" = x; then
5095 RANLIB=":"
5096 else
5097 case $cross_compiling:$ac_tool_warned in
5098yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101ac_tool_warned=yes ;;
5102esac
5103 RANLIB=$ac_ct_RANLIB
5104 fi
5105else
5106 RANLIB="$ac_cv_prog_RANLIB"
5107fi
5108
5109
5110for ac_prog in ar aal
5111do
5112 # Extract the first word of "$ac_prog", so it can be a program name with args.
5113set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5115$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005116if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118else
5119 if test -n "$AR"; then
5120 ac_cv_prog_AR="$AR" # Let the user override the test.
5121else
5122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125 IFS=$as_save_IFS
5126 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5129 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 break 2
5132 fi
5133done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135IFS=$as_save_IFS
5136
5137fi
5138fi
5139AR=$ac_cv_prog_AR
5140if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5142$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143else
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5145$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146fi
5147
5148
5149 test -n "$AR" && break
5150done
5151test -n "$AR" || AR="ar"
5152
5153
5154# tweak ARFLAGS only if the user didn't set it on the command line
5155
5156if test -z "$ARFLAGS"
5157then
5158 ARFLAGS="rc"
5159fi
5160
5161
5162# Extract the first word of "svnversion", so it can be a program name with args.
5163set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005166if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168else
5169 if test -n "$SVNVERSION"; then
5170 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5171else
5172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005181 break 2
5182 fi
5183done
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185IFS=$as_save_IFS
5186
5187 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5188fi
5189fi
5190SVNVERSION=$ac_cv_prog_SVNVERSION
5191if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5193$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194else
Matthias Kloseb9621712010-04-24 17:59:49 +00005195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197fi
5198
5199
5200if test $SVNVERSION = found
5201then
5202 SVNVERSION="svnversion \$(srcdir)"
5203else
5204 SVNVERSION="echo Unversioned directory"
5205fi
5206
Georg Brandl1ca2e792011-03-05 20:51:24 +01005207
5208
5209
Georg Brandl187c1112011-07-03 09:23:20 +02005210
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005211if test -e $srcdir/.hg/dirstate
Georg Brandl187c1112011-07-03 09:23:20 +02005212then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005213# Extract the first word of "hg", so it can be a program name with args.
5214set dummy hg; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005217if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005218 $as_echo_n "(cached) " >&6
5219else
5220 if test -n "$HAS_HG"; then
5221 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5222else
5223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226 IFS=$as_save_IFS
5227 test -z "$as_dir" && as_dir=.
5228 for ac_exec_ext in '' $ac_executable_extensions; do
5229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5230 ac_cv_prog_HAS_HG="found"
5231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232 break 2
5233 fi
5234done
5235 done
5236IFS=$as_save_IFS
5237
5238 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5239fi
5240fi
5241HAS_HG=$ac_cv_prog_HAS_HG
5242if test -n "$HAS_HG"; then
5243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5244$as_echo "$HAS_HG" >&6; }
5245else
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
Georg Brandl187c1112011-07-03 09:23:20 +02005251else
5252HAS_HG=no-repository
5253fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005254if test $HAS_HG = found
5255then
5256 HGVERSION="hg id -i \$(srcdir)"
5257 HGTAG="hg id -t \$(srcdir)"
5258 HGBRANCH="hg id -b \$(srcdir)"
5259else
5260 HGVERSION=""
5261 HGTAG=""
5262 HGBRANCH=""
5263fi
5264
Georg Brandl187c1112011-07-03 09:23:20 +02005265
5266DISABLE_ASDLGEN=""
5267# Extract the first word of "python", so it can be a program name with args.
5268set dummy python; ac_word=$2
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005271if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Georg Brandl187c1112011-07-03 09:23:20 +02005272 $as_echo_n "(cached) " >&6
5273else
5274 if test -n "$HAS_PYTHON"; then
5275 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5276else
5277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280 IFS=$as_save_IFS
5281 test -z "$as_dir" && as_dir=.
5282 for ac_exec_ext in '' $ac_executable_extensions; do
5283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5284 ac_cv_prog_HAS_PYTHON="found"
5285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286 break 2
5287 fi
5288done
5289 done
5290IFS=$as_save_IFS
5291
5292 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5293fi
5294fi
5295HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5296if test -n "$HAS_PYTHON"; then
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5298$as_echo "$HAS_PYTHON" >&6; }
5299else
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5302fi
5303
5304
5305if test $HAS_HG != found -o $HAS_PYTHON != found
5306then
5307 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5308fi
5309
5310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311case $MACHDEP in
5312bsdos*|hp*|HP*)
5313 # install -d does not work on BSDI or HP-UX
5314 if test -z "$INSTALL"
5315 then
5316 INSTALL="${srcdir}/install-sh -c"
5317 fi
5318esac
5319ac_aux_dir=
5320for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005321 if test -f "$ac_dir/install-sh"; then
5322 ac_aux_dir=$ac_dir
5323 ac_install_sh="$ac_aux_dir/install-sh -c"
5324 break
5325 elif test -f "$ac_dir/install.sh"; then
5326 ac_aux_dir=$ac_dir
5327 ac_install_sh="$ac_aux_dir/install.sh -c"
5328 break
5329 elif test -f "$ac_dir/shtool"; then
5330 ac_aux_dir=$ac_dir
5331 ac_install_sh="$ac_aux_dir/shtool install -c"
5332 break
5333 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334done
5335if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005336 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337fi
5338
5339# These three variables are undocumented and unsupported,
5340# and are intended to be withdrawn in a future Autoconf release.
5341# They can cause serious problems if a builder's source tree is in a directory
5342# whose full name contains unusual characters.
5343ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5344ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5345ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5346
5347
5348# Find a good install program. We prefer a C program (faster),
5349# so one script is as good as another. But avoid the broken or
5350# incompatible versions:
5351# SysV /etc/install, /usr/sbin/install
5352# SunOS /usr/etc/install
5353# IRIX /sbin/install
5354# AIX /bin/install
5355# AmigaOS /C/install, which installs bootblocks on floppy discs
5356# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5357# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5358# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5359# OS/2's system install, which has a completely different semantic
5360# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361# Reject install programs that cannot install multiple files.
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5363$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364if test -z "$INSTALL"; then
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005365if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367else
5368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5369for as_dir in $PATH
5370do
5371 IFS=$as_save_IFS
5372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 # Account for people who put trailing slashes in PATH elements.
5374case $as_dir/ in #((
5375 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378 /usr/ucb/* ) ;;
5379 *)
5380 # OSF1 and SCO ODT 3.0 have their own names for install.
5381 # Don't use installbsd from OSF since it installs stuff as root
5382 # by default.
5383 for ac_prog in ginstall scoinst install; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5386 if test $ac_prog = install &&
5387 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5388 # AIX install. It has an incompatible calling convention.
5389 :
5390 elif test $ac_prog = install &&
5391 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5392 # program-specific install script used by HP pwplus--don't use.
5393 :
5394 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 rm -rf conftest.one conftest.two conftest.dir
5396 echo one > conftest.one
5397 echo two > conftest.two
5398 mkdir conftest.dir
5399 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5400 test -s conftest.one && test -s conftest.two &&
5401 test -s conftest.dir/conftest.one &&
5402 test -s conftest.dir/conftest.two
5403 then
5404 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5405 break 3
5406 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407 fi
5408 fi
5409 done
5410 done
5411 ;;
5412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005413
5414 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415IFS=$as_save_IFS
5416
Matthias Kloseb9621712010-04-24 17:59:49 +00005417rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419fi
5420 if test "${ac_cv_path_install+set}" = set; then
5421 INSTALL=$ac_cv_path_install
5422 else
5423 # As a last resort, use the slow shell script. Don't cache a
5424 # value for INSTALL within a source directory, because that will
5425 # break other packages using the cache if that directory is
5426 # removed, or if the value is a relative name.
5427 INSTALL=$ac_install_sh
5428 fi
5429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5431$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5434# It thinks the first close brace ends the variable substitution.
5435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5436
5437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5438
5439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5440
5441
5442# Not every filesystem supports hard links
5443
5444if test -z "$LN" ; then
5445 case $ac_sys_system in
5446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447 *) LN=ln;;
5448 esac
5449fi
5450
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005451# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005452
5453ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005454
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5457$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
5459# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005460if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461 withval=$with_pydebug;
5462if test "$withval" != no
5463then
5464
Matthias Kloseb9621712010-04-24 17:59:49 +00005465$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5468$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005470 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005471else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473fi
5474else
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477fi
5478
5479
5480# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5481# merged with this chunk of code?
5482
5483# Optimizer/debugger flags
5484# ------------------------
5485# (The following bit of code is complicated enough - please keep things
5486# indented properly. Just pretend you're editing Python code. ;-)
5487
5488# There are two parallel sets of case statements below, one that checks to
5489# see if OPT was set and one that does BASECFLAGS setting based upon
5490# compiler and platform. BASECFLAGS tweaks need to be made even if the
5491# user set OPT.
5492
5493# tweak OPT based on compiler and platform, only if the user didn't set
5494# it on the command line
5495
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005496if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497then
5498 case $GCC in
5499 yes)
5500 if test "$CC" != 'g++' ; then
5501 STRICT_PROTO="-Wstrict-prototypes"
5502 fi
5503 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5504 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5505 WRAP="-fwrapv"
5506 fi
5507 case $ac_cv_prog_cc_g in
5508 yes)
5509 if test "$Py_DEBUG" = 'true' ; then
5510 # Optimization messes up debuggers, so turn it off for
5511 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005512 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 else
5514 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5515 fi
5516 ;;
5517 *)
5518 OPT="-O3 -Wall $STRICT_PROTO"
5519 ;;
5520 esac
5521 case $ac_sys_system in
5522 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5523 ;;
5524 esac
5525 ;;
5526
5527 *)
5528 OPT="-O"
5529 ;;
5530 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531fi
5532
5533
5534
5535# The -arch flags for universal builds on OSX
5536UNIVERSAL_ARCH_FLAGS=
5537
5538
5539# tweak BASECFLAGS based on compiler and platform
5540case $GCC in
5541yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005542 # Python doesn't violate C99 aliasing rules, but older versions of
5543 # GCC produce warnings for legal Python code. Enable
5544 # -fno-strict-aliasing on versions of GCC that support but produce
5545 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5547$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 ac_save_cc="$CC"
5549 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005550 save_CFLAGS="$CFLAGS"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005551 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005553else
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556
Matthias Kloseb159a552010-04-25 21:00:44 +00005557
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005558int
5559main ()
5560{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005561
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005562 ;
5563 return 0;
5564}
Matthias Kloseb159a552010-04-25 21:00:44 +00005565
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005567if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005568
5569 CC="$ac_save_cc -fstrict-aliasing"
5570 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005572/* end confdefs.h. */
5573
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005574 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005575int
5576main ()
5577{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005578double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005579 ;
5580 return 0;
5581}
Matthias Kloseb159a552010-04-25 21:00:44 +00005582
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005584if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005585
5586 ac_cv_no_strict_aliasing=no
5587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588else
Matthias Kloseb159a552010-04-25 21:00:44 +00005589
5590 ac_cv_no_strict_aliasing=yes
5591
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005592fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005594
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005595else
Matthias Kloseb159a552010-04-25 21:00:44 +00005596
5597 ac_cv_no_strict_aliasing=no
5598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005601fi
5602
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005603 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5606$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005607 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 then
5609 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5610 fi
5611
5612 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5613 # support. Without this, treatment of subnormals doesn't follow
5614 # the standard.
5615 case $ac_sys_machine in
5616 alpha*)
5617 BASECFLAGS="$BASECFLAGS -mieee"
5618 ;;
5619 esac
5620
5621 case $ac_sys_system in
5622 SCO_SV*)
5623 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5624 ;;
5625 # is there any other compiler on Darwin besides gcc?
5626 Darwin*)
5627 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5628 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005629 if test "${CC}" = gcc
5630 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5632$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005633 case "${UNIVERSALSDK}" in
5634 */MacOSX10.4u.sdk)
5635 # Build using 10.4 SDK, force usage of gcc when the
5636 # compiler is gcc, otherwise the user will get very
5637 # confusing error messages when building on OSX 10.6
5638 CC=gcc-4.0
5639 CPP=cpp-4.0
5640 ;;
5641 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5643$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005644 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
5646
5647 if test "${enable_universalsdk}"; then
5648 UNIVERSAL_ARCH_FLAGS=""
5649 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5650 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5651 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005652 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5654 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005655 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005656 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
5658 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005660 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005661 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005663 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5664 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005665 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005666 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005667
5668 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5669 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005670 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005671 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005672
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005674 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 +00005675
5676 fi
5677
5678
Ronald Oussoren666028b2010-04-18 19:07:43 +00005679 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5680 if test "${UNIVERSALSDK}" != "/"
5681 then
5682 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5683 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005684 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685 fi
5686 fi
5687
5688 # Calculate the right deployment target for this build.
5689 #
5690 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5691 if test ${cur_target} '>' 10.2; then
5692 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005693 if test ${enable_universalsdk}; then
5694 if test "${UNIVERSAL_ARCHS}" = "all"; then
5695 # Ensure that the default platform for a
5696 # 4-way universal build is OSX 10.5,
5697 # that's the first OS release where
5698 # 4-way builds make sense.
5699 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005700
5701 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5702 cur_target='10.5'
5703
5704 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5705 cur_target='10.5'
5706
5707 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5708 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005709 fi
5710 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005711 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005712 # On Intel macs default to a deployment
5713 # target of 10.4, that's the first OSX
5714 # release with Intel support.
5715 cur_target="10.4"
5716 fi
5717 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 fi
5719 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5720
5721 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5722 # environment with a value that is the same as what we'll use
5723 # in the Makefile to ensure that we'll get the same compiler
5724 # environment during configure and build time.
5725 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5726 export MACOSX_DEPLOYMENT_TARGET
5727 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5728
5729 ;;
5730 OSF*)
5731 BASECFLAGS="$BASECFLAGS -mieee"
5732 ;;
5733 esac
5734 ;;
5735
5736*)
5737 case $ac_sys_system in
5738 OpenUNIX*|UnixWare*)
5739 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5740 ;;
5741 OSF*)
5742 BASECFLAGS="$BASECFLAGS -ieee -std"
5743 ;;
5744 SCO_SV*)
5745 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5746 ;;
5747 esac
5748 ;;
5749esac
5750
5751if test "$Py_DEBUG" = 'true'; then
5752 :
5753else
5754 OPT="-DNDEBUG $OPT"
5755fi
5756
5757if test "$ac_arch_flags"
5758then
5759 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5760fi
5761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762# Check whether GCC supports PyArg_ParseTuple format
5763if test "$GCC" = "yes"
5764then
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5766$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 save_CFLAGS=$CFLAGS
5768 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770/* end confdefs.h. */
5771
5772 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773int
5774main ()
5775{
5776
5777 ;
5778 return 0;
5779}
Matthias Kloseb159a552010-04-25 21:00:44 +00005780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005782if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
Matthias Kloseb159a552010-04-25 21:00:44 +00005784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
Matthias Kloseb159a552010-04-25 21:00:44 +00005787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005788$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790else
Matthias Kloseb159a552010-04-25 21:00:44 +00005791
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005793$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
5795fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5797 CFLAGS=$save_CFLAGS
5798fi
5799
5800# On some compilers, pthreads are available without further options
5801# (e.g. MacOS X). On some of these systems, the compiler will not
5802# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5803# So we have to see first whether pthreads are available without
5804# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5806$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005807if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809else
Matthias Kloseb9621712010-04-24 17:59:49 +00005810 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ac_cv_pthread_is_default=no
5812else
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814/* end confdefs.h. */
5815
5816#include <pthread.h>
5817
5818void* routine(void* p){return NULL;}
5819
5820int main(){
5821 pthread_t p;
5822 if(pthread_create(&p,NULL,routine,NULL)!=0)
5823 return 1;
5824 (void)pthread_detach(p);
5825 return 0;
5826}
5827
5828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005829if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
5831 ac_cv_pthread_is_default=yes
5832 ac_cv_kthread=no
5833 ac_cv_pthread=no
5834
5835else
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
5841
5842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5846$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
5848
5849if test $ac_cv_pthread_is_default = yes
5850then
5851 ac_cv_kpthread=no
5852else
5853# -Kpthread, if available, provides the right #defines
5854# and linker options to make pthread_create available
5855# Some compilers won't report that they do not support -Kpthread,
5856# so we need to run a program to see whether it really made the
5857# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5859$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005860if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
5863 ac_save_cc="$CC"
5864CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 ac_cv_kpthread=no
5867else
Matthias Kloseb9621712010-04-24 17:59:49 +00005868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869/* end confdefs.h. */
5870
5871#include <pthread.h>
5872
5873void* routine(void* p){return NULL;}
5874
5875int main(){
5876 pthread_t p;
5877 if(pthread_create(&p,NULL,routine,NULL)!=0)
5878 return 1;
5879 (void)pthread_detach(p);
5880 return 0;
5881}
5882
5883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ac_cv_kpthread=yes
5886else
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
5892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893CC="$ac_save_cc"
5894fi
5895
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5897$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899
5900if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5901then
5902# -Kthread, if available, provides the right #defines
5903# and linker options to make pthread_create available
5904# Some compilers won't report that they do not support -Kthread,
5905# so we need to run a program to see whether it really made the
5906# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5908$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005909if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911else
5912 ac_save_cc="$CC"
5913CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005914if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ac_cv_kthread=no
5916else
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918/* end confdefs.h. */
5919
5920#include <pthread.h>
5921
5922void* routine(void* p){return NULL;}
5923
5924int main(){
5925 pthread_t p;
5926 if(pthread_create(&p,NULL,routine,NULL)!=0)
5927 return 1;
5928 (void)pthread_detach(p);
5929 return 0;
5930}
5931
5932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ac_cv_kthread=yes
5935else
Matthias Kloseb9621712010-04-24 17:59:49 +00005936 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
5941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942CC="$ac_save_cc"
5943fi
5944
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5946$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947fi
5948
5949if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5950then
5951# -pthread, if available, provides the right #defines
5952# and linker options to make pthread_create available
5953# Some compilers won't report that they do not support -pthread,
5954# so we need to run a program to see whether it really made the
5955# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5957$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02005958if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960else
5961 ac_save_cc="$CC"
5962CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005963if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964 ac_cv_pthread=no
5965else
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967/* end confdefs.h. */
5968
5969#include <pthread.h>
5970
5971void* routine(void* p){return NULL;}
5972
5973int main(){
5974 pthread_t p;
5975 if(pthread_create(&p,NULL,routine,NULL)!=0)
5976 return 1;
5977 (void)pthread_detach(p);
5978 return 0;
5979}
5980
5981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005982if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983 ac_cv_pthread=yes
5984else
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989fi
5990
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991CC="$ac_save_cc"
5992fi
5993
Matthias Kloseb9621712010-04-24 17:59:49 +00005994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5995$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
5997
5998# If we have set a CC compiler flag for thread support then
5999# check if it works for CXX, too.
6000ac_cv_cxx_thread=no
6001if test ! -z "$CXX"
6002then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6004$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005ac_save_cxx="$CXX"
6006
6007if test "$ac_cv_kpthread" = "yes"
6008then
6009 CXX="$CXX -Kpthread"
6010 ac_cv_cxx_thread=yes
6011elif test "$ac_cv_kthread" = "yes"
6012then
6013 CXX="$CXX -Kthread"
6014 ac_cv_cxx_thread=yes
6015elif test "$ac_cv_pthread" = "yes"
6016then
6017 CXX="$CXX -pthread"
6018 ac_cv_cxx_thread=yes
6019fi
6020
6021if test $ac_cv_cxx_thread = yes
6022then
6023 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6024 $CXX -c conftest.$ac_ext 2>&5
6025 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6026 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6027 then
6028 ac_cv_cxx_thread=yes
6029 else
6030 ac_cv_cxx_thread=no
6031 fi
6032 rm -fr conftest*
6033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6035$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036fi
6037CXX="$ac_save_cxx"
6038
6039
6040# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6042$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006043if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047/* end confdefs.h. */
6048#include <stdlib.h>
6049#include <stdarg.h>
6050#include <string.h>
6051#include <float.h>
6052
6053int
6054main ()
6055{
6056
6057 ;
6058 return 0;
6059}
6060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006061if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 ac_cv_header_stdc=yes
6063else
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6067
6068if test $ac_cv_header_stdc = yes; then
6069 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071/* end confdefs.h. */
6072#include <string.h>
6073
6074_ACEOF
6075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006076 $EGREP "memchr" >/dev/null 2>&1; then :
6077
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
6079 ac_cv_header_stdc=no
6080fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006081rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082
6083fi
6084
6085if test $ac_cv_header_stdc = yes; then
6086 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088/* end confdefs.h. */
6089#include <stdlib.h>
6090
6091_ACEOF
6092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 $EGREP "free" >/dev/null 2>&1; then :
6094
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
6096 ac_cv_header_stdc=no
6097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006098rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099
6100fi
6101
6102if test $ac_cv_header_stdc = yes; then
6103 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105 :
6106else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108/* end confdefs.h. */
6109#include <ctype.h>
6110#include <stdlib.h>
6111#if ((' ' & 0x0FF) == 0x020)
6112# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6113# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6114#else
6115# define ISLOWER(c) \
6116 (('a' <= (c) && (c) <= 'i') \
6117 || ('j' <= (c) && (c) <= 'r') \
6118 || ('s' <= (c) && (c) <= 'z'))
6119# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6120#endif
6121
6122#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6123int
6124main ()
6125{
6126 int i;
6127 for (i = 0; i < 256; i++)
6128 if (XOR (islower (i), ISLOWER (i))
6129 || toupper (i) != TOUPPER (i))
6130 return 2;
6131 return 0;
6132}
6133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006134if ac_fn_c_try_run "$LINENO"; then :
6135
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136else
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141fi
6142
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143fi
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6146$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147if test $ac_cv_header_stdc = yes; then
6148
Matthias Kloseb9621712010-04-24 17:59:49 +00006149$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150
6151fi
6152
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006153for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6154fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006155ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006156shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006157unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006158sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6159sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006160sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006161sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006162sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006163sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006164bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006165do :
6166 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6167ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006168if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006170#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006171_ACEOF
6172
6173fi
6174
Guido van Rossum627b2d71993-12-24 10:39:16 +00006175done
6176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006178for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6181$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006182if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006184else
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006187#include <sys/types.h>
6188#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006189
Martin v. Löwis11437992002-04-12 09:54:03 +00006190int
6191main ()
6192{
6193if ((DIR *) 0)
6194return 0;
6195 ;
6196 return 0;
6197}
6198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006199if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006200 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006201else
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006206eval ac_res=\$$as_ac_Header
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6208$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006209if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006210 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006211#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006212_ACEOF
6213
6214ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006217done
6218# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6219if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6221$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006222if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006224else
Martin v. Löwis11437992002-04-12 09:54:03 +00006225 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229/* Override any GCC internal prototype to avoid an error.
6230 Use char because int might match the return type of a GCC
6231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006232#ifdef __cplusplus
6233extern "C"
6234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006235char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006236int
6237main ()
6238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006240 ;
6241 return 0;
6242}
6243_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006244for ac_lib in '' dir; do
6245 if test -z "$ac_lib"; then
6246 ac_res="none required"
6247 else
6248 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006252 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254rm -f core conftest.err conftest.$ac_objext \
6255 conftest$ac_exeext
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006256 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006257 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259done
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006260if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006262else
6263 ac_cv_search_opendir=no
6264fi
6265rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006266LIBS=$ac_func_search_save_LIBS
6267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6269$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006270ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006271if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006275
Michael W. Hudson54241132001-12-07 15:38:26 +00006276else
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6278$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006279if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006281else
6282 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006286/* Override any GCC internal prototype to avoid an error.
6287 Use char because int might match the return type of a GCC
6288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006289#ifdef __cplusplus
6290extern "C"
6291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006292char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006293int
6294main ()
6295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006296return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006297 ;
6298 return 0;
6299}
6300_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006301for ac_lib in '' x; do
6302 if test -z "$ac_lib"; then
6303 ac_res="none required"
6304 else
6305 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006306 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006309 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006311rm -f core conftest.err conftest.$ac_objext \
6312 conftest$ac_exeext
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006313 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006316done
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006317if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319else
6320 ac_cv_search_opendir=no
6321fi
6322rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006323LIBS=$ac_func_search_save_LIBS
6324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6326$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006328if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006331fi
6332
6333fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6336$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006337if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006339else
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006341/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343int
6344main ()
6345{
6346return makedev(0, 0);
6347 ;
6348 return 0;
6349}
6350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006351if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352 ac_cv_header_sys_types_h_makedev=yes
6353else
Matthias Kloseb9621712010-04-24 17:59:49 +00006354 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -f core conftest.err conftest.$ac_objext \
6357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358
6359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6361$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006364ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006365if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006366
Matthias Kloseb9621712010-04-24 17:59:49 +00006367$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006368
6369fi
6370
6371
6372
6373 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006375if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006376
Matthias Kloseb9621712010-04-24 17:59:49 +00006377$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378
6379fi
6380
6381
6382 fi
6383fi
6384
Michael W. Hudson54241132001-12-07 15:38:26 +00006385
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006386# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006387for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006388do :
6389 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006390#ifdef HAVE_CURSES_H
6391#include <curses.h>
6392#endif
6393
Matthias Kloseb9621712010-04-24 17:59:49 +00006394"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006395if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006397#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006398_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006400fi
6401
6402done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403
6404
Martin v. Löwis11017b12006-01-14 18:12:57 +00006405# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006406for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006407do :
6408 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 +00006409#ifdef HAVE_ASM_TYPES_H
6410#include <asm/types.h>
6411#endif
6412#ifdef HAVE_SYS_SOCKET_H
6413#include <sys/socket.h>
6414#endif
6415
Matthias Kloseb9621712010-04-24 17:59:49 +00006416"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006417if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006419#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420_ACEOF
6421
6422fi
6423
6424done
6425
6426
Guido van Rossum627b2d71993-12-24 10:39:16 +00006427# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006428was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6430$as_echo_n "checking for clock_t in time.h... " >&6; }
6431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006432/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006434
6435_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006437 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006438 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006439else
Martin v. Löwis11437992002-04-12 09:54:03 +00006440
6441
Matthias Kloseb9621712010-04-24 17:59:49 +00006442$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006444
Guido van Rossum627b2d71993-12-24 10:39:16 +00006445fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006446rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6449$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006450
Neal Norwitz11690112002-07-30 01:08:28 +00006451# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6453$as_echo_n "checking for makedev... " >&6; }
6454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006455/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006456
Jesus Cea740f53a2010-04-28 11:35:30 +00006457#if defined(MAJOR_IN_MKDEV)
6458#include <sys/mkdev.h>
6459#elif defined(MAJOR_IN_SYSMACROS)
6460#include <sys/sysmacros.h>
6461#else
6462#include <sys/types.h>
6463#endif
6464
Neal Norwitz11690112002-07-30 01:08:28 +00006465int
6466main ()
6467{
Jesus Cea740f53a2010-04-28 11:35:30 +00006468
6469 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006470 ;
6471 return 0;
6472}
Matthias Kloseb159a552010-04-25 21:00:44 +00006473
Neal Norwitz11690112002-07-30 01:08:28 +00006474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006475if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006476 ac_cv_has_makedev=yes
6477else
Matthias Kloseb9621712010-04-24 17:59:49 +00006478 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006480rm -f core conftest.err conftest.$ac_objext \
6481 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006482if test "$ac_cv_has_makedev" = "no"; then
6483 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006485/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006486
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006487#define _OSF_SOURCE 1
6488#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006489
Neal Norwitz11690112002-07-30 01:08:28 +00006490int
6491main ()
6492{
6493 makedev(0, 0)
6494 ;
6495 return 0;
6496}
6497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006498if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006499 ac_cv_has_makedev=yes
6500else
Matthias Kloseb9621712010-04-24 17:59:49 +00006501 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006503rm -f core conftest.err conftest.$ac_objext \
6504 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006505 if test "$ac_cv_has_makedev" = "yes"; then
6506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006508
6509 fi
6510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6512$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006513if test "$ac_cv_has_makedev" = "yes"; then
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006516
6517fi
6518
Martin v. Löwis399a6892002-10-04 10:22:02 +00006519# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6520# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6521# defined, but the compiler does not support pragma redefine_extname,
6522# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6523# structures (such as rlimit64) without declaring them. As a
6524# work-around, disable LFS on such configurations
6525
6526use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6528$as_echo_n "checking Solaris LFS bug... " >&6; }
6529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006530/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006531
6532#define _LARGEFILE_SOURCE 1
6533#define _FILE_OFFSET_BITS 64
6534#include <sys/resource.h>
6535
Martin v. Löwis399a6892002-10-04 10:22:02 +00006536int
6537main ()
6538{
6539struct rlimit foo;
6540 ;
6541 return 0;
6542}
6543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006545 sol_lfs_bug=no
6546else
Matthias Kloseb9621712010-04-24 17:59:49 +00006547 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6551$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006552if test "$sol_lfs_bug" = "yes"; then
6553 use_lfs=no
6554fi
6555
6556if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006557# Two defines needed to enable largefile support on various platforms
6558# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006559case $ac_sys_system/$ac_sys_release in
6560AIX*)
6561
6562$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6563
6564 ;;
6565esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006566
Matthias Kloseb9621712010-04-24 17:59:49 +00006567$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569
Matthias Kloseb9621712010-04-24 17:59:49 +00006570$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006571
Martin v. Löwis399a6892002-10-04 10:22:02 +00006572fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006573
Guido van Rossum84e7b241996-08-19 21:59:00 +00006574# Add some code to confdefs.h so that the test for off_t works on SCO
6575cat >> confdefs.h <<\EOF
6576#if defined(SCO_DS)
6577#undef _OFF_T
6578#endif
6579EOF
6580
Guido van Rossumef2255b2000-03-10 22:30:29 +00006581# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006582ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006583if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006585else
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587cat >>confdefs.h <<_ACEOF
6588#define mode_t int
6589_ACEOF
6590
6591fi
6592
Matthias Kloseb9621712010-04-24 17:59:49 +00006593ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006594if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596else
Martin v. Löwis11437992002-04-12 09:54:03 +00006597
6598cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006600_ACEOF
6601
6602fi
6603
Matthias Kloseb9621712010-04-24 17:59:49 +00006604ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006605if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006607else
Martin v. Löwis11437992002-04-12 09:54:03 +00006608
6609cat >>confdefs.h <<_ACEOF
6610#define pid_t int
6611_ACEOF
6612
6613fi
6614
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006617#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006618_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006621if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006623else
Martin v. Löwis11437992002-04-12 09:54:03 +00006624
6625cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006627_ACEOF
6628
6629fi
6630
Matthias Kloseb9621712010-04-24 17:59:49 +00006631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6632$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006633if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006637/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006638#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006639
6640_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006642 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006643 ac_cv_type_uid_t=yes
6644else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006645 ac_cv_type_uid_t=no
6646fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006647rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006648
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6651$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006652if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006653
Matthias Kloseb9621712010-04-24 17:59:49 +00006654$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006655
6656
Matthias Kloseb9621712010-04-24 17:59:49 +00006657$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006658
6659fi
6660
Matthias Kloseb9621712010-04-24 17:59:49 +00006661ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6662case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006663 no|yes) ;; #(
6664 *)
6665
Matthias Kloseb9621712010-04-24 17:59:49 +00006666$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006667
6668
6669cat >>confdefs.h <<_ACEOF
6670#define uint32_t $ac_cv_c_uint32_t
6671_ACEOF
6672;;
6673 esac
6674
Matthias Kloseb9621712010-04-24 17:59:49 +00006675ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6676case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006677 no|yes) ;; #(
6678 *)
6679
Matthias Kloseb9621712010-04-24 17:59:49 +00006680$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006681
6682
6683cat >>confdefs.h <<_ACEOF
6684#define uint64_t $ac_cv_c_uint64_t
6685_ACEOF
6686;;
6687 esac
6688
Matthias Kloseb9621712010-04-24 17:59:49 +00006689ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6690case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006691 no|yes) ;; #(
6692 *)
6693
6694cat >>confdefs.h <<_ACEOF
6695#define int32_t $ac_cv_c_int32_t
6696_ACEOF
6697;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006698esac
6699
Matthias Kloseb9621712010-04-24 17:59:49 +00006700ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6701case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006702 no|yes) ;; #(
6703 *)
6704
6705cat >>confdefs.h <<_ACEOF
6706#define int64_t $ac_cv_c_int64_t
6707_ACEOF
6708;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006709esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006710
Matthias Kloseb9621712010-04-24 17:59:49 +00006711ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006712if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713
Matthias Kloseb9621712010-04-24 17:59:49 +00006714$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006715
6716fi
6717
Jack Jansendd19cf82001-12-06 22:36:17 +00006718
Michael W. Hudson54241132001-12-07 15:38:26 +00006719# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006720# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721# The cast to long int works around a bug in the HP C Compiler
6722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6726$as_echo_n "checking size of int... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006727if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 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 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 if test "$ac_cv_type_int" = yes; then
6734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006736as_fn_error 77 "cannot compute sizeof (int)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006738 else
6739 ac_cv_sizeof_int=0
6740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006742
Martin v. Löwis11437992002-04-12 09:54:03 +00006743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6745$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006746
6747
6748
Martin v. Löwis11437992002-04-12 09:54:03 +00006749cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006750#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006751_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006752
6753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006754# The cast to long int works around a bug in the HP C Compiler
6755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6759$as_echo_n "checking size of long... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006760if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 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 +00006764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 if test "$ac_cv_type_long" = yes; then
6767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006769as_fn_error 77 "cannot compute sizeof (long)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771 else
6772 ac_cv_sizeof_long=0
6773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6778$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779
6780
6781
Martin v. Löwis11437992002-04-12 09:54:03 +00006782cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006783#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006785
6786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006787# The cast to long int works around a bug in the HP C Compiler
6788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6792$as_echo_n "checking size of void *... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006793if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006795else
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 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 +00006797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 if test "$ac_cv_type_void_p" = yes; then
6800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006802as_fn_error 77 "cannot compute sizeof (void *)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006803See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006804 else
6805 ac_cv_sizeof_void_p=0
6806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006808
Martin v. Löwis11437992002-04-12 09:54:03 +00006809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6811$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006812
6813
6814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006816#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006817_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006818
6819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006820# The cast to long int works around a bug in the HP C Compiler
6821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6825$as_echo_n "checking size of short... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006826if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 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 +00006830
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 if test "$ac_cv_type_short" = yes; then
6833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006835as_fn_error 77 "cannot compute sizeof (short)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006836See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006837 else
6838 ac_cv_sizeof_short=0
6839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6844$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845
6846
6847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006849#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006850_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006851
6852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006853# The cast to long int works around a bug in the HP C Compiler
6854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6856# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6858$as_echo_n "checking size of float... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006859if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 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 +00006863
Martin v. Löwis11437992002-04-12 09:54:03 +00006864else
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 if test "$ac_cv_type_float" = yes; then
6866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006868as_fn_error 77 "cannot compute sizeof (float)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006869See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870 else
6871 ac_cv_sizeof_float=0
6872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006874
Martin v. Löwis11437992002-04-12 09:54:03 +00006875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6877$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006878
6879
6880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006882#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006883_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006884
6885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886# The cast to long int works around a bug in the HP C Compiler
6887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6889# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6891$as_echo_n "checking size of double... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006892if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006894else
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 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 +00006896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 if test "$ac_cv_type_double" = yes; then
6899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006901as_fn_error 77 "cannot compute sizeof (double)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006902See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903 else
6904 ac_cv_sizeof_double=0
6905 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006907
Martin v. Löwis11437992002-04-12 09:54:03 +00006908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6910$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911
6912
6913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006915#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917
6918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919# The cast to long int works around a bug in the HP C Compiler
6920# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6921# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6922# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6924$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006925if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 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 +00006929
Martin v. Löwis11437992002-04-12 09:54:03 +00006930else
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 if test "$ac_cv_type_fpos_t" = yes; then
6932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006934as_fn_error 77 "cannot compute sizeof (fpos_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006935See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006936 else
6937 ac_cv_sizeof_fpos_t=0
6938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006940
Martin v. Löwis11437992002-04-12 09:54:03 +00006941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6943$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006944
6945
6946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006948#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006949_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006950
Michael W. Hudson54241132001-12-07 15:38:26 +00006951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952# The cast to long int works around a bug in the HP C Compiler
6953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6957$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006958if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 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 +00006962
Martin v. Löwis18e16552006-02-15 17:27:45 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 if test "$ac_cv_type_size_t" = yes; then
6965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006967as_fn_error 77 "cannot compute sizeof (size_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006968See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969 else
6970 ac_cv_sizeof_size_t=0
6971 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973
Martin v. Löwis18e16552006-02-15 17:27:45 +00006974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6976$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006977
6978
6979
Martin v. Löwis18e16552006-02-15 17:27:45 +00006980cat >>confdefs.h <<_ACEOF
6981#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6982_ACEOF
6983
6984
Christian Heimes400adb02008-02-01 08:12:03 +00006985# The cast to long int works around a bug in the HP C Compiler
6986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6988# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6990$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02006991if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 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 +00006995
Christian Heimes400adb02008-02-01 08:12:03 +00006996else
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 if test "$ac_cv_type_pid_t" = yes; then
6998 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007000as_fn_error 77 "cannot compute sizeof (pid_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007001See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007002 else
7003 ac_cv_sizeof_pid_t=0
7004 fi
7005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006
Christian Heimes400adb02008-02-01 08:12:03 +00007007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7009$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007010
7011
7012
7013cat >>confdefs.h <<_ACEOF
7014#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7015_ACEOF
7016
7017
Michael W. Hudson54241132001-12-07 15:38:26 +00007018
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7020$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007021have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007024
Martin v. Löwis11437992002-04-12 09:54:03 +00007025int
7026main ()
7027{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007028long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007029 ;
7030 return 0;
7031}
7032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007034
7035
Matthias Kloseb9621712010-04-24 17:59:49 +00007036$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007037
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007038 have_long_long=yes
7039
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7043$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007044if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045# The cast to long int works around a bug in the HP C Compiler
7046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7048# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7050$as_echo_n "checking size of long long... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007051if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007053else
Matthias Kloseb9621712010-04-24 17:59:49 +00007054 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 +00007055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056else
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 if test "$ac_cv_type_long_long" = yes; then
7058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7059$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007060as_fn_error 77 "cannot compute sizeof (long long)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007061See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062 else
7063 ac_cv_sizeof_long_long=0
7064 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7069$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070
7071
7072
Martin v. Löwis11437992002-04-12 09:54:03 +00007073cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007074#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007075_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007076
Michael W. Hudson54241132001-12-07 15:38:26 +00007077
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007078fi
7079
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7081$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007082have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007084/* end confdefs.h. */
7085
7086int
7087main ()
7088{
7089long double x; x = (long double)0;
7090 ;
7091 return 0;
7092}
7093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007094if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007095
7096
Matthias Kloseb9621712010-04-24 17:59:49 +00007097$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007098
7099 have_long_double=yes
7100
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007101fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7104$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007106# The cast to long int works around a bug in the HP C Compiler
7107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7109# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7111$as_echo_n "checking size of long double... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007112if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 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 +00007116
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007117else
Matthias Kloseb9621712010-04-24 17:59:49 +00007118 if test "$ac_cv_type_long_double" = yes; then
7119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007121as_fn_error 77 "cannot compute sizeof (long double)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007122See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007123 else
7124 ac_cv_sizeof_long_double=0
7125 fi
7126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7130$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007131
7132
7133
7134cat >>confdefs.h <<_ACEOF
7135#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7136_ACEOF
7137
7138
7139fi
7140
7141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7143$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007144have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007146/* end confdefs.h. */
7147
7148int
7149main ()
7150{
7151_Bool x; x = (_Bool)0;
7152 ;
7153 return 0;
7154}
7155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007156if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007157
7158
Matthias Kloseb9621712010-04-24 17:59:49 +00007159$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007160
7161 have_c99_bool=yes
7162
Thomas Woutersb2137042007-02-01 18:02:27 +00007163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7166$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007167if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168# The cast to long int works around a bug in the HP C Compiler
7169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7171# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7173$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007174if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 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 +00007178
Thomas Woutersb2137042007-02-01 18:02:27 +00007179else
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 if test "$ac_cv_type__Bool" = yes; then
7181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007183as_fn_error 77 "cannot compute sizeof (_Bool)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007184See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007185 else
7186 ac_cv_sizeof__Bool=0
7187 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189
Thomas Woutersb2137042007-02-01 18:02:27 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7192$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007193
7194
7195
Thomas Woutersb2137042007-02-01 18:02:27 +00007196cat >>confdefs.h <<_ACEOF
7197#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7198_ACEOF
7199
7200
7201fi
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007204 #include <stdint.h>
7205 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007206 #ifdef HAVE_INTTYPES_H
7207 #include <inttypes.h>
7208 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007209"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007210if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007211
7212cat >>confdefs.h <<_ACEOF
7213#define HAVE_UINTPTR_T 1
7214_ACEOF
7215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007216# The cast to long int works around a bug in the HP C Compiler
7217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7221$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007222if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 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 +00007226
Martin v. Löwis11437992002-04-12 09:54:03 +00007227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 if test "$ac_cv_type_uintptr_t" = yes; then
7229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007231as_fn_error 77 "cannot compute sizeof (uintptr_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007232See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007233 else
7234 ac_cv_sizeof_uintptr_t=0
7235 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237
Martin v. Löwis11437992002-04-12 09:54:03 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7240$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007241
7242
7243
Martin v. Löwis11437992002-04-12 09:54:03 +00007244cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007245#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007246_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007247
Michael W. Hudson54241132001-12-07 15:38:26 +00007248
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007249fi
7250
Thomas Wouters89f507f2006-12-13 04:49:30 +00007251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252# The cast to long int works around a bug in the HP C Compiler
7253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7255# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7257$as_echo_n "checking size of off_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007258if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007262#ifdef HAVE_SYS_TYPES_H
7263#include <sys/types.h>
7264#endif
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 if test "$ac_cv_type_off_t" = yes; then
7270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007272as_fn_error 77 "cannot compute sizeof (off_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007273See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007274 else
7275 ac_cv_sizeof_off_t=0
7276 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7281$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007282
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007283
7284
Martin v. Löwis11437992002-04-12 09:54:03 +00007285cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007286#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007287_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007288
Michael W. Hudson54241132001-12-07 15:38:26 +00007289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007290
Matthias Kloseb9621712010-04-24 17:59:49 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7292$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007293if test "$have_long_long" = yes
7294then
7295if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007296 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7301$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7304$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007305fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007306else
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007309fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007311# The cast to long int works around a bug in the HP C Compiler
7312# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7313# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7314# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7316$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007317if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007321#ifdef HAVE_SYS_TYPES_H
7322#include <sys/types.h>
7323#endif
7324#ifdef HAVE_TIME_H
7325#include <time.h>
7326#endif
7327
Matthias Kloseb9621712010-04-24 17:59:49 +00007328"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007330else
Matthias Kloseb9621712010-04-24 17:59:49 +00007331 if test "$ac_cv_type_time_t" = yes; then
7332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007334as_fn_error 77 "cannot compute sizeof (time_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007335See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007336 else
7337 ac_cv_sizeof_time_t=0
7338 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7343$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007344
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007345
7346
Martin v. Löwis11437992002-04-12 09:54:03 +00007347cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007348#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007349_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007350
Michael W. Hudson54241132001-12-07 15:38:26 +00007351
7352
Trent Mick635f6fb2000-08-23 21:33:05 +00007353# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007354ac_save_cc="$CC"
7355if test "$ac_cv_kpthread" = "yes"
7356then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007357elif test "$ac_cv_kthread" = "yes"
7358then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007359elif test "$ac_cv_pthread" = "yes"
7360then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007361fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7364$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007365have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007367/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007368
7369 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007370int
7371main ()
7372{
Guido van Rossum12580492000-09-24 16:47:19 +00007373pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 ;
7375 return 0;
7376}
Matthias Kloseb159a552010-04-25 21:00:44 +00007377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007379if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007380 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7384$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007385if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7389# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7391$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007392if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007394else
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007396#ifdef HAVE_PTHREAD_H
7397#include <pthread.h>
7398#endif
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$ac_cv_type_pthread_t" = yes; then
7404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007406as_fn_error 77 "cannot compute sizeof (pthread_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007407See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007408 else
7409 ac_cv_sizeof_pthread_t=0
7410 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007412
Trent Mick635f6fb2000-08-23 21:33:05 +00007413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7415$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007416
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007417
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007420#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007422
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007423
Trent Mick635f6fb2000-08-23 21:33:05 +00007424fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007425CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007426
Michael W. Hudson54241132001-12-07 15:38:26 +00007427
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007428case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007429 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007430 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7431 ;;
7432 Darwin/*)
7433 OTHER_LIBTOOL_OPT=""
7434 ;;
7435esac
7436
7437
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007438ARCH_RUN_32BIT=""
7439
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007440case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007441 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007442 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7443 if test "${enable_universalsdk}"; then
7444 :
7445 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007446 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007447 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007449 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007450 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007451 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007452 if test ${gcc_version} '<' 4.0
7453 then
7454 LIBTOOL_CRUFT="-lcc_dynamic"
7455 else
7456 LIBTOOL_CRUFT=""
7457 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007459 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007462/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007463
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007464 #include <unistd.h>
7465 int main(int argc, char*argv[])
7466 {
7467 if (sizeof(long) == 4) {
7468 return 0;
7469 } else {
7470 return 1;
7471 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007472 }
7473
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007475if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007476 ac_osx_32bit=yes
7477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007482fi
7483
7484
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007485 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007486 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007487 i386)
7488 MACOSX_DEFAULT_ARCH="i386"
7489 ;;
7490 ppc)
7491 MACOSX_DEFAULT_ARCH="ppc"
7492 ;;
7493 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007494 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007495 ;;
7496 esac
7497 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007498 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007499 i386)
7500 MACOSX_DEFAULT_ARCH="x86_64"
7501 ;;
7502 ppc)
7503 MACOSX_DEFAULT_ARCH="ppc64"
7504 ;;
7505 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007506 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007507 ;;
7508 esac
7509
7510 #ARCH_RUN_32BIT="true"
7511 fi
7512
7513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007514 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007515 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007516esac
7517
Matthias Kloseb9621712010-04-24 17:59:49 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7519$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007520if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007521then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007522 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007523 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007524 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007527
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7529$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007530 if test $enable_shared = "yes"
7531 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007532 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 +00007533 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007534else
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007537fi
7538
Matthias Kloseb9621712010-04-24 17:59:49 +00007539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7540$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007541case $ac_sys_system/$ac_sys_release in
7542 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007543
Matthias Kloseb9621712010-04-24 17:59:49 +00007544$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007545
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7547$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007548 ;;
7549 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007552 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007553esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007554
Guido van Rossum0a516c91994-09-12 10:58:40 +00007555# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556
Michael W. Hudson54241132001-12-07 15:38:26 +00007557
7558
7559
7560
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561
Thomas Wouters477c8d52006-05-27 19:21:47 +00007562
Georg Brandlb1441c72009-01-03 22:33:39 +00007563
Thomas Wouters477c8d52006-05-27 19:21:47 +00007564cat >>confdefs.h <<_ACEOF
7565#define SHLIB_EXT "$SO"
7566_ACEOF
7567
Guido van Rossum0a516c91994-09-12 10:58:40 +00007568# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007569# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007570# (Shared libraries in this instance are shared modules to be loaded into
7571# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7573$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007574if test -z "$LDSHARED"
7575then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007577 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007578 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007579 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007580 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007581 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007582 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007584 if test "$GCC" = "yes" ; then
7585 LDSHARED='$(CC) -shared'
7586 LDCXXSHARED='$(CXX) -shared'
7587 else
7588 LDSHARED='$(CC) -G'
7589 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007590 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007591 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007592 if test "$GCC" = "yes" ; then
7593 LDSHARED='$(CC) -shared'
7594 LDCXXSHARED='$(CXX) -shared'
7595 else
7596 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007597 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007598 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007599 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -bundle'
7601 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007602 if test "$enable_framework" ; then
7603 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007604 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7605 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007606 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007607 else
7608 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007609 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007610 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007611 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007612 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007613 LDSHARED='$(CC) -bundle'
7614 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007615 if test "$enable_framework" ; then
7616 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007617 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7618 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007619 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007620 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007621 # No framework, use the Python app as bundle-loader
7622 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007623 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007624 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007625 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007626 Darwin/*)
7627 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7628 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007629
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007630 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007631 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007632 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007633 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007634 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007635 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7636 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007638 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007639 LDSHARED='$(CC) -bundle'
7640 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007641 if test "$enable_framework" ; then
7642 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007643 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7644 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007645 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007646 else
7647 # No framework, use the Python app as bundle-loader
7648 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7649 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007650 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007651 fi
7652 fi
7653 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007654 Linux*|GNU*|QNX*)
7655 LDSHARED='$(CC) -shared'
7656 LDCXXSHARED='$(CXX) -shared';;
7657 BSD/OS*/4*)
7658 LDSHARED="gcc -shared"
7659 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007660 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007662 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007663 LDSHARED='$(CC) -shared'
7664 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007665 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007666 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007667 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007668 OpenBSD*)
7669 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7670 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007671 LDSHARED='$(CC) -shared $(CCSHARED)'
7672 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007673 else
7674 case `uname -r` in
7675 [01].* | 2.[0-7] | 2.[0-7].*)
7676 LDSHARED="ld -Bshareable ${LDFLAGS}"
7677 ;;
7678 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007679 LDSHARED='$(CC) -shared $(CCSHARED)'
7680 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007681 ;;
7682 esac
7683 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007684 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007685 LDSHARED='$(CC) -shared'
7686 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007687 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007688 if test "$GCC" = "yes" ; then
7689 LDSHARED='$(CC) -shared'
7690 LDCXXSHARED='$(CXX) -shared'
7691 else
7692 LDSHARED='$(CC) -G'
7693 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007694 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007695 SCO_SV*)
7696 LDSHARED='$(CC) -Wl,-G,-Bexport'
7697 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7698 CYGWIN*)
7699 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7700 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007701 *) LDSHARED="ld";;
7702 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7705$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007706LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007707BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007709# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7711$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712if test -z "$CCSHARED"
7713then
Guido van Rossum07397971997-04-29 21:49:50 +00007714 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007715 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007716 then CCSHARED="-fPIC";
7717 elif test `uname -p` = sparc;
7718 then CCSHARED="-xcode=pic32";
7719 else CCSHARED="-Kpic";
7720 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007721 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007722 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007723 else CCSHARED="+z";
7724 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007725 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007726 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007727 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007728 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007729 if test "$GCC" = "yes"
7730 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007731 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007732 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007733 SCO_SV*)
7734 if test "$GCC" = "yes"
7735 then CCSHARED="-fPIC"
7736 else CCSHARED="-Kpic -belf"
7737 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007738 IRIX*/6*) case $CC in
7739 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007740 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007741 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007742 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7745$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007746# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007747# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7749$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007750if test -z "$LINKFORSHARED"
7751then
Guido van Rossum07397971997-04-29 21:49:50 +00007752 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007753 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007754 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007755 LINKFORSHARED="-Wl,-E -Wl,+s";;
7756# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007757 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007758 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007759 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007761 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007762 if test "$enable_framework"
7763 then
Jack Jansenda49e192005-01-07 13:08:22 +00007764 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007765 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007766 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007767 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007768 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007769 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007770 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007771 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7772 then
7773 LINKFORSHARED="-Wl,--export-dynamic"
7774 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007775 SunOS/5*) case $CC in
7776 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007777 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007778 then
7779 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007780 fi;;
7781 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007782 CYGWIN*)
7783 if test $enable_shared = "no"
7784 then
7785 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7786 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007787 QNX*)
7788 # -Wl,-E causes the symbols to be added to the dynamic
7789 # symbol table so that they can be found when a module
7790 # is loaded. -N 2048K causes the stack size to be set
7791 # to 2048 kilobytes so that the stack doesn't overflow
7792 # when running test_compile.py.
7793 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007794 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7797$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007798
Michael W. Hudson54241132001-12-07 15:38:26 +00007799
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007800
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7802$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007803if test ! "$LIBRARY" = "$LDLIBRARY"
7804then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007805 case $ac_sys_system in
7806 CYGWIN*)
7807 # Cygwin needs CCSHARED when building extension DLLs
7808 # but not when building the interpreter DLL.
7809 CFLAGSFORSHARED='';;
7810 *)
7811 CFLAGSFORSHARED='$(CCSHARED)'
7812 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7815$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007816
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007817# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7818# library (with --enable-shared).
7819# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007820# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7821# if it is not required, since it creates a dependency of the shared library
7822# to LIBS. This, in turn, means that applications linking the shared libpython
7823# don't need to link LIBS explicitly. The default should be only changed
7824# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007825
Matthias Kloseb9621712010-04-24 17:59:49 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7827$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007828case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007829 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007830 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007831esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7833$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007834
7835
Guido van Rossum627b2d71993-12-24 10:39:16 +00007836# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7838$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007839if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007841else
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007843LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847/* Override any GCC internal prototype to avoid an error.
7848 Use char because int might match the return type of a GCC
7849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850#ifdef __cplusplus
7851extern "C"
7852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007853char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007854int
7855main ()
7856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ;
7859 return 0;
7860}
7861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864else
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867rm -f core conftest.err conftest.$ac_objext \
7868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7872$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007873if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 cat >>confdefs.h <<_ACEOF
7875#define HAVE_LIBDL 1
7876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007878 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007880fi
7881 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7883$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007884if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007886else
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007888LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892/* Override any GCC internal prototype to avoid an error.
7893 Use char because int might match the return type of a GCC
7894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895#ifdef __cplusplus
7896extern "C"
7897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007898char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899int
7900main ()
7901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ;
7904 return 0;
7905}
7906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912rm -f core conftest.err conftest.$ac_objext \
7913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7917$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007918if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 cat >>confdefs.h <<_ACEOF
7920#define HAVE_LIBDLD 1
7921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007923 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007925fi
7926 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007927
Georg Brandlb1441c72009-01-03 22:33:39 +00007928# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007929if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7931$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007932if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007934else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007935 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939/* Override any GCC internal prototype to avoid an error.
7940 Use char because int might match the return type of a GCC
7941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942#ifdef __cplusplus
7943extern "C"
7944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007945char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007946int
7947main ()
7948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 ;
7951 return 0;
7952}
7953_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954for ac_lib in '' pthread rt posix4; do
7955 if test -z "$ac_lib"; then
7956 ac_res="none required"
7957 else
7958 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964rm -f core conftest.err conftest.$ac_objext \
7965 conftest$ac_exeext
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007966 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969done
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007970if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972else
7973 ac_cv_search_sem_init=no
7974fi
7975rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007976LIBS=$ac_func_search_save_LIBS
7977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7979$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007981if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007983
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007984fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007985 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007986 # posix4 on Solaris 2.6
7987 # pthread (first!) on Linux
7988fi
7989
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7992$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02007993if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007995else
7996 ac_check_lib_save_LIBS=$LIBS
7997LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001/* Override any GCC internal prototype to avoid an error.
8002 Use char because int might match the return type of a GCC
8003 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008004#ifdef __cplusplus
8005extern "C"
8006#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008008int
8009main ()
8010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012 ;
8013 return 0;
8014}
8015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008017 ac_cv_lib_intl_textdomain=yes
8018else
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021rm -f core conftest.err conftest.$ac_objext \
8022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008023LIBS=$ac_check_lib_save_LIBS
8024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8026$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008027if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030
Brett Cannonc6d936e2009-06-07 20:09:53 +00008031 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008032fi
8033
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008034
8035# checks for system dependent C++ extensions support
8036case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8038$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Georg Brandl59e87bd2011-02-15 19:48:59 +00008042 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008046loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ;
8048 return 0;
8049}
Matthias Kloseb159a552010-04-25 21:00:44 +00008050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008052if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008053
Matthias Kloseb159a552010-04-25 21:00:44 +00008054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008056
Matthias Kloseb159a552010-04-25 21:00:44 +00008057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008058$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008059
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008060else
Matthias Kloseb159a552010-04-25 21:00:44 +00008061
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008063$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008064
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066rm -f core conftest.err conftest.$ac_objext \
8067 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008068 *) ;;
8069esac
8070
Guido van Rossum70c7f481998-03-26 18:44:10 +00008071# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8073$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008074if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008076else
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008078LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085#ifdef __cplusplus
8086extern "C"
8087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008088char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008089int
8090main ()
8091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ;
8094 return 0;
8095}
8096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008099else
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102rm -f core conftest.err conftest.$ac_objext \
8103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008104LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8107$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008108if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008109 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008110fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008111 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8113$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008114if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116else
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008118LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122/* Override any GCC internal prototype to avoid an error.
8123 Use char because int might match the return type of a GCC
8124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008125#ifdef __cplusplus
8126extern "C"
8127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008128char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008129int
8130main ()
8131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ;
8134 return 0;
8135}
8136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008144LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8147$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008148if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008149 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008150fi
8151 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8154$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8160$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008161LIBS="$withval $LIBS"
8162
8163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166fi
8167
Guido van Rossum7f43da71994-08-01 12:15:30 +00008168
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008169if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8171set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8173$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008174if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008176else
8177 case $PKG_CONFIG in
8178 [\\/]* | ?:[\\/]*)
8179 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8180 ;;
8181 *)
8182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8183for as_dir in $PATH
8184do
8185 IFS=$as_save_IFS
8186 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8189 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008191 break 2
8192 fi
8193done
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195IFS=$as_save_IFS
8196
8197 ;;
8198esac
8199fi
8200PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8201if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8203$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008204else
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008207fi
8208
8209
8210fi
8211if test -z "$ac_cv_path_PKG_CONFIG"; then
8212 ac_pt_PKG_CONFIG=$PKG_CONFIG
8213 # Extract the first word of "pkg-config", so it can be a program name with args.
8214set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008217if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008219else
8220 case $ac_pt_PKG_CONFIG in
8221 [\\/]* | ?:[\\/]*)
8222 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8223 ;;
8224 *)
8225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228 IFS=$as_save_IFS
8229 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8232 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008234 break 2
8235 fi
8236done
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008238IFS=$as_save_IFS
8239
8240 ;;
8241esac
8242fi
8243ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8244if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8246$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008247else
Matthias Kloseb9621712010-04-24 17:59:49 +00008248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008250fi
8251
8252 if test "x$ac_pt_PKG_CONFIG" = x; then
8253 PKG_CONFIG=""
8254 else
8255 case $cross_compiling:$ac_tool_warned in
8256yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008259ac_tool_warned=yes ;;
8260esac
8261 PKG_CONFIG=$ac_pt_PKG_CONFIG
8262 fi
8263else
8264 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8265fi
8266
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008267
8268# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8270$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008271
8272# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008275else
8276 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008277fi
8278
8279
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8281$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008282
8283# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8285$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008286
8287# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008289 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008290else
8291 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008292fi
8293
8294
8295if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008296 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8297else
8298 LIBFFI_INCLUDEDIR=""
8299fi
8300
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8303$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008304
Benjamin Peterson076ed002010-10-31 17:11:02 +00008305# Check for support for loadable sqlite extensions
8306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8307$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8308# Check whether --enable-loadable-sqlite-extensions was given.
8309if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8310 enableval=$enable_loadable_sqlite_extensions;
8311else
8312 enable_loadable_sqlite_extensions="no"
8313fi
8314
8315
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8317$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8318
Matthias Klose55708cc2009-04-30 08:06:49 +00008319# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8321$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008322
8323# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008325 withval=$with_dbmliborder;
8326if test x$with_dbmliborder = xyes
8327then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008328as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008329else
8330 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8331 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8332 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008333 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008334 fi
8335 done
8336fi
8337fi
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8340$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008341
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008342# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008343
8344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8346$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008348# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008349if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350 withval=$with_signal_module;
8351fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008352
8353
8354if test -z "$with_signal_module"
8355then with_signal_module="yes"
8356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8358$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008359
8360if test "${with_signal_module}" = "yes"; then
8361 USE_SIGNAL_MODULE=""
8362 SIGNAL_OBJS=""
8363else
8364 USE_SIGNAL_MODULE="#"
8365 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8366fi
8367
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008368# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008369
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008370USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8373$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
Guido van Rossumec2f0731997-01-22 20:54:01 +00008375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008377if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8380$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008381LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008382if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008383 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008384fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388fi
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390
8391# Templates for things AC_DEFINEd more than once.
8392# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008393
8394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8398$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008401if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402 withval=$with_threads;
8403fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008404
8405
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008406# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008409if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410 withval=$with_thread; with_threads=$with_thread
8411fi
8412
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008413
8414if test -z "$with_threads"
8415then with_threads="yes"
8416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8418$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008419
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008420
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008421if test "$with_threads" = "no"
8422then
8423 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008424elif test "$ac_cv_pthread_is_default" = yes
8425then
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008427
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008428 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008430
8431 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008433elif test "$ac_cv_kpthread" = "yes"
8434then
8435 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008436 if test "$ac_cv_cxx_thread" = "yes"; then
8437 CXX="$CXX -Kpthread"
8438 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008441 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008442 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008443elif test "$ac_cv_kthread" = "yes"
8444then
8445 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008446 if test "$ac_cv_cxx_thread" = "yes"; then
8447 CXX="$CXX -Kthread"
8448 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008450
8451 posix_threads=yes
8452 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008453elif test "$ac_cv_pthread" = "yes"
8454then
8455 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008456 if test "$ac_cv_cxx_thread" = "yes"; then
8457 CXX="$CXX -pthread"
8458 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008460
8461 posix_threads=yes
8462 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008463else
8464 if test ! -z "$with_threads" -a -d "$with_threads"
8465 then LDFLAGS="$LDFLAGS -L$with_threads"
8466 fi
8467 if test ! -z "$withval" -a -d "$withval"
8468 then LDFLAGS="$LDFLAGS -L$withval"
8469 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008470
8471 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008472 # define _POSIX_THREADS in unistd.h. Some apparently don't
8473 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8475$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008477/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008478
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008479#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008480#ifdef _POSIX_THREADS
8481yes
8482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
8484_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008487 unistd_defines_pthreads=yes
8488else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008489 unistd_defines_pthreads=no
8490fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008491rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8494$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008497
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008499if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Matthias Kloseb9621712010-04-24 17:59:49 +00008505$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008506
8507 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008508 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008509else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008512if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517
Matthias Kloseb9621712010-04-24 17:59:49 +00008518$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008519
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008520 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008521else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008522
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008523 # Just looking for pthread_create in libpthread is not enough:
8524 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8525 # So we really have to include pthread.h, and then link.
8526 _libs=$LIBS
8527 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8529$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008531/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008532#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008533
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008534void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008535int
8536main ()
8537{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008538
8539pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008540 ;
8541 return 0;
8542}
8543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8547$as_echo "yes" >&6; }
8548 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008549
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008551 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008552else
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008554 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008556if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008560 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008561else
Guido van Rossumad678af1998-10-02 14:42:15 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8564$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008565if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008567else
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008569LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573/* Override any GCC internal prototype to avoid an error.
8574 Use char because int might match the return type of a GCC
8575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008576#ifdef __cplusplus
8577extern "C"
8578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008579char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008580int
8581main ()
8582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ;
8585 return 0;
8586}
8587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593rm -f core conftest.err conftest.$ac_objext \
8594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008595LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8598$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008599if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008602 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008603 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008604 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008605else
Greg Steinadf63d62000-07-05 10:38:09 +00008606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8608$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008609if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008611else
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008613LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617/* Override any GCC internal prototype to avoid an error.
8618 Use char because int might match the return type of a GCC
8619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008620#ifdef __cplusplus
8621extern "C"
8622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008623char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ;
8629 return 0;
8630}
8631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008632if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008634else
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637rm -f core conftest.err conftest.$ac_objext \
8638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008639LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8642$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008643if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008646 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008647 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008648 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008649else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008650
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8652$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008653if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008655else
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008657LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661/* Override any GCC internal prototype to avoid an error.
8662 Use char because int might match the return type of a GCC
8663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008664#ifdef __cplusplus
8665extern "C"
8666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008667char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008668int
8669main ()
8670{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 ;
8673 return 0;
8674}
8675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008676if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681rm -f core conftest.err conftest.$ac_objext \
8682 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008683LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8686$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008687if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008689
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008690 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008691 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008692 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008693else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008694
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8696$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008697if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008699else
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008701LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705/* Override any GCC internal prototype to avoid an error.
8706 Use char because int might match the return type of a GCC
8707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708#ifdef __cplusplus
8709extern "C"
8710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008711char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008712int
8713main ()
8714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ;
8717 return 0;
8718}
8719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008720if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008722else
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725rm -f core conftest.err conftest.$ac_objext \
8726 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008727LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8730$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008731if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008733
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008734 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008735 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008736 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008737else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008738
Martin v. Löwis130fb172001-07-19 11:00:41 +00008739 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008740fi
8741
Guido van Rossum627b2d71993-12-24 10:39:16 +00008742
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008743fi
8744
Guido van Rossum0be3e491997-05-22 20:33:33 +00008745fi
8746
Guido van Rossum49545951997-12-02 19:28:29 +00008747fi
8748
Guido van Rossumb93a8621998-05-07 13:27:32 +00008749fi
8750
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752rm -f core conftest.err conftest.$ac_objext \
8753 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754fi
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756
8757fi
8758
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008759
Michael W. Hudson54241132001-12-07 15:38:26 +00008760
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8762$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008763if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008765else
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008767LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771/* Override any GCC internal prototype to avoid an error.
8772 Use char because int might match the return type of a GCC
8773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774#ifdef __cplusplus
8775extern "C"
8776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008777char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ;
8783 return 0;
8784}
8785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791rm -f core conftest.err conftest.$ac_objext \
8792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8796$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008797if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008799
Martin v. Löwis130fb172001-07-19 11:00:41 +00008800 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008801 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008802 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008803fi
8804
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008805
Neal Norwitza978ab02002-11-02 16:58:05 +00008806 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8808$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008809if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008811else
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008813LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817/* Override any GCC internal prototype to avoid an error.
8818 Use char because int might match the return type of a GCC
8819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820#ifdef __cplusplus
8821extern "C"
8822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008823char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ;
8829 return 0;
8830}
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008834else
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837rm -f core conftest.err conftest.$ac_objext \
8838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8842$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008843if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008845
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008846 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008847 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008848 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008849fi
8850
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008851 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008852
Martin v. Löwis130fb172001-07-19 11:00:41 +00008853 if test "$USE_THREAD_MODULE" != "#"
8854 then
8855 # If the above checks didn't disable threads, (at least) OSF1
8856 # needs this '-threads' argument during linking.
8857 case $ac_sys_system in
8858 OSF1) LDLAST=-threads;;
8859 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008860 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008861fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008862
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008863if test "$posix_threads" = "yes"; then
8864 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867
8868 fi
8869
8870 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8871 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008872 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008873$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008874
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008875 ;;
8876 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008877$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008878
8879 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008880 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008882
8883 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008884 esac
8885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8887$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008888 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008892 ac_cv_pthread_system_supported=no
8893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008896#include <pthread.h>
8897 void *foo(void *parm) {
8898 return NULL;
8899 }
8900 main() {
8901 pthread_attr_t attr;
8902 pthread_t id;
8903 if (pthread_attr_init(&attr)) exit(-1);
8904 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8905 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8906 exit(0);
8907 }
8908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008909if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008910 ac_cv_pthread_system_supported=yes
8911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8915 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008916fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918
Guido van Rossum627b2d71993-12-24 10:39:16 +00008919fi
8920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8922$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008923 if test "$ac_cv_pthread_system_supported" = "yes"; then
8924
Matthias Kloseb9621712010-04-24 17:59:49 +00008925$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008926
8927 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 for ac_func in pthread_sigmask
8929do :
8930 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02008931if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008932 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008933#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008934_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008935 case $ac_sys_system in
8936 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008937
Matthias Kloseb9621712010-04-24 17:59:49 +00008938$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008939
8940 ;;
8941 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008942fi
8943done
8944
8945fi
8946
8947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008949
Matthias Kloseb9621712010-04-24 17:59:49 +00008950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8951$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008953if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958 ipv6=no
8959 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8961$as_echo "yes" >&6; }
8962 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963
8964 ipv6=yes
8965 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967else
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008970
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973 ipv6=no
8974
8975else
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978 /* AF_INET6 available check */
8979#include <sys/types.h>
8980#include <sys/socket.h>
8981main()
8982{
8983 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8984 exit(1);
8985 else
8986 exit(0);
8987}
8988
Martin v. Löwis11437992002-04-12 09:54:03 +00008989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008990if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008991
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8993$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996else
Matthias Kloseb159a552010-04-25 21:00:44 +00008997
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009001
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
9006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009008if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9010$as_echo_n "checking if RFC2553 API is available... " >&6; }
9011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009013
9014 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009015#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
9018{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009019struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009020 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 ;
9022 return 0;
9023}
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009027
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009029$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009030 ipv6=yes
9031
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009032else
Matthias Kloseb159a552010-04-25 21:00:44 +00009033
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009036 ipv6=no
9037
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009040fi
9041
9042if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009044
9045fi
9046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047fi
9048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049
9050ipv6type=unknown
9051ipv6lib=none
9052ipv6trylibc=no
9053
9054if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9056$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009057 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9058 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059 case $i in
9060 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064#include <netinet/in.h>
9065#ifdef IPV6_INRIA_VERSION
9066yes
9067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009071 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009073rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074
9075 ;;
9076 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009078/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009079
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080#include <netinet/in.h>
9081#ifdef __KAME__
9082yes
9083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087 ipv6type=$i;
9088 ipv6lib=inet6
9089 ipv6libdir=/usr/local/v6/lib
9090 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009092rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009093
9094 ;;
9095 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099#include <features.h>
9100#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9101yes
9102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009106 ipv6type=$i;
9107 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009109rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110
9111 ;;
9112 linux-inet6)
9113 if test -d /usr/inet6; then
9114 ipv6type=$i
9115 ipv6lib=inet6
9116 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009117 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118 fi
9119 ;;
9120 solaris)
9121 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009122 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123 ipv6type=$i
9124 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009125 fi
9126 fi
9127 ;;
9128 toshiba)
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 _TOSHIBA_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 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150#include </usr/local/v6/include/sys/v6config.h>
9151#ifdef __V6D__
9152yes
9153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009154_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009157 ipv6type=$i;
9158 ipv6lib=v6;
9159 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009160 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163
9164 ;;
9165 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169#include <sys/param.h>
9170#ifdef _ZETA_MINAMI_INET6
9171yes
9172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009175 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176 ipv6type=$i;
9177 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009178 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009180rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181
9182 ;;
9183 esac
9184 if test "$ipv6type" != "unknown"; then
9185 break
9186 fi
9187 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9189$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190fi
9191
9192if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9193 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9194 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9195 echo "using lib$ipv6lib"
9196 else
9197 if test $ipv6trylibc = "yes"; then
9198 echo "using libc"
9199 else
9200 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9201 echo "You need to fetch lib$ipv6lib.a from appropriate"
9202 echo 'ipv6 kit and compile beforehand.'
9203 exit 1
9204 fi
9205 fi
9206fi
9207
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9209$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009211/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009212
9213 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009214int
9215main ()
9216{
9217FSIORefNum fRef = 0
9218 ;
9219 return 0;
9220}
Matthias Kloseb159a552010-04-25 21:00:44 +00009221
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009223if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009224
Matthias Kloseb159a552010-04-25 21:00:44 +00009225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009227
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9229$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009230
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009231else
Matthias Kloseb159a552010-04-25 21:00:44 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009235
9236fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9238
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009239# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9241$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009244if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009245 withval=$with_doc_strings;
9246fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009247
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009248
9249if test -z "$with_doc_strings"
9250then with_doc_strings="yes"
9251fi
9252if test "$with_doc_strings" != "no"
9253then
9254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009256
9257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9259$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009260
Antoine Pitrou042b1282010-08-13 21:15:58 +00009261# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9263$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009266if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009268if test "$withval" != no
9269then
9270
Matthias Kloseb9621712010-04-24 17:59:49 +00009271$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009272
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9274$as_echo "yes" >&6; }
9275else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009277fi
9278else
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281fi
9282
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009283
9284# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9286$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009289if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 withval=$with_pymalloc;
9291fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Neil Schemenauera35c6882001-02-27 04:45:05 +00009293
Neil Schemenauer16c22972002-03-22 15:34:49 +00009294if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009295then
9296 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009297 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009298fi
9299if test "$with_pymalloc" != "no"
9300then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009303
9304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9306$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009307
Benjamin Peterson05159c42009-12-03 03:01:27 +00009308# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9310$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009311
9312# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009313if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009314 withval=$with_valgrind;
9315else
9316 with_valgrind=no
9317fi
9318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9320$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009321if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009323if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009326
9327else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009328 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009329
9330fi
9331
9332
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009333 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009334fi
9335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009336# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009337
Guido van Rossum98935bf2001-09-05 19:13:16 +00009338DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009339
Guido van Rossume97ee181999-12-20 21:27:22 +00009340# the dlopen() function means we might want to use dynload_shlib.o. some
9341# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009342for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009343do :
9344 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009345if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009348_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009349
Guido van Rossume97ee181999-12-20 21:27:22 +00009350fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009351done
Guido van Rossume97ee181999-12-20 21:27:22 +00009352
Michael W. Hudson54241132001-12-07 15:38:26 +00009353
Guido van Rossume97ee181999-12-20 21:27:22 +00009354# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9355# loading of modules.
9356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9358$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009359if test -z "$DYNLOADFILE"
9360then
9361 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009362 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9363 if test "$ac_cv_func_dlopen" = yes
9364 then DYNLOADFILE="dynload_shlib.o"
9365 else DYNLOADFILE="dynload_aix.o"
9366 fi
9367 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009368 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009369 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9370 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009371 *)
9372 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9373 # out any dynamic loading
9374 if test "$ac_cv_func_dlopen" = yes
9375 then DYNLOADFILE="dynload_shlib.o"
9376 else DYNLOADFILE="dynload_stub.o"
9377 fi
9378 ;;
9379 esac
9380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9382$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009383if test "$DYNLOADFILE" != "dynload_stub.o"
9384then
Martin v. Löwis11437992002-04-12 09:54:03 +00009385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009387
9388fi
9389
Neil Schemenauer4e425612001-06-19 15:44:15 +00009390# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9391
Michael W. Hudson54241132001-12-07 15:38:26 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9394$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009395if test -z "$MACHDEP_OBJS"
9396then
Jack Jansene578a632001-08-15 01:27:14 +00009397 MACHDEP_OBJS=$extra_machdep_objs
9398else
9399 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9402$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009403
Guido van Rossum627b2d71993-12-24 10:39:16 +00009404# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009405for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009406 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009407 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009408 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009409 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009410 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009411 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009412 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9413 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009414 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009415 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009416 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009417 truncate uname unsetenv utimes waitpid wait3 wait4 \
9418 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009419do :
9420 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9421ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009422if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009424#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009427fi
9428done
9429
Michael W. Hudson54241132001-12-07 15:38:26 +00009430
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009431# For some functions, having a definition is not sufficient, since
9432# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9434$as_echo_n "checking for chroot... " >&6; }
9435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009438int
9439main ()
9440{
9441void *x=chroot
9442 ;
9443 return 0;
9444}
9445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009447
Matthias Kloseb9621712010-04-24 17:59:49 +00009448$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009449
Matthias Kloseb159a552010-04-25 21:00:44 +00009450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009451$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452else
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9454$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009455
9456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9459$as_echo_n "checking for link... " >&6; }
9460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009461/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009462#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463int
9464main ()
9465{
9466void *x=link
9467 ;
9468 return 0;
9469}
9470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009472
Matthias Kloseb9621712010-04-24 17:59:49 +00009473$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009474
Matthias Kloseb159a552010-04-25 21:00:44 +00009475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009476$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009480
9481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9484$as_echo_n "checking for symlink... " >&6; }
9485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009486/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009487#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009488int
9489main ()
9490{
9491void *x=symlink
9492 ;
9493 return 0;
9494}
9495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009497
Matthias Kloseb9621712010-04-24 17:59:49 +00009498$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009499
Matthias Kloseb159a552010-04-25 21:00:44 +00009500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009501$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009502else
Matthias Kloseb9621712010-04-24 17:59:49 +00009503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9504$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009505
9506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9509$as_echo_n "checking for fchdir... " >&6; }
9510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009511/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009512#include <unistd.h>
9513int
9514main ()
9515{
9516void *x=fchdir
9517 ;
9518 return 0;
9519}
9520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009522
Matthias Kloseb9621712010-04-24 17:59:49 +00009523$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009524
Matthias Kloseb159a552010-04-25 21:00:44 +00009525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009526$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009527else
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9529$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009530
9531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9534$as_echo_n "checking for fsync... " >&6; }
9535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009536/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009537#include <unistd.h>
9538int
9539main ()
9540{
9541void *x=fsync
9542 ;
9543 return 0;
9544}
9545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009547
Matthias Kloseb9621712010-04-24 17:59:49 +00009548$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009549
Matthias Kloseb159a552010-04-25 21:00:44 +00009550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009551$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009552else
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009555
9556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9559$as_echo_n "checking for fdatasync... " >&6; }
9560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009562#include <unistd.h>
9563int
9564main ()
9565{
9566void *x=fdatasync
9567 ;
9568 return 0;
9569}
9570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009572
Matthias Kloseb9621712010-04-24 17:59:49 +00009573$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009574
Matthias Kloseb159a552010-04-25 21:00:44 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009577else
Matthias Kloseb9621712010-04-24 17:59:49 +00009578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9579$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009580
9581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9584$as_echo_n "checking for epoll... " >&6; }
9585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009586/* end confdefs.h. */
9587#include <sys/epoll.h>
9588int
9589main ()
9590{
9591void *x=epoll_create
9592 ;
9593 return 0;
9594}
9595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009599
Matthias Kloseb159a552010-04-25 21:00:44 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009602else
Matthias Kloseb9621712010-04-24 17:59:49 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009605
9606fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9609$as_echo_n "checking for kqueue... " >&6; }
9610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009611/* end confdefs.h. */
9612
9613#include <sys/types.h>
9614#include <sys/event.h>
9615
9616int
9617main ()
9618{
9619int x=kqueue()
9620 ;
9621 return 0;
9622}
9623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009624if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009627
Matthias Kloseb159a552010-04-25 21:00:44 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009629$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009630else
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009633
9634fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009636# On some systems (eg. FreeBSD 5), we would find a definition of the
9637# functions ctermid_r, setgroups in the library, but no prototype
9638# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9639# address to avoid compiler warnings and potential miscompilations
9640# because of the missing prototypes.
9641
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9643$as_echo_n "checking for ctermid_r... " >&6; }
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009646
Martin v. Löwisd5843682002-11-21 20:41:28 +00009647#include <stdio.h>
9648
Martin v. Löwisd5843682002-11-21 20:41:28 +00009649int
9650main ()
9651{
9652void* p = ctermid_r
9653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009658
Matthias Kloseb9621712010-04-24 17:59:49 +00009659$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009660
Matthias Kloseb159a552010-04-25 21:00:44 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009663else
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009666
9667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9669
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9671$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009672if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009673 $as_echo_n "(cached) " >&6
9674else
9675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009677#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009678int
9679main ()
9680{
9681void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009682
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009683 ;
9684 return 0;
9685}
9686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009687if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009688 ac_cv_flock_decl=yes
9689else
9690 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009691
9692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009694
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009695fi
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9697$as_echo "$ac_cv_flock_decl" >&6; }
9698if test "x${ac_cv_flock_decl}" = xyes; then
9699 for ac_func in flock
9700do :
9701 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009702if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009703 cat >>confdefs.h <<_ACEOF
9704#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009705_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009706
Antoine Pitroua3000072010-09-07 14:52:42 +00009707else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009709$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009710if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009711 $as_echo_n "(cached) " >&6
9712else
9713 ac_check_lib_save_LIBS=$LIBS
9714LIBS="-lbsd $LIBS"
9715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9716/* end confdefs.h. */
9717
9718/* Override any GCC internal prototype to avoid an error.
9719 Use char because int might match the return type of a GCC
9720 builtin and then its argument prototype would still apply. */
9721#ifdef __cplusplus
9722extern "C"
9723#endif
9724char flock ();
9725int
9726main ()
9727{
9728return flock ();
9729 ;
9730 return 0;
9731}
9732_ACEOF
9733if ac_fn_c_try_link "$LINENO"; then :
9734 ac_cv_lib_bsd_flock=yes
9735else
9736 ac_cv_lib_bsd_flock=no
9737fi
9738rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
9740LIBS=$ac_check_lib_save_LIBS
9741fi
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9743$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009744if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009745 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009746
9747
9748$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9749
9750
9751fi
9752
9753
9754fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009755done
9756
Antoine Pitroua3000072010-09-07 14:52:42 +00009757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758
Matthias Kloseb9621712010-04-24 17:59:49 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9760$as_echo_n "checking for getpagesize... " >&6; }
9761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009762/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009763
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009764#include <unistd.h>
9765
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009766int
9767main ()
9768{
9769void* p = getpagesize
9770 ;
9771 return 0;
9772}
9773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009774if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009775
Matthias Kloseb9621712010-04-24 17:59:49 +00009776$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009777
Matthias Kloseb159a552010-04-25 21:00:44 +00009778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009779$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9782$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009783
9784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009786
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009787for ac_prog in true
9788do
9789 # Extract the first word of "$ac_prog", so it can be a program name with args.
9790set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9792$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009793if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009795else
9796 if test -n "$TRUE"; then
9797 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9798else
9799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802 IFS=$as_save_IFS
9803 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805 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 +00009806 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 $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 +00009808 break 2
9809 fi
9810done
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009813
9814fi
9815fi
9816TRUE=$ac_cv_prog_TRUE
9817if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9819$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009823fi
9824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826 test -n "$TRUE" && break
9827done
9828test -n "$TRUE" || TRUE="/bin/true"
9829
9830
Matthias Kloseb9621712010-04-24 17:59:49 +00009831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9832$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009833if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009835else
9836 ac_check_lib_save_LIBS=$LIBS
9837LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841/* Override any GCC internal prototype to avoid an error.
9842 Use char because int might match the return type of a GCC
9843 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009844#ifdef __cplusplus
9845extern "C"
9846#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009848int
9849main ()
9850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009852 ;
9853 return 0;
9854}
9855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009856if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009857 ac_cv_lib_c_inet_aton=yes
9858else
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861rm -f core conftest.err conftest.$ac_objext \
9862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863LIBS=$ac_check_lib_save_LIBS
9864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9866$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009867if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009868 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009869else
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9871$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009872if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009874else
9875 ac_check_lib_save_LIBS=$LIBS
9876LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880/* Override any GCC internal prototype to avoid an error.
9881 Use char because int might match the return type of a GCC
9882 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009883#ifdef __cplusplus
9884extern "C"
9885#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009887int
9888main ()
9889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009891 ;
9892 return 0;
9893}
9894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009896 ac_cv_lib_resolv_inet_aton=yes
9897else
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900rm -f core conftest.err conftest.$ac_objext \
9901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009902LIBS=$ac_check_lib_save_LIBS
9903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9905$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009906if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009907 cat >>confdefs.h <<_ACEOF
9908#define HAVE_LIBRESOLV 1
9909_ACEOF
9910
9911 LIBS="-lresolv $LIBS"
9912
9913fi
9914
9915
9916fi
9917
9918
Christian Heimesd0764e22007-12-04 15:00:33 +00009919# On Tru64, chflags seems to be present, but calling it will
9920# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9922$as_echo_n "checking for chflags... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009923if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009927 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009930/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009931
Christian Heimesd0764e22007-12-04 15:00:33 +00009932#include <sys/stat.h>
9933#include <unistd.h>
9934int main(int argc, char*argv[])
9935{
9936 if(chflags(argv[0], 0) != 0)
9937 return 1;
9938 return 0;
9939}
Ned Deily3eb67d52011-06-28 00:00:28 -07009940
Christian Heimesd0764e22007-12-04 15:00:33 +00009941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009942if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009943 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009944else
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009949fi
9950
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9954$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009955if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009957if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009958 ac_cv_have_chflags="yes"
9959else
9960 ac_cv_have_chflags="no"
9961fi
9962
9963fi
9964if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009967
9968fi
9969
Matthias Kloseb9621712010-04-24 17:59:49 +00009970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9971$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +02009972if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009974else
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009976 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009979/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009980
Christian Heimesd0764e22007-12-04 15:00:33 +00009981#include <sys/stat.h>
9982#include <unistd.h>
9983int main(int argc, char*argv[])
9984{
9985 if(lchflags(argv[0], 0) != 0)
9986 return 1;
9987 return 0;
9988}
Ned Deily3eb67d52011-06-28 00:00:28 -07009989
Christian Heimesd0764e22007-12-04 15:00:33 +00009990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009992 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009993else
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009998fi
9999
10000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10003$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010004if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010006if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010007 ac_cv_have_lchflags="yes"
10008else
10009 ac_cv_have_lchflags="no"
10010fi
10011
10012fi
10013if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010016
10017fi
10018
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010019case $ac_sys_system/$ac_sys_release in
10020Darwin/*)
10021 _CUR_CFLAGS="${CFLAGS}"
10022 _CUR_LDFLAGS="${LDFLAGS}"
10023 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10024 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10025 ;;
10026esac
10027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10029$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010030if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010032else
10033 ac_check_lib_save_LIBS=$LIBS
10034LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010036/* end confdefs.h. */
10037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038/* Override any GCC internal prototype to avoid an error.
10039 Use char because int might match the return type of a GCC
10040 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010041#ifdef __cplusplus
10042extern "C"
10043#endif
10044char inflateCopy ();
10045int
10046main ()
10047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010049 ;
10050 return 0;
10051}
10052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010054 ac_cv_lib_z_inflateCopy=yes
10055else
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010060LIBS=$ac_check_lib_save_LIBS
10061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10063$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010064if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010065
Matthias Kloseb9621712010-04-24 17:59:49 +000010066$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010067
10068fi
10069
10070
10071case $ac_sys_system/$ac_sys_release in
10072Darwin/*)
10073 CFLAGS="${_CUR_CFLAGS}"
10074 LDFLAGS="${_CUR_LDFLAGS}"
10075 ;;
10076esac
10077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10079$as_echo_n "checking for hstrerror... " >&6; }
10080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010081/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010082
Martin v. Löwise9416172003-05-03 10:12:45 +000010083#include <netdb.h>
10084
Martin v. Löwise9416172003-05-03 10:12:45 +000010085int
10086main ()
10087{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010088void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010089 ;
10090 return 0;
10091}
10092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010094
Matthias Kloseb9621712010-04-24 17:59:49 +000010095$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010096
Matthias Kloseb159a552010-04-25 21:00:44 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010098$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010102
10103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010104rm -f core conftest.err conftest.$ac_objext \
10105 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106
Matthias Kloseb9621712010-04-24 17:59:49 +000010107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10108$as_echo_n "checking for inet_aton... " >&6; }
10109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010111
Martin v. Löwis86d66262006-02-17 08:40:11 +000010112#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010113#include <sys/socket.h>
10114#include <netinet/in.h>
10115#include <arpa/inet.h>
10116
Martin v. Löwise9416172003-05-03 10:12:45 +000010117int
10118main ()
10119{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010120void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010121 ;
10122 return 0;
10123}
10124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010126
Matthias Kloseb9621712010-04-24 17:59:49 +000010127$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010128
Matthias Kloseb159a552010-04-25 21:00:44 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010134
10135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010136rm -f core conftest.err conftest.$ac_objext \
10137 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010138
Matthias Kloseb9621712010-04-24 17:59:49 +000010139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10140$as_echo_n "checking for inet_pton... " >&6; }
10141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010143
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010144#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010145#include <sys/socket.h>
10146#include <netinet/in.h>
10147#include <arpa/inet.h>
10148
Martin v. Löwise9416172003-05-03 10:12:45 +000010149int
10150main ()
10151{
10152void* p = inet_pton
10153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010158
Matthias Kloseb9621712010-04-24 17:59:49 +000010159$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
Matthias Kloseb159a552010-04-25 21:00:44 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010163else
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010166
10167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010169
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010170# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10172$as_echo_n "checking for setgroups... " >&6; }
10173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010175
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010176#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010177#ifdef HAVE_GRP_H
10178#include <grp.h>
10179#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010180
Martin v. Löwisd5843682002-11-21 20:41:28 +000010181int
10182main ()
10183{
10184void* p = setgroups
10185 ;
10186 return 0;
10187}
10188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010192
Matthias Kloseb159a552010-04-25 21:00:44 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010194$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010198
10199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010201
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010202# check for openpty and forkpty
10203
10204for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010205do :
10206 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010207if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010209#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010210_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010212else
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10214$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010215if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010217else
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010219LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223/* Override any GCC internal prototype to avoid an error.
10224 Use char because int might match the return type of a GCC
10225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010226#ifdef __cplusplus
10227extern "C"
10228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010229char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230int
10231main ()
10232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240else
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010245LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10248$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010249if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010251 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010252else
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10254$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010255if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010257else
10258 ac_check_lib_save_LIBS=$LIBS
10259LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010261/* end confdefs.h. */
10262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263/* Override any GCC internal prototype to avoid an error.
10264 Use char because int might match the return type of a GCC
10265 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269char openpty ();
10270int
10271main ()
10272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279 ac_cv_lib_bsd_openpty=yes
10280else
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010285LIBS=$ac_check_lib_save_LIBS
10286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10288$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010289if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010291 LIBS="$LIBS -lbsd"
10292fi
10293
10294
10295fi
10296
Fred Drake8cef4cf2000-06-28 16:40:38 +000010297
10298fi
10299done
10300
10301for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010302do :
10303 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010304if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010307_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308
Fred Drake8cef4cf2000-06-28 16:40:38 +000010309else
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10311$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010312if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010314else
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010316LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320/* Override any GCC internal prototype to avoid an error.
10321 Use char because int might match the return type of a GCC
10322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010323#ifdef __cplusplus
10324extern "C"
10325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010326char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010327int
10328main ()
10329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010337else
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010340rm -f core conftest.err conftest.$ac_objext \
10341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010342LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10345$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010346if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010348 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010349else
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10351$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010352if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010354else
10355 ac_check_lib_save_LIBS=$LIBS
10356LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010358/* end confdefs.h. */
10359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360/* Override any GCC internal prototype to avoid an error.
10361 Use char because int might match the return type of a GCC
10362 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010363#ifdef __cplusplus
10364extern "C"
10365#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010366char forkpty ();
10367int
10368main ()
10369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376 ac_cv_lib_bsd_forkpty=yes
10377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380rm -f core conftest.err conftest.$ac_objext \
10381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010382LIBS=$ac_check_lib_save_LIBS
10383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10385$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010386if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010388 LIBS="$LIBS -lbsd"
10389fi
10390
10391
10392fi
10393
Fred Drake8cef4cf2000-06-28 16:40:38 +000010394
10395fi
10396done
10397
Jack Jansendd19cf82001-12-06 22:36:17 +000010398
Christian Heimesb186d002008-03-18 15:15:01 +000010399# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010400for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010401do :
10402 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010403if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010404 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010405#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010406_ACEOF
10407
10408fi
10409done
10410
10411
Michael W. Hudson54241132001-12-07 15:38:26 +000010412# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010413for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010414do :
10415 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10416ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010417if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010420_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010422fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010423done
10424
Michael W. Hudson54241132001-12-07 15:38:26 +000010425
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010426ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010427if test "x$ac_cv_func_dup2" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010428 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010429
Martin v. Löwis1142de32002-03-29 16:28:31 +000010430else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010431 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010432 *" dup2.$ac_objext "* ) ;;
10433 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010435esac
10436
Martin v. Löwis1142de32002-03-29 16:28:31 +000010437fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010438
10439ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010440if test "x$ac_cv_func_getcwd" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010441 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10442
10443else
10444 case " $LIBOBJS " in
10445 *" getcwd.$ac_objext "* ) ;;
10446 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10447 ;;
10448esac
10449
10450fi
10451
10452ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010453if test "x$ac_cv_func_strdup" = xyes; then :
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010454 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10455
10456else
10457 case " $LIBOBJS " in
10458 *" strdup.$ac_objext "* ) ;;
10459 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10460 ;;
10461esac
10462
10463fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010464
10465
10466for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010467do :
10468 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010469if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010471#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010475#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010476int
10477main ()
10478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010479getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010487
Guido van Rossum627b2d71993-12-24 10:39:16 +000010488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010492done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010493
Jack Jansen150753c2003-03-29 22:07:47 +000010494for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010495do :
10496 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010497if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010498 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010502/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010503#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010504int
10505main ()
10506{
10507setpgrp(0,0);
10508 ;
10509 return 0;
10510}
10511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010515
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010518
10519fi
10520done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010521
Thomas Wouters3a584202000-08-05 23:28:51 +000010522for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010523do :
10524 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010525if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010527#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010530/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010532int
10533main ()
10534{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010535gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ;
10537 return 0;
10538}
10539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010540if ac_fn_c_try_compile "$LINENO"; then :
10541
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542else
Skip Montanaro6dead952003-09-25 14:50:04 +000010543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545
Martin v. Löwis11437992002-04-12 09:54:03 +000010546
Guido van Rossum627b2d71993-12-24 10:39:16 +000010547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010549
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010551done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010552
Michael W. Hudson54241132001-12-07 15:38:26 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10555$as_echo_n "checking for major... " >&6; }
10556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010558
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010559#if defined(MAJOR_IN_MKDEV)
10560#include <sys/mkdev.h>
10561#elif defined(MAJOR_IN_SYSMACROS)
10562#include <sys/sysmacros.h>
10563#else
10564#include <sys/types.h>
10565#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010566
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010567int
10568main ()
10569{
10570
10571 makedev(major(0),minor(0));
10572
10573 ;
10574 return 0;
10575}
10576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010578
10579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010581
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10583$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010584
10585else
Skip Montanaro6dead952003-09-25 14:50:04 +000010586
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10588$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010589
10590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591rm -f core conftest.err conftest.$ac_objext \
10592 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010594# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010595# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10597$as_echo_n "checking for getaddrinfo... " >&6; }
10598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010600
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010601#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010602#include <sys/socket.h>
10603#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010604#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010605
Martin v. Löwis11437992002-04-12 09:54:03 +000010606int
10607main ()
10608{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010609getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010615 have_getaddrinfo=yes
10616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010619rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10622$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010623if test $have_getaddrinfo = yes
10624then
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10626$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010627 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010629else
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010635
10636#include <sys/types.h>
10637#include <netdb.h>
10638#include <string.h>
10639#include <sys/socket.h>
10640#include <netinet/in.h>
10641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010642int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010643{
10644 int passive, gaierr, inet4 = 0, inet6 = 0;
10645 struct addrinfo hints, *ai, *aitop;
10646 char straddr[INET6_ADDRSTRLEN], strport[16];
10647
10648 for (passive = 0; passive <= 1; passive++) {
10649 memset(&hints, 0, sizeof(hints));
10650 hints.ai_family = AF_UNSPEC;
10651 hints.ai_flags = passive ? AI_PASSIVE : 0;
10652 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010653 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010654 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10655 (void)gai_strerror(gaierr);
10656 goto bad;
10657 }
10658 for (ai = aitop; ai; ai = ai->ai_next) {
10659 if (ai->ai_addr == NULL ||
10660 ai->ai_addrlen == 0 ||
10661 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10662 straddr, sizeof(straddr), strport, sizeof(strport),
10663 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10664 goto bad;
10665 }
10666 switch (ai->ai_family) {
10667 case AF_INET:
10668 if (strcmp(strport, "54321") != 0) {
10669 goto bad;
10670 }
10671 if (passive) {
10672 if (strcmp(straddr, "0.0.0.0") != 0) {
10673 goto bad;
10674 }
10675 } else {
10676 if (strcmp(straddr, "127.0.0.1") != 0) {
10677 goto bad;
10678 }
10679 }
10680 inet4++;
10681 break;
10682 case AF_INET6:
10683 if (strcmp(strport, "54321") != 0) {
10684 goto bad;
10685 }
10686 if (passive) {
10687 if (strcmp(straddr, "::") != 0) {
10688 goto bad;
10689 }
10690 } else {
10691 if (strcmp(straddr, "::1") != 0) {
10692 goto bad;
10693 }
10694 }
10695 inet6++;
10696 break;
10697 case AF_UNSPEC:
10698 goto bad;
10699 break;
10700 default:
10701 /* another family support? */
10702 break;
10703 }
10704 }
10705 }
10706
10707 if (!(inet4 == 0 || inet4 == 2))
10708 goto bad;
10709 if (!(inet6 == 0 || inet6 == 2))
10710 goto bad;
10711
10712 if (aitop)
10713 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010714 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010715
10716 bad:
10717 if (aitop)
10718 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010719 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010720}
10721
Martin v. Löwis11437992002-04-12 09:54:03 +000010722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010724 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010732fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010733
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10737$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10738
Mark Dickinson2df5d282009-12-31 21:22:50 +000010739if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010740then
10741 if test $ipv6 = yes
10742 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010743 echo 'Fatal: You must get working getaddrinfo() function.'
10744 echo ' or you can specify "--disable-ipv6"'.
10745 exit 1
10746 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010747else
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010750
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010751fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010752
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010753for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010754do :
10755 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010756if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010758#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010759_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010760
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010761fi
10762done
10763
Michael W. Hudson54241132001-12-07 15:38:26 +000010764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010765# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10767$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010768if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773#include <sys/types.h>
10774#include <sys/time.h>
10775#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010776
Martin v. Löwis11437992002-04-12 09:54:03 +000010777int
10778main ()
10779{
10780if ((struct tm *) 0)
10781return 0;
10782 ;
10783 return 0;
10784}
10785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010787 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10794$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010795if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798
10799fi
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10802$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010803if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808#include <sys/types.h>
10809#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
Martin v. Löwis11437992002-04-12 09:54:03 +000010811int
10812main ()
10813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814struct tm tm;
10815 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 ;
10818 return 0;
10819}
10820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010821if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010822 ac_cv_struct_tm=time.h
10823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10829$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010830if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833
10834fi
10835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836ac_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 +000010837#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010840if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
10842cat >>confdefs.h <<_ACEOF
10843#define HAVE_STRUCT_TM_TM_ZONE 1
10844_ACEOF
10845
10846
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010848
Martin v. Löwis11437992002-04-12 09:54:03 +000010849if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010852
10853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10855"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010856if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858else
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860fi
10861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010863#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010864_ACEOF
10865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10867$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010868if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010873#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874#if !HAVE_DECL_TZNAME
10875extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010877
Martin v. Löwis11437992002-04-12 09:54:03 +000010878int
10879main ()
10880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ;
10883 return 0;
10884}
10885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887 ac_cv_var_tzname=yes
10888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010891rm -f core conftest.err conftest.$ac_objext \
10892 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10895$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010896 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010897
Matthias Kloseb9621712010-04-24 17:59:49 +000010898$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900 fi
10901fi
10902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010904if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
10906cat >>confdefs.h <<_ACEOF
10907#define HAVE_STRUCT_STAT_ST_RDEV 1
10908_ACEOF
10909
10910
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010911fi
10912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010914if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916cat >>confdefs.h <<_ACEOF
10917#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10918_ACEOF
10919
10920
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010921fi
10922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010924if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010925
10926cat >>confdefs.h <<_ACEOF
10927#define HAVE_STRUCT_STAT_ST_FLAGS 1
10928_ACEOF
10929
10930
10931fi
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010934if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010935
10936cat >>confdefs.h <<_ACEOF
10937#define HAVE_STRUCT_STAT_ST_GEN 1
10938_ACEOF
10939
10940
10941fi
10942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010944if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010945
10946cat >>confdefs.h <<_ACEOF
10947#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10948_ACEOF
10949
10950
10951fi
10952
Matthias Kloseb9621712010-04-24 17:59:49 +000010953ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010954if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010955
Martin v. Löwis11437992002-04-12 09:54:03 +000010956cat >>confdefs.h <<_ACEOF
10957#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10958_ACEOF
10959
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010962
10963else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010965 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10967 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010968esac
10969
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010970fi
10971
Michael W. Hudson54241132001-12-07 15:38:26 +000010972
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10975$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020010976if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978else
Matthias Kloseb159a552010-04-25 21:00:44 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010981/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010982#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010983int
10984main ()
10985{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ;
10988 return 0;
10989}
10990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992 ac_cv_header_time_altzone=yes
10993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998fi
10999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11001$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005
11006fi
11007
Guido van Rossumda88dad1995-01-26 00:46:29 +000011008was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11010$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011013
11014#include <sys/types.h>
11015#include <sys/select.h>
11016#include <sys/time.h>
11017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018int
11019main ()
11020{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 ;
11023 return 0;
11024}
11025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011027
11028
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011031 was_it_defined=yes
11032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11036$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11039$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011040if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011042else
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011044/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011045#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011046int
11047main ()
11048{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011049struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011055 ac_cv_struct_addrinfo=yes
11056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11060fi
11061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11063$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011064if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Matthias Kloseb9621712010-04-24 17:59:49 +000011066$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067
11068fi
11069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11071$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011072if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +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öwis01dfdb32001-06-23 16:30:13 +000011077
11078# include <sys/types.h>
11079# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011083struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011089 ac_cv_struct_sockaddr_storage=yes
11090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11094fi
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11097$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011098if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011099
Matthias Kloseb9621712010-04-24 17:59:49 +000011100$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011101
11102fi
11103
Guido van Rossum627b2d71993-12-24 10:39:16 +000011104# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11107$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011108if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011110else
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011113$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011114int
11115main ()
11116{
11117static int test_array [1 - 2 * !(((char) -1) < 0)];
11118test_array [0] = 0
11119
11120 ;
11121 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011122}
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011124if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011125 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011126else
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11132$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011135
11136fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011137
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11139$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011140if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011142else
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145
Martin v. Löwis11437992002-04-12 09:54:03 +000011146int
11147main ()
11148{
11149/* FIXME: Include the comments suggested by Paul. */
11150#ifndef __cplusplus
11151 /* Ultrix mips cc rejects this. */
11152 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155 char const *const *pcpcc;
11156 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 /* NEC SVR4.0.2 mips cc rejects this. */
11158 struct point {int x, y;};
11159 static struct point const zero = {0,0};
11160 /* AIX XL C 1.02.0.0 rejects this.
11161 It does not let you subtract one const X* pointer from another in
11162 an arm of an if-expression whose if-part is not a constant
11163 expression */
11164 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167 ++pcpcc;
11168 ppc = (char**) pcpcc;
11169 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 { /* SCO 3.2v4 cc rejects this. */
11171 char *t;
11172 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 }
11177 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11178 int x[] = {25, 17};
11179 const int *foo = &x[0];
11180 ++foo;
11181 }
11182 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11183 typedef const int *iptr;
11184 iptr p = 0;
11185 ++p;
11186 }
11187 { /* AIX XL C 1.02.0.0 rejects this saying
11188 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11189 struct s { int j; const int *ap[3]; };
11190 struct s *b; b->j = 5;
11191 }
11192 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11193 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011197#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ;
11200 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011201}
Martin v. Löwis11437992002-04-12 09:54:03 +000011202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204 ac_cv_c_const=yes
11205else
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11211$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215
11216fi
11217
Michael W. Hudson54241132001-12-07 15:38:26 +000011218
Guido van Rossumda88dad1995-01-26 00:46:29 +000011219works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11221$as_echo_n "checking for working volatile... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011224
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011228volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011234 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011235else
Skip Montanaro6dead952003-09-25 14:50:04 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011239
Guido van Rossum627b2d71993-12-24 10:39:16 +000011240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11243$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011244
Guido van Rossumda88dad1995-01-26 00:46:29 +000011245works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11247$as_echo_n "checking for working signed char... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011260 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011261else
Skip Montanaro6dead952003-09-25 14:50:04 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011265
Guido van Rossum7f43da71994-08-01 12:15:30 +000011266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11269$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011270
Guido van Rossumda88dad1995-01-26 00:46:29 +000011271have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11273$as_echo_n "checking for prototypes... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011276int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Matthias Kloseb159a552010-04-25 21:00:44 +000011289 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +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: $have_prototypes" >&5
11293$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011294
Guido van Rossumda88dad1995-01-26 00:46:29 +000011295works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11297$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011300
11301#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011302int foo(int x, ...) {
11303 va_list va;
11304 va_start(va, x);
11305 va_arg(va, int);
11306 va_arg(va, char *);
11307 va_arg(va, double);
11308 return 0;
11309}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311int
11312main ()
11313{
Guido van Rossum90eea071996-08-30 20:58:57 +000011314return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
11321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011324 works=yes
11325
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11329$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330
Martin v. Löwisd6320502004-08-12 13:45:08 +000011331# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11333$as_echo_n "checking for socketpair... " >&6; }
11334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011335/* end confdefs.h. */
11336
11337#include <sys/types.h>
11338#include <sys/socket.h>
11339
11340int
11341main ()
11342{
11343void *x=socketpair
11344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011351
Matthias Kloseb159a552010-04-25 21:00:44 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011353$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011354else
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011357
11358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011360
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011361# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11363$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011365/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011366#include <sys/types.h>
11367#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011368int
11369main ()
11370{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011371struct sockaddr x;
11372x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_compile "$LINENO"; then :
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11379$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011382
11383else
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011389
Guido van Rossumda88dad1995-01-26 00:46:29 +000011390va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11392$as_echo_n "checking whether va_list is an array... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395
11396#ifdef HAVE_STDARG_PROTOTYPES
11397#include <stdarg.h>
11398#else
11399#include <varargs.h>
11400#endif
11401
Martin v. Löwis11437992002-04-12 09:54:03 +000011402int
11403main ()
11404{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011405va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410if ac_fn_c_try_compile "$LINENO"; then :
11411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011412else
Skip Montanaro6dead952003-09-25 14:50:04 +000011413
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Guido van Rossumda88dad1995-01-26 00:46:29 +000011417 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11422$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
11426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011428if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11433$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434 OLD_CFLAGS=$CFLAGS
11435 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011437/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011438
11439# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
Martin v. Löwis11437992002-04-12 09:54:03 +000011441int
11442main ()
11443{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011444
11445 char *name;
11446 struct hostent *he, *res;
11447 char buffer[2048];
11448 int buflen = 2048;
11449 int h_errnop;
11450
11451 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
11453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011460
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11465$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011467else
Skip Montanaro6dead952003-09-25 14:50:04 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11472$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011474/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011475
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011476# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011481
11482 char *name;
11483 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011484 char buffer[2048];
11485 int buflen = 2048;
11486 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011487
Matthias Kloseb159a552010-04-25 21:00:44 +000011488 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
11490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011495
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011497
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Matthias Kloseb159a552010-04-25 21:00:44 +000011499$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11502$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011504else
Skip Montanaro6dead952003-09-25 14:50:04 +000011505
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11509$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511/* end confdefs.h. */
11512
11513# include <netdb.h>
11514
11515int
11516main ()
11517{
11518
11519 char *name;
11520 struct hostent *he;
11521 struct hostent_data data;
11522
11523 (void) gethostbyname_r(name, he, &data);
11524
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529if ac_fn_c_try_compile "$LINENO"; then :
11530
11531 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11532
11533
11534$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11535
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
11538
11539else
11540
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011552 CFLAGS=$OLD_CFLAGS
11553
11554else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 for ac_func in gethostbyname
11557do :
11558 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011559if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011561#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011562_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011564fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011565done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011566
Michael W. Hudson54241132001-12-07 15:38:26 +000011567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011568fi
11569
Michael W. Hudson54241132001-12-07 15:38:26 +000011570
11571
11572
11573
11574
11575
Guido van Rossum627b2d71993-12-24 10:39:16 +000011576# checks for system services
11577# (none yet)
11578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011579# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011580ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011581if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011582
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11585$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011586if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588else
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011590LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594/* Override any GCC internal prototype to avoid an error.
11595 Use char because int might match the return type of a GCC
11596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011597#ifdef __cplusplus
11598extern "C"
11599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011600char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011601int
11602main ()
11603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 ;
11606 return 0;
11607}
11608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011614rm -f core conftest.err conftest.$ac_objext \
11615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011616LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11619$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011620if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 cat >>confdefs.h <<_ACEOF
11622#define HAVE_LIBIEEE 1
11623_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011624
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011625 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
Guido van Rossum627b2d71993-12-24 10:39:16 +000011627fi
11628
Michael W. Hudson54241132001-12-07 15:38:26 +000011629
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011630fi
11631
Michael W. Hudson54241132001-12-07 15:38:26 +000011632
Guido van Rossum7f253911997-05-09 02:42:48 +000011633# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11635$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011637# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011640if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011641then
11642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11646$as_echo "yes" >&6; }
11647else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011649fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653fi
11654
Guido van Rossum7f253911997-05-09 02:42:48 +000011655
Guido van Rossum7f43da71994-08-01 12:15:30 +000011656# check for --with-libm=...
11657
Guido van Rossum563e7081996-09-10 18:20:48 +000011658case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011659Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011660*) LIBM=-lm
11661esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11663$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011668if test "$withval" = no
11669then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11671$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011672elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011673then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11675$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011676else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011677fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11680$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681fi
11682
Guido van Rossum7f43da71994-08-01 12:15:30 +000011683
11684# check for --with-libc=...
11685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11687$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011691 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011692if test "$withval" = no
11693then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11695$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011696elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011697then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11699$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011700else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011701fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11704$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705fi
11706
Guido van Rossum7f43da71994-08-01 12:15:30 +000011707
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708# **************************************************
11709# * Check for various properties of floating point *
11710# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11713$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011714if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716else
11717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719 ac_cv_little_endian_double=no
11720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722/* end confdefs.h. */
11723
11724#include <string.h>
11725int main() {
11726 double x = 9006104071832581.0;
11727 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11728 return 0;
11729 else
11730 return 1;
11731}
11732
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735 ac_cv_little_endian_double=yes
11736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741fi
11742
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743fi
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11746$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747if test "$ac_cv_little_endian_double" = yes
11748then
11749
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751
11752fi
11753
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11755$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011756if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758else
11759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761 ac_cv_big_endian_double=no
11762else
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764/* end confdefs.h. */
11765
11766#include <string.h>
11767int main() {
11768 double x = 9006104071832581.0;
11769 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11770 return 0;
11771 else
11772 return 1;
11773}
11774
11775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777 ac_cv_big_endian_double=yes
11778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11782 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783fi
11784
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785fi
11786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11788$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011789if test "$ac_cv_big_endian_double" = yes
11790then
11791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011793
11794fi
11795
11796# Some ARM platforms use a mixed-endian representation for doubles.
11797# While Python doesn't currently have full support for these platforms
11798# (see e.g., issue 1762561), we can at least make sure that float <-> string
11799# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11801$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011802if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804else
11805
Matthias Kloseb9621712010-04-24 17:59:49 +000011806if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807 ac_cv_mixed_endian_double=no
11808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011810/* end confdefs.h. */
11811
11812#include <string.h>
11813int main() {
11814 double x = 9006104071832581.0;
11815 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11816 return 0;
11817 else
11818 return 1;
11819}
11820
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011823 ac_cv_mixed_endian_double=yes
11824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829fi
11830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831fi
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11834$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011835if test "$ac_cv_mixed_endian_double" = yes
11836then
11837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011839
11840fi
11841
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011842# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011843# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011844# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011845# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011846# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011847# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011848
11849# This inline assembler syntax may also work for suncc and icc,
11850# so we try it on all platforms.
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11853$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855/* end confdefs.h. */
11856
11857int
11858main ()
11859{
11860
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011861 unsigned short cw;
11862 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11863 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011864
11865 ;
11866 return 0;
11867}
11868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011870 have_gcc_asm_for_x87=yes
11871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11876$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011877if test "$have_gcc_asm_for_x87" = yes
11878then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011883
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011884# Detect whether system arithmetic is subject to x87-style double
11885# rounding issues. The result of this test has little meaning on non
11886# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11887# mode is round-to-nearest and double rounding issues are present, and
11888# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11890$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011891# $BASECFLAGS may affect the result
11892ac_save_cc="$CC"
11893CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011894if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011895 ac_cv_x87_double_rounding=no
11896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011898/* end confdefs.h. */
11899
11900#include <stdlib.h>
11901#include <math.h>
11902int main() {
11903 volatile double x, y, z;
11904 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11905 x = 0.99999999999999989; /* 1-2**-53 */
11906 y = 1./x;
11907 if (y != 1.)
11908 exit(0);
11909 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11910 x = 1e16;
11911 y = 2.99999;
11912 z = x + y;
11913 if (z != 1e16+4.)
11914 exit(0);
11915 /* both tests show evidence of double rounding */
11916 exit(1);
11917}
11918
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921 ac_cv_x87_double_rounding=no
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927fi
11928
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011929CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11931$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932if test "$ac_cv_x87_double_rounding" = yes
11933then
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011936
11937fi
11938
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011939# ************************************
11940# * Check for mathematical functions *
11941# ************************************
11942
11943LIBS_SAVE=$LIBS
11944LIBS="$LIBS $LIBM"
11945
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011946for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11947do :
11948 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11949ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011950if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011951 cat >>confdefs.h <<_ACEOF
11952#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11953_ACEOF
11954
11955fi
11956done
11957
11958for ac_func in hypot lgamma log1p round tgamma
11959do :
11960 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11961ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011962if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011963 cat >>confdefs.h <<_ACEOF
11964#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11965_ACEOF
11966
11967fi
11968done
11969
11970ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11971"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011972if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973 ac_have_decl=1
11974else
11975 ac_have_decl=0
11976fi
11977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_DECL_ISINF $ac_have_decl
11980_ACEOF
11981ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11982"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011983if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011984 ac_have_decl=1
11985else
11986 ac_have_decl=0
11987fi
11988
11989cat >>confdefs.h <<_ACEOF
11990#define HAVE_DECL_ISNAN $ac_have_decl
11991_ACEOF
11992ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11993"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020011994if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011995 ac_have_decl=1
11996else
11997 ac_have_decl=0
11998fi
11999
12000cat >>confdefs.h <<_ACEOF
12001#define HAVE_DECL_ISFINITE $ac_have_decl
12002_ACEOF
12003
12004
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012005# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12006# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12008$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012009if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012011else
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012014 ac_cv_tanh_preserves_zero_sign=no
12015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012017/* end confdefs.h. */
12018
12019#include <math.h>
12020#include <stdlib.h>
12021int main() {
12022 /* return 0 if either negative zeros don't exist
12023 on this platform or if negative zeros exist
12024 and tanh(-0.) == -0. */
12025 if (atan2(0., -1.) == atan2(-0., -1.) ||
12026 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12027 else exit(1);
12028}
12029
12030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012031if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012032 ac_cv_tanh_preserves_zero_sign=yes
12033else
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012038fi
12039
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012040fi
12041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12043$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012044if test "$ac_cv_tanh_preserves_zero_sign" = yes
12045then
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012048
12049fi
12050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012051if test "$ac_cv_func_log1p" = yes
12052then
12053 # On some versions of AIX, log1p(-0.) returns 0. instead of
12054 # -0. See issue #9920.
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12056$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012057 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012058 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012059else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012060
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012061 if test "$cross_compiling" = yes; then :
12062 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012063else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12065/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012066
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012067 #include <math.h>
12068 #include <stdlib.h>
12069 int main() {
12070 /* Fail if the signs of log1p(-0.) and -0. can be
12071 distinguished. */
12072 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12073 return 0;
12074 else
12075 return 1;
12076 }
12077
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012078_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012079if ac_fn_c_try_run "$LINENO"; then :
12080 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012081else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012082 ac_cv_log1p_drops_zero_sign=yes
12083fi
12084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012086fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012087
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012088fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012089
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12091$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12092fi
12093if test "$ac_cv_log1p_drops_zero_sign" = yes
12094then
12095
12096$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12097
12098fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012099
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012100LIBS=$LIBS_SAVE
12101
Mark Dickinsona614f042009-11-28 12:48:43 +000012102# For multiprocessing module, check that sem_open
12103# actually works. For FreeBSD versions <= 7.2,
12104# the kernel module that provides POSIX semaphores
12105# isn't loaded by default, so an attempt to call
12106# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12108$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012109if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012113 ac_cv_posix_semaphores_enabled=yes
12114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012116/* end confdefs.h. */
12117
12118#include <unistd.h>
12119#include <fcntl.h>
12120#include <stdio.h>
12121#include <semaphore.h>
12122#include <sys/stat.h>
12123
12124int main(void) {
12125 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12126 if (a == SEM_FAILED) {
12127 perror("sem_open");
12128 return 1;
12129 }
12130 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012131 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012132 return 0;
12133}
12134
12135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012136if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012137 ac_cv_posix_semaphores_enabled=yes
12138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012143fi
12144
12145
Mark Dickinsona614f042009-11-28 12:48:43 +000012146fi
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12149$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012150if test $ac_cv_posix_semaphores_enabled = no
12151then
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012154
12155fi
12156
Mark Dickinson10683072009-04-18 21:18:19 +000012157# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12159$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012160if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012164 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012167/* end confdefs.h. */
12168
12169#include <unistd.h>
12170#include <fcntl.h>
12171#include <stdio.h>
12172#include <semaphore.h>
12173#include <sys/stat.h>
12174
12175int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012176 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012177 int count;
12178 int res;
12179 if(a==SEM_FAILED){
12180 perror("sem_open");
12181 return 1;
12182
12183 }
12184 res = sem_getvalue(a, &count);
12185 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012186 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012187 return res==-1 ? 1 : 0;
12188}
12189
Mark Dickinson10683072009-04-18 21:18:19 +000012190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012198fi
12199
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012201fi
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12204$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012205if test $ac_cv_broken_sem_getvalue = yes
12206then
12207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012209
12210fi
12211
Mark Dickinsonbd792642009-03-18 20:06:12 +000012212# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12214$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012215# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012217 enableval=$enable_big_digits; case $enable_big_digits in
12218yes)
12219 enable_big_digits=30 ;;
12220no)
12221 enable_big_digits=15 ;;
1222215|30)
12223 ;;
12224*)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012225 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 +000012226esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12228$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012229
12230cat >>confdefs.h <<_ACEOF
12231#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12232_ACEOF
12233
12234
12235else
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12237$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012238fi
12239
12240
Guido van Rossumef2255b2000-03-10 22:30:29 +000012241# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012242ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012243if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
12245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012248 wchar_h="yes"
12249
Guido van Rossumef2255b2000-03-10 22:30:29 +000012250else
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012252
12253fi
12254
Michael W. Hudson54241132001-12-07 15:38:26 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012257# determine wchar_t size
12258if test "$wchar_h" = yes
12259then
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12263# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12265$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012266if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12270"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 if test "$ac_cv_type_wchar_t" = yes; then
12274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012276as_fn_error 77 "cannot compute sizeof (wchar_t)
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012277See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 else
12279 ac_cv_sizeof_wchar_t=0
12280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282
Martin v. Löwis11437992002-04-12 09:54:03 +000012283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12285$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286
12287
12288
Martin v. Löwis11437992002-04-12 09:54:03 +000012289cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012290#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012291_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012292
Michael W. Hudson54241132001-12-07 15:38:26 +000012293
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012294fi
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12297$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012298have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012301
12302#include <tcl.h>
12303#if TCL_UTF_MAX != 6
12304# error "NOT UCS4_TCL"
12305#endif
12306int
12307main ()
12308{
12309
12310 ;
12311 return 0;
12312}
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012315
12316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012318
12319 have_ucs4_tcl=yes
12320
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12324$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012325
Skip Montanaro6dead952003-09-25 14:50:04 +000012326# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012327if test "$wchar_h" = yes
12328then
12329 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12331$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012332 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012334else
12335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012337 ac_cv_wchar_t_signed=yes
12338else
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012340/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012341
12342 #include <wchar.h>
12343 int main()
12344 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012345 /* Success: exit code 0 */
12346 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012347 }
12348
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012351 ac_cv_wchar_t_signed=yes
12352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012357fi
12358
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012359fi
12360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12362$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363fi
12364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12366$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012367
12368# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012369if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012370 withval=$with_wide_unicode;
12371if test "$withval" != no
12372then unicode_size="4"
12373else unicode_size="2"
12374fi
12375
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012376else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012379 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012380 *) unicode_size="2" ;;
12381esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012383fi
12384
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012385
12386
Georg Brandl52d168a2008-01-07 18:10:24 +000012387case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012388 4)
12389 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12390
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012391 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012392 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012394 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012395esac
12396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
Georg Brandl52d168a2008-01-07 18:10:24 +000012399# wchar_t is only usable if it maps to an unsigned type
12400if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012401 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012402then
12403 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012408
Georg Brandl52d168a2008-01-07 18:10:24 +000012409elif test "$ac_cv_sizeof_short" = "$unicode_size"
12410then
12411 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012413
Georg Brandl52d168a2008-01-07 18:10:24 +000012414elif test "$ac_cv_sizeof_long" = "$unicode_size"
12415then
12416 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012418
Georg Brandl52d168a2008-01-07 18:10:24 +000012419else
12420 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12423$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012424
12425# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12427$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012428if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 ac_cv_c_bigendian=unknown
12432 # See if we're dealing with a universal compiler.
12433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12434/* end confdefs.h. */
12435#ifndef __APPLE_CC__
12436 not a universal capable compiler
12437 #endif
12438 typedef int dummy;
12439
Skip Montanaro6dead952003-09-25 14:50:04 +000012440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441if ac_fn_c_try_compile "$LINENO"; then :
12442
12443 # Check for potential -arch flags. It is not universal unless
12444 # there are at least two -arch flags with different values.
12445 ac_arch=
12446 ac_prev=
12447 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12448 if test -n "$ac_prev"; then
12449 case $ac_word in
12450 i?86 | x86_64 | ppc | ppc64)
12451 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12452 ac_arch=$ac_word
12453 else
12454 ac_cv_c_bigendian=universal
12455 break
12456 fi
12457 ;;
12458 esac
12459 ac_prev=
12460 elif test "x$ac_word" = "x-arch"; then
12461 ac_prev=arch
12462 fi
12463 done
12464fi
12465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12466 if test $ac_cv_c_bigendian = unknown; then
12467 # See if sys/param.h defines the BYTE_ORDER macro.
12468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012470#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Matthias Kloseb9621712010-04-24 17:59:49 +000012476#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12477 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12478 && LITTLE_ENDIAN)
12479 bogus endian macros
12480 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
12482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012490#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012496#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 not big endian
12498 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
12500 ;
12501 return 0;
12502}
12503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012504if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012505 ac_cv_c_bigendian=yes
12506else
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012510fi
12511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12512 fi
12513 if test $ac_cv_c_bigendian = unknown; then
12514 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012517#include <limits.h>
12518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Matthias Kloseb9621712010-04-24 17:59:49 +000012522#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12523 bogus endian macros
12524 #endif
12525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_compile "$LINENO"; then :
12531 # It does; now see whether it defined to _BIG_ENDIAN or not.
12532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533/* end confdefs.h. */
12534#include <limits.h>
12535
12536int
12537main ()
12538{
12539#ifndef _BIG_ENDIAN
12540 not big endian
12541 #endif
12542
12543 ;
12544 return 0;
12545}
12546_ACEOF
12547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012549else
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12553fi
12554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12555 fi
12556 if test $ac_cv_c_bigendian = unknown; then
12557 # Compile a test program.
12558 if test "$cross_compiling" = yes; then :
12559 # Try to guess by grepping values from an object file.
12560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561/* end confdefs.h. */
12562short int ascii_mm[] =
12563 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12564 short int ascii_ii[] =
12565 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12566 int use_ascii (int i) {
12567 return ascii_mm[i] + ascii_ii[i];
12568 }
12569 short int ebcdic_ii[] =
12570 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12571 short int ebcdic_mm[] =
12572 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12573 int use_ebcdic (int i) {
12574 return ebcdic_mm[i] + ebcdic_ii[i];
12575 }
12576 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578int
12579main ()
12580{
12581return use_ascii (foo) == use_ebcdic (foo);
12582 ;
12583 return 0;
12584}
12585_ACEOF
12586if ac_fn_c_try_compile "$LINENO"; then :
12587 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12588 ac_cv_c_bigendian=yes
12589 fi
12590 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12591 if test "$ac_cv_c_bigendian" = unknown; then
12592 ac_cv_c_bigendian=no
12593 else
12594 # finding both strings is unlikely to happen, but who knows?
12595 ac_cv_c_bigendian=unknown
12596 fi
12597 fi
12598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012602/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012604int
12605main ()
12606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 /* Are we little or big endian? From Harbison&Steele. */
12609 union
12610 {
12611 long int l;
12612 char c[sizeof (long int)];
12613 } u;
12614 u.l = 1;
12615 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616
12617 ;
12618 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012619}
Martin v. Löwis11437992002-04-12 09:54:03 +000012620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012622 ac_cv_c_bigendian=no
12623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12633$as_echo "$ac_cv_c_bigendian" >&6; }
12634 case $ac_cv_c_bigendian in #(
12635 yes)
12636 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12637;; #(
12638 no)
12639 ;; #(
12640 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ;; #(
12645 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012646 as_fn_error $? "unknown endianness
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012647 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012649
Michael W. Hudson54241132001-12-07 15:38:26 +000012650
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012651# ABI version string for Python extension modules. This appears between the
12652# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12653# from the following attributes which affect the ABI of this Python build (in
12654# this order):
12655#
12656# * The Python implementation (always 'cpython-' for us)
12657# * The major and minor version numbers
12658# * --with-pydebug (adds a 'd')
12659# * --with-pymalloc (adds a 'm')
12660# * --with-wide-unicode (adds a 'u')
12661#
12662# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012663# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12664# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012665
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12667$as_echo_n "checking ABIFLAGS... " >&6; }
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12669$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12671$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012672SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12674$as_echo "$SOABI" >&6; }
12675
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12677$as_echo_n "checking LDVERSION... " >&6; }
12678LDVERSION='$(VERSION)$(ABIFLAGS)'
12679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12680$as_echo "$LDVERSION" >&6; }
12681
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012682# SO is the extension of shared libraries `(including the dot!)
12683# -- usually .so, .sl on HP-UX, .dll on Cygwin
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12685$as_echo_n "checking SO... " >&6; }
12686if test -z "$SO"
12687then
12688 case $ac_sys_system in
12689 hp*|HP*)
12690 case `uname -m` in
12691 ia64) SO=.so;;
12692 *) SO=.sl;;
12693 esac
12694 ;;
12695 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012696 Linux*|GNU*)
12697 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012698 *) SO=.so;;
12699 esac
12700else
12701 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012702 echo
12703 echo '====================================================================='
12704 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012705 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012706 echo '+ Do you really mean to change the extension for shared libraries? +'
12707 echo '+ Continuing in 10 seconds to let you to ponder. +'
12708 echo '+ +'
12709 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012710 sleep 10
12711fi
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12713$as_echo "$SO" >&6; }
12714
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012715# Check whether right shifting a negative integer extends the sign bit
12716# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12718$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012719if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012721else
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012724 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012728
12729int main()
12730{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012731 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012732}
12733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012736 ac_cv_rshift_extends_sign=yes
12737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012742fi
12743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744fi
12745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12747$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012748if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012749then
Martin v. Löwis11437992002-04-12 09:54:03 +000012750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012753fi
12754
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012755# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12757$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012758if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012760else
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012764#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012765int
12766main ()
12767{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012768
12769 FILE *f = fopen("/dev/null", "r");
12770 flockfile(f);
12771 getc_unlocked(f);
12772 funlockfile(f);
12773
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 ;
12775 return 0;
12776}
12777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012779 ac_cv_have_getc_unlocked=yes
12780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 ac_cv_have_getc_unlocked=no
12782fi
12783rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12788$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012789if test "$ac_cv_have_getc_unlocked" = yes
12790then
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012793
12794fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012795
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012796# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012797# save the value of LIBS so we don't actually link Python with readline
12798LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799
Gregory P. Smith18820942008-09-07 06:24:49 +000012800# On some systems we need to link readline to a termcap compatible
12801# library. NOTE: Keep the precedence of listed libraries synchronised
12802# with setup.py.
12803py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12805$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012806for py_libtermcap in "" ncursesw ncurses curses termcap; do
12807 if test -z "$py_libtermcap"; then
12808 READLINE_LIBS="-lreadline"
12809 else
12810 READLINE_LIBS="-lreadline -l$py_libtermcap"
12811 fi
12812 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012814/* end confdefs.h. */
12815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012819#ifdef __cplusplus
12820extern "C"
12821#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012822char readline ();
12823int
12824main ()
12825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012827 ;
12828 return 0;
12829}
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012832 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012836 if test $py_cv_lib_readline = yes; then
12837 break
12838 fi
12839done
12840# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12841#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012842if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12844$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12847$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012850
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012851fi
12852
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012853# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12855$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012856if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858else
12859 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012860LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862/* end confdefs.h. */
12863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012864/* Override any GCC internal prototype to avoid an error.
12865 Use char because int might match the return type of a GCC
12866 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012867#ifdef __cplusplus
12868extern "C"
12869#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870char rl_callback_handler_install ();
12871int
12872main ()
12873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012880 ac_cv_lib_readline_rl_callback_handler_install=yes
12881else
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012884rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012886LIBS=$ac_check_lib_save_LIBS
12887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12889$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012890if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012893
12894fi
12895
12896
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012900#include <readline/readline.h>
12901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012902if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012903 have_readline=yes
12904else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012905 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012906
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012907fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012908rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012909if test $have_readline = yes
12910then
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012913#include <readline/readline.h>
12914
12915_ACEOF
12916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012920
12921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012922rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012925/* end confdefs.h. */
12926#include <readline/readline.h>
12927
12928_ACEOF
12929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012933
12934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012935rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012936
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012937fi
12938
Martin v. Löwis0daad592001-09-30 21:09:59 +000012939# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12941$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012942if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012944else
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012946LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950/* Override any GCC internal prototype to avoid an error.
12951 Use char because int might match the return type of a GCC
12952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012953#ifdef __cplusplus
12954extern "C"
12955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012956char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012957int
12958main ()
12959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 ;
12962 return 0;
12963}
12964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012965if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012970rm -f core conftest.err conftest.$ac_objext \
12971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012972LIBS=$ac_check_lib_save_LIBS
12973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12975$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012976if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012979
Martin v. Löwis0daad592001-09-30 21:09:59 +000012980fi
12981
Michael W. Hudson54241132001-12-07 15:38:26 +000012982
Thomas Wouters89d996e2007-09-08 17:39:28 +000012983# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12985$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020012986if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012988else
12989 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012990LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012992/* end confdefs.h. */
12993
12994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
12997#ifdef __cplusplus
12998extern "C"
12999#endif
13000char rl_completion_display_matches_hook ();
13001int
13002main ()
13003{
13004return rl_completion_display_matches_hook ();
13005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013010 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013016LIBS=$ac_check_lib_save_LIBS
13017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13019$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013020if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013023
13024fi
13025
13026
Martin v. Löwis0daad592001-09-30 21:09:59 +000013027# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13029$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013030if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013032else
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013034LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038/* Override any GCC internal prototype to avoid an error.
13039 Use char because int might match the return type of a GCC
13040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013041#ifdef __cplusplus
13042extern "C"
13043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013044char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013045int
13046main ()
13047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013058rm -f core conftest.err conftest.$ac_objext \
13059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013060LIBS=$ac_check_lib_save_LIBS
13061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13063$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013064if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013067
Guido van Rossum353ae582001-07-10 16:45:32 +000013068fi
13069
Jack Jansendd19cf82001-12-06 22:36:17 +000013070
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073/* end confdefs.h. */
13074#include <readline/readline.h>
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013077 have_readline=yes
13078else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013079 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013080
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013081fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013082rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013083if test $have_readline = yes
13084then
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013086/* end confdefs.h. */
13087#include <readline/readline.h>
13088
13089_ACEOF
13090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013094
13095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013096rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013097
13098fi
13099
Martin v. Löwis82bca632006-02-10 20:49:30 +000013100# End of readline checks: restore LIBS
13101LIBS=$LIBS_no_readline
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13104$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013105if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013107else
Martin v. Löwis11437992002-04-12 09:54:03 +000013108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013110 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013114
13115int main()
13116{
13117 int val1 = nice(1);
13118 if (val1 != -1 && val1 == nice(2))
13119 exit(0);
13120 exit(1);
13121}
13122
Martin v. Löwis11437992002-04-12 09:54:03 +000013123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013125 ac_cv_broken_nice=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013131fi
13132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133fi
13134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13136$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013137if test "$ac_cv_broken_nice" = yes
13138then
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013141
13142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13145$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013146if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013150 ac_cv_broken_poll=no
13151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153/* end confdefs.h. */
13154
13155#include <poll.h>
13156
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013157int main()
13158{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013161
13162 close (42);
13163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013165 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013166 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013167 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013168 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013169 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013170 return 1;
13171}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013172
13173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013174if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013175 ac_cv_broken_poll=yes
13176else
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13180 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013183fi
13184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13186$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013187if test "$ac_cv_broken_poll" = yes
13188then
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013191
13192fi
13193
Brett Cannon43802422005-02-10 20:48:03 +000013194# 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 +000013195# (which is not required by ISO C or UNIX spec) and/or if we support
13196# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013197ac_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 +000013198#include <$ac_cv_struct_tm>
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013201if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013202
13203cat >>confdefs.h <<_ACEOF
13204#define HAVE_STRUCT_TM_TM_ZONE 1
13205_ACEOF
13206
13207
13208fi
13209
13210if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013213
13214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13216"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013217if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221fi
13222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225_ACEOF
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13228$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013229if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013233/* end confdefs.h. */
13234#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235#if !HAVE_DECL_TZNAME
13236extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013237#endif
13238
13239int
13240main ()
13241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013243 ;
13244 return 0;
13245}
13246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013248 ac_cv_var_tzname=yes
13249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013252rm -f core conftest.err conftest.$ac_objext \
13253 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13256$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013257 if test $ac_cv_var_tzname = yes; then
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013260
13261 fi
13262fi
13263
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013264
Martin v. Löwis1d459062005-03-14 21:23:33 +000013265# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13267$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013268if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013270else
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273 ac_cv_working_tzset=no
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013277
13278#include <stdlib.h>
13279#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013280#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013281
13282#if HAVE_TZNAME
13283extern char *tzname[];
13284#endif
13285
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013286int main()
13287{
Brett Cannon18367812003-09-19 00:59:16 +000013288 /* Note that we need to ensure that not only does tzset(3)
13289 do 'something' with localtime, but it works as documented
13290 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013291 This includes making sure that tzname is set properly if
13292 tm->tm_zone does not exist since it is the alternative way
13293 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013294
13295 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013296 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013297 */
13298
Martin v. Löwis1d459062005-03-14 21:23:33 +000013299 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013300 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13301
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013302 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013303 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013304 if (localtime(&groundhogday)->tm_hour != 0)
13305 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013306#if HAVE_TZNAME
13307 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13308 if (strcmp(tzname[0], "UTC") ||
13309 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13310 exit(1);
13311#endif
Brett Cannon18367812003-09-19 00:59:16 +000013312
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013313 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013314 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013315 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013316 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013317#if HAVE_TZNAME
13318 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13319 exit(1);
13320#endif
Brett Cannon18367812003-09-19 00:59:16 +000013321
13322 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13323 tzset();
13324 if (localtime(&groundhogday)->tm_hour != 11)
13325 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013326#if HAVE_TZNAME
13327 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13328 exit(1);
13329#endif
13330
13331#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013332 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13333 exit(1);
13334 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13335 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013336#endif
Brett Cannon18367812003-09-19 00:59:16 +000013337
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013338 exit(0);
13339}
13340
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013343 ac_cv_working_tzset=yes
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13348 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013349fi
13350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351fi
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13354$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013355if test "$ac_cv_working_tzset" = yes
13356then
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013359
13360fi
13361
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013362# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13364$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013365if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013367else
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013369/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013370#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013371int
13372main ()
13373{
13374
13375struct stat st;
13376st.st_mtim.tv_nsec = 1;
13377
13378 ;
13379 return 0;
13380}
13381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013383 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013384else
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13388fi
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13391$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013392if test "$ac_cv_stat_tv_nsec" = yes
13393then
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013396
13397fi
13398
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013399# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13401$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013402if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013406/* end confdefs.h. */
13407#include <sys/stat.h>
13408int
13409main ()
13410{
13411
13412struct stat st;
13413st.st_mtimespec.tv_nsec = 1;
13414
13415 ;
13416 return 0;
13417}
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013420 ac_cv_stat_tv_nsec2=yes
13421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13428$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013429if test "$ac_cv_stat_tv_nsec2" = yes
13430then
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013433
13434fi
13435
Jack Jansen666b1e72001-10-31 12:11:48 +000013436# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13438$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013439if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013441else
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013443/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013444#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
Jack Jansen666b1e72001-10-31 12:11:48 +000013448
13449 int rtn;
13450 rtn = mvwdelch(0,0,0);
13451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ;
13453 return 0;
13454}
13455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013456if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013457 ac_cv_mvwdelch_is_expression=yes
13458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13462fi
13463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13465$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013466
13467if test "$ac_cv_mvwdelch_is_expression" = yes
13468then
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013471
13472fi
13473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13475$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013476if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013480/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013481#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Jack Jansen666b1e72001-10-31 12:11:48 +000013485
13486 WINDOW *w;
13487 w->_flags = 0;
13488
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ;
13490 return 0;
13491}
13492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013493if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013494 ac_cv_window_has_flags=yes
13495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13499fi
13500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13502$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013503
Jack Jansen666b1e72001-10-31 12:11:48 +000013504
13505if test "$ac_cv_window_has_flags" = yes
13506then
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013509
13510fi
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13513$as_echo_n "checking for is_term_resized... " >&6; }
13514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013515/* end confdefs.h. */
13516#include <curses.h>
13517int
13518main ()
13519{
13520void *x=is_term_resized
13521 ;
13522 return 0;
13523}
13524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013528
Matthias Kloseb159a552010-04-25 21:00:44 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13533$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013534
13535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13539$as_echo_n "checking for resize_term... " >&6; }
13540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013541/* end confdefs.h. */
13542#include <curses.h>
13543int
13544main ()
13545{
13546void *x=resize_term
13547 ;
13548 return 0;
13549}
13550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013551if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013554
Matthias Kloseb159a552010-04-25 21:00:44 +000013555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13559$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013560
13561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13565$as_echo_n "checking for resizeterm... " >&6; }
13566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013567/* end confdefs.h. */
13568#include <curses.h>
13569int
13570main ()
13571{
13572void *x=resizeterm
13573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013580
Matthias Kloseb159a552010-04-25 21:00:44 +000013581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013586
13587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13591$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013592
13593if test -r /dev/ptmx
13594then
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13596$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013599
Thomas Wouters89f507f2006-12-13 04:49:30 +000013600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13606$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013607
13608if test -r /dev/ptc
13609then
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13611$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013614
Thomas Wouters89f507f2006-12-13 04:49:30 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13617$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013618fi
13619
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013620if test "$have_long_long" = yes
13621then
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13623$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013624 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013628 ac_cv_have_long_long_format=no
13629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013631/* end confdefs.h. */
13632
13633 #include <stdio.h>
13634 #include <stddef.h>
13635 #include <string.h>
13636
13637 #ifdef HAVE_SYS_TYPES_H
13638 #include <sys/types.h>
13639 #endif
13640
13641 int main()
13642 {
13643 char buffer[256];
13644
13645 if (sprintf(buffer, "%lld", (long long)123) < 0)
13646 return 1;
13647 if (strcmp(buffer, "123"))
13648 return 1;
13649
13650 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13651 return 1;
13652 if (strcmp(buffer, "-123"))
13653 return 1;
13654
13655 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13656 return 1;
13657 if (strcmp(buffer, "123"))
13658 return 1;
13659
13660 return 0;
13661 }
13662
13663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013664if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013665 ac_cv_have_long_long_format=yes
13666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013671fi
13672
13673
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013674fi
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13677$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013678fi
13679
Mark Dickinson89d7d412009-12-31 20:50:59 +000013680if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013681then
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013684
13685fi
13686
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013687if test $ac_sys_system = Darwin
13688then
13689 LIBS="$LIBS -framework CoreFoundation"
13690fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13693$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013694if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696else
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013698 ac_cv_have_size_t_format="cross -- assuming yes"
13699
Thomas Wouters477c8d52006-05-27 19:21:47 +000013700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013702/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013703
Thomas Wouters477c8d52006-05-27 19:21:47 +000013704#include <stdio.h>
13705#include <stddef.h>
13706#include <string.h>
13707
Christian Heimes2c181612007-12-17 20:04:13 +000013708#ifdef HAVE_SYS_TYPES_H
13709#include <sys/types.h>
13710#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013711
13712#ifdef HAVE_SSIZE_T
13713typedef ssize_t Py_ssize_t;
13714#elif SIZEOF_VOID_P == SIZEOF_LONG
13715typedef long Py_ssize_t;
13716#else
13717typedef int Py_ssize_t;
13718#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013719
Christian Heimes2c181612007-12-17 20:04:13 +000013720int main()
13721{
13722 char buffer[256];
13723
Thomas Wouters477c8d52006-05-27 19:21:47 +000013724 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13725 return 1;
13726
Thomas Wouters89f507f2006-12-13 04:49:30 +000013727 if (strcmp(buffer, "123"))
13728 return 1;
13729
13730 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13731 return 1;
13732
13733 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013734 return 1;
13735
13736 return 0;
13737}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013738
Thomas Wouters477c8d52006-05-27 19:21:47 +000013739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013740if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013747fi
13748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13751$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013752if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013755
13756fi
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013759#ifdef HAVE_SYS_TYPES_H
13760#include <sys/types.h>
13761#endif
13762#ifdef HAVE_SYS_SOCKET_H
13763#include <sys/socket.h>
13764#endif
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013767if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013772
13773fi
13774
Michael W. Hudson54241132001-12-07 15:38:26 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13777$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013778if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013782 ac_cv_broken_mbstowcs=no
13783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013785/* end confdefs.h. */
13786
13787#include<stdlib.h>
13788int main() {
13789 size_t len = -1;
13790 const char *str = "text";
13791 len = mbstowcs(NULL, str, 0);
13792 return (len != 4);
13793}
13794
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013797 ac_cv_broken_mbstowcs=no
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013803fi
13804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013805fi
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13808$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013809if test "$ac_cv_broken_mbstowcs" = yes
13810then
13811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013813
13814fi
13815
Antoine Pitrou042b1282010-08-13 21:15:58 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13817$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013818if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013819 $as_echo_n "(cached) " >&6
13820else
13821 if test "$cross_compiling" = yes; then :
13822 ac_cv_computed_gotos=no
13823else
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825/* end confdefs.h. */
13826
13827int main(int argc, char **argv)
13828{
13829 static void *targets[1] = { &&LABEL1 };
13830 goto LABEL2;
13831LABEL1:
13832 return 0;
13833LABEL2:
13834 goto *targets[0];
13835 return 1;
13836}
13837
13838_ACEOF
13839if ac_fn_c_try_run "$LINENO"; then :
13840 ac_cv_computed_gotos=yes
13841else
13842 ac_cv_computed_gotos=no
13843fi
13844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13845 conftest.$ac_objext conftest.beam conftest.$ac_ext
13846fi
13847
13848fi
13849
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13851$as_echo "$ac_cv_computed_gotos" >&6; }
13852if test "$ac_cv_computed_gotos" = yes
13853then
13854
13855$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13856
13857fi
13858
Antoine Pitroub52ec782009-01-25 16:34:23 +000013859# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13861$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013862
13863# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013864if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013865 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013866if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013867then
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13872$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013873fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013874if test "$withval" = no
13875then
13876
13877$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13880$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013881fi
13882
Antoine Pitrou042b1282010-08-13 21:15:58 +000013883else
13884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13885$as_echo "no value specified" >&6; }
13886fi
13887
Antoine Pitroub52ec782009-01-25 16:34:23 +000013888
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013889case $ac_sys_system in
13890AIX*)
13891
13892$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13893 ;;
13894esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013895
Michael W. Hudson54241132001-12-07 15:38:26 +000013896
Jesus Cea6a792292010-05-03 21:18:48 +000013897case $ac_sys_system in
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013898 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 +000013899esac
13900
Gregory P. Smith138fa432010-12-13 08:00:52 +000013901ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013902if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013903
13904$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13905
13906fi
Jesus Cea6a792292010-05-03 21:18:48 +000013907
13908
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013909
13910
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013911for h in `(cd $srcdir;echo Python/thread_*.h)`
13912do
13913 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13914done
13915
Michael W. Hudson54241132001-12-07 15:38:26 +000013916
Neal Norwitzd24499d2005-12-18 21:36:39 +000013917SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13919$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013920for dir in $SRCDIRS; do
13921 if test ! -d $dir; then
13922 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013923 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013924done
Matthias Kloseb9621712010-04-24 17:59:49 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13926$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013927
Guido van Rossum627b2d71993-12-24 10:39:16 +000013928# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013929ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013930
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013931ac_config_files="$ac_config_files Modules/ld_so_aix"
13932
Martin v. Löwis11437992002-04-12 09:54:03 +000013933cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934# This file is a shell script that caches the results of configure
13935# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013936# scripts and configure runs, see configure's option --config-cache.
13937# It is not useful on other systems. If it contains results you don't
13938# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013939#
Martin v. Löwis11437992002-04-12 09:54:03 +000013940# config.status only pays attention to the cache file if you give it
13941# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942#
Skip Montanaro6dead952003-09-25 14:50:04 +000013943# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013944# loading this file, other *unset* `ac_cv_foo' will be assigned the
13945# following values.
13946
13947_ACEOF
13948
Guido van Rossumf78abae1997-01-21 22:02:36 +000013949# The following way of writing the cache mishandles newlines in values,
13950# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013952# Ultrix sh set writes to stderr and can't be redirected directly,
13953# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954(
13955 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13956 eval ac_val=\$$ac_var
13957 case $ac_val in #(
13958 *${as_nl}*)
13959 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13961$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962 esac
13963 case $ac_var in #(
13964 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13966 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967 esac ;;
13968 esac
13969 done
13970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13973 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 # `set' does not quote correctly, so add quotes: double-quote
13975 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013977 "s/'/'\\\\''/g;
13978 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 *)
13981 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 esac |
13985 sort
13986) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13992 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13994 :end' >>confcache
13995if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13996 if test -w "$cache_file"; then
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020013997 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13999$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014000 if test ! -f "$cache_file" || test -h "$cache_file"; then
14001 cat confcache >"$cache_file"
14002 else
14003 case $cache_file in #(
14004 */* | ?:*)
14005 mv -f confcache "$cache_file"$$ &&
14006 mv -f "$cache_file"$$ "$cache_file" ;; #(
14007 *)
14008 mv -f confcache "$cache_file" ;;
14009 esac
14010 fi
14011 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014012 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14014$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014015 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014017rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014018
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019test "x$prefix" = xNONE && prefix=$ac_default_prefix
14020# Let make expand exec_prefix.
14021test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014023DEFS=-DHAVE_CONFIG_H
14024
Skip Montanaro6dead952003-09-25 14:50:04 +000014025ac_libobjs=
14026ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014027U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014028for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14029 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14033 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14035 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014036done
14037LIBOBJS=$ac_libobjs
14038
14039LTLIBOBJS=$ac_ltlibobjs
14040
14041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014044: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014045ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014046ac_clean_files_save=$ac_clean_files
14047ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014048{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14049$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14050as_write_fail=0
14051cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014052#! $SHELL
14053# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014054# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014055# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014056# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014059ac_cs_recheck=false
14060ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062SHELL=\${CONFIG_SHELL-$SHELL}
14063export SHELL
14064_ASEOF
14065cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14066## -------------------- ##
14067## M4sh Initialization. ##
14068## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070# Be more Bourne compatible
14071DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014072if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 emulate sh
14074 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014076 # is contrary to our usage. Disable this feature.
14077 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 case `(set -o) 2>/dev/null` in #(
14081 *posix*) :
14082 set -o posix ;; #(
14083 *) :
14084 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014086fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014087
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089as_nl='
14090'
14091export as_nl
14092# Printing a long string crashes Solaris 7 /usr/bin/printf.
14093as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14094as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14095as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14096# Prefer a ksh shell builtin over an external printf program on Solaris,
14097# but without wasting forks for bash or zsh.
14098if test -z "$BASH_VERSION$ZSH_VERSION" \
14099 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14100 as_echo='print -r --'
14101 as_echo_n='print -rn --'
14102elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14103 as_echo='printf %s\n'
14104 as_echo_n='printf %s'
14105else
14106 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14107 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14108 as_echo_n='/usr/ucb/echo -n'
14109 else
14110 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14111 as_echo_n_body='eval
14112 arg=$1;
14113 case $arg in #(
14114 *"$as_nl"*)
14115 expr "X$arg" : "X\\(.*\\)$as_nl";
14116 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14117 esac;
14118 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14119 '
14120 export as_echo_n_body
14121 as_echo_n='sh -c $as_echo_n_body as_echo'
14122 fi
14123 export as_echo_body
14124 as_echo='sh -c $as_echo_body as_echo'
14125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
14127# The user is always right.
14128if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 PATH_SEPARATOR=:
14130 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14131 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14132 PATH_SEPARATOR=';'
14133 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136
14137# IFS
14138# We need space, tab and new line, in precisely that order. Quoting is
14139# there to prevent editors from complaining about space-tab.
14140# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14141# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142IFS=" "" $as_nl"
14143
14144# Find who we are. Look in the path if we contain no directory separator.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014145as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014146case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 *[\\/]* ) as_myself=$0 ;;
14148 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014149for as_dir in $PATH
14150do
14151 IFS=$as_save_IFS
14152 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14154 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157 ;;
14158esac
14159# We did not find ourselves, most probably we were run as `sh COMMAND'
14160# in which case we are not to be found in the path.
14161if test "x$as_myself" = x; then
14162 as_myself=$0
14163fi
14164if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14166 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167fi
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169# Unset variables that we do not need and which cause bugs (e.g. in
14170# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14171# suppresses any "Segmentation fault" message there. '((' could
14172# trigger a bug in pdksh 5.2.14.
14173for as_var in BASH_ENV ENV MAIL MAILPATH
14174do eval test x\${$as_var+set} = xset \
14175 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176done
14177PS1='$ '
14178PS2='> '
14179PS4='+ '
14180
14181# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014182LC_ALL=C
14183export LC_ALL
14184LANGUAGE=C
14185export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187# CDPATH.
14188(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14189
14190
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014191# as_fn_error STATUS ERROR [LINENO LOG_FD]
14192# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014193# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14194# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014195# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014196as_fn_error ()
14197{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014198 as_status=$1; test $as_status -eq 0 && as_status=1
14199 if test "$4"; then
14200 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14201 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014203 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 as_fn_exit $as_status
14205} # as_fn_error
14206
14207
14208# as_fn_set_status STATUS
14209# -----------------------
14210# Set $? to STATUS, without forking.
14211as_fn_set_status ()
14212{
14213 return $1
14214} # as_fn_set_status
14215
14216# as_fn_exit STATUS
14217# -----------------
14218# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14219as_fn_exit ()
14220{
14221 set +e
14222 as_fn_set_status $1
14223 exit $1
14224} # as_fn_exit
14225
14226# as_fn_unset VAR
14227# ---------------
14228# Portably unset VAR.
14229as_fn_unset ()
14230{
14231 { eval $1=; unset $1;}
14232}
14233as_unset=as_fn_unset
14234# as_fn_append VAR VALUE
14235# ----------------------
14236# Append the text in VALUE to the end of the definition contained in VAR. Take
14237# advantage of any shell optimizations that allow amortized linear growth over
14238# repeated appends, instead of the typical quadratic growth present in naive
14239# implementations.
14240if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14241 eval 'as_fn_append ()
14242 {
14243 eval $1+=\$2
14244 }'
14245else
14246 as_fn_append ()
14247 {
14248 eval $1=\$$1\$2
14249 }
14250fi # as_fn_append
14251
14252# as_fn_arith ARG...
14253# ------------------
14254# Perform arithmetic evaluation on the ARGs, and store the result in the
14255# global $as_val. Take advantage of shells that can avoid forks. The arguments
14256# must be portable across $(()) and expr.
14257if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14258 eval 'as_fn_arith ()
14259 {
14260 as_val=$(( $* ))
14261 }'
14262else
14263 as_fn_arith ()
14264 {
14265 as_val=`expr "$@" || test $? -eq 1`
14266 }
14267fi # as_fn_arith
14268
14269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270if expr a : '\(a\)' >/dev/null 2>&1 &&
14271 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14272 as_expr=expr
14273else
14274 as_expr=false
14275fi
14276
14277if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14278 as_basename=basename
14279else
14280 as_basename=false
14281fi
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14284 as_dirname=dirname
14285else
14286 as_dirname=false
14287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289as_me=`$as_basename -- "$0" ||
14290$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14291 X"$0" : 'X\(//\)$' \| \
14292 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014293$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294 sed '/^.*\/\([^/][^/]*\)\/*$/{
14295 s//\1/
14296 q
14297 }
14298 /^X\/\(\/\/\)$/{
14299 s//\1/
14300 q
14301 }
14302 /^X\/\(\/\).*/{
14303 s//\1/
14304 q
14305 }
14306 s/.*/./; q'`
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308# Avoid depending upon Character Ranges.
14309as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14310as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14311as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14312as_cr_digits='0123456789'
14313as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314
14315ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014316case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 xy) ECHO_C='\c';;
14321 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14322 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323 esac;;
14324*)
14325 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327
Martin v. Löwis11437992002-04-12 09:54:03 +000014328rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329if test -d conf$$.dir; then
14330 rm -f conf$$.dir/conf$$.file
14331else
14332 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014335if (echo >conf$$.file) 2>/dev/null; then
14336 if ln -s conf$$.file conf$$ 2>/dev/null; then
14337 as_ln_s='ln -s'
14338 # ... but there are two gotchas:
14339 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14340 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14341 # In both cases, we have to default to `cp -p'.
14342 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14343 as_ln_s='cp -p'
14344 elif ln conf$$.file conf$$ 2>/dev/null; then
14345 as_ln_s=ln
14346 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014349else
14350 as_ln_s='cp -p'
14351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14353rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355
14356# as_fn_mkdir_p
14357# -------------
14358# Create "$as_dir" as a directory, including parents if necessary.
14359as_fn_mkdir_p ()
14360{
14361
14362 case $as_dir in #(
14363 -*) as_dir=./$as_dir;;
14364 esac
14365 test -d "$as_dir" || eval $as_mkdir_p || {
14366 as_dirs=
14367 while :; do
14368 case $as_dir in #(
14369 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14370 *) as_qdir=$as_dir;;
14371 esac
14372 as_dirs="'$as_qdir' $as_dirs"
14373 as_dir=`$as_dirname -- "$as_dir" ||
14374$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14375 X"$as_dir" : 'X\(//\)[^/]' \| \
14376 X"$as_dir" : 'X\(//\)$' \| \
14377 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14378$as_echo X"$as_dir" |
14379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14380 s//\1/
14381 q
14382 }
14383 /^X\(\/\/\)[^/].*/{
14384 s//\1/
14385 q
14386 }
14387 /^X\(\/\/\)$/{
14388 s//\1/
14389 q
14390 }
14391 /^X\(\/\).*/{
14392 s//\1/
14393 q
14394 }
14395 s/.*/./; q'`
14396 test -d "$as_dir" && break
14397 done
14398 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014399 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014400
14401
14402} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014403if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014405else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014406 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 as_mkdir_p=false
14408fi
14409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410if test -x / >/dev/null 2>&1; then
14411 as_test_x='test -x'
14412else
14413 if ls -dL / >/dev/null 2>&1; then
14414 as_ls_L_option=L
14415 else
14416 as_ls_L_option=
14417 fi
14418 as_test_x='
14419 eval sh -c '\''
14420 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 case $1 in #(
14424 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427 ???[sx]*):;;*)false;;esac;fi
14428 '\'' sh
14429 '
14430fi
14431as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
14433# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014434as_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 +000014435
14436# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014441## ----------------------------------- ##
14442## Main body of $CONFIG_STATUS script. ##
14443## ----------------------------------- ##
14444_ASEOF
14445test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14448# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014449# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450# values after options handling.
14451ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014452This file was extended by python $as_me 3.2, which was
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014453generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
14455 CONFIG_FILES = $CONFIG_FILES
14456 CONFIG_HEADERS = $CONFIG_HEADERS
14457 CONFIG_LINKS = $CONFIG_LINKS
14458 CONFIG_COMMANDS = $CONFIG_COMMANDS
14459 $ $0 $@
14460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461on `(hostname || uname -n) 2>/dev/null | sed 1q`
14462"
14463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466case $ac_config_files in *"
14467"*) set x $ac_config_files; shift; ac_config_files=$*;;
14468esac
14469
14470case $ac_config_headers in *"
14471"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14472esac
14473
14474
14475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014476# Files that config.status was made for.
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014477config_files="`echo $ac_config_files`"
14478config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014483ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014484\`$as_me' instantiates files and other configuration actions
14485from templates according to the current configuration. Unless the files
14486and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
14490 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 --config print configuration, then exit
14493 -q, --quiet, --silent
14494 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 -d, --debug don't remove temporary files
14496 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 --file=FILE[:TEMPLATE]
14498 instantiate the configuration file FILE
14499 --header=FILE[:TEMPLATE]
14500 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
14502Configuration files:
14503$config_files
14504
14505Configuration headers:
14506$config_headers
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14512ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014513ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014514python config.status 3.2
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014515configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014518Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014519This config.status script is free software; the Free Software Foundation
14520gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521
14522ac_pwd='$ac_pwd'
14523srcdir='$srcdir'
14524INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014525test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014526_ACEOF
14527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14529# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014530ac_need_defaults=:
14531while test $# != 0
14532do
14533 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014534 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14536 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014537 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014539 --*=)
14540 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14541 ac_optarg=
14542 ac_shift=:
14543 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014545 ac_option=$1
14546 ac_optarg=$2
14547 ac_shift=shift
14548 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 esac
14550
Skip Montanaro6dead952003-09-25 14:50:04 +000014551 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014553 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14554 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 $as_echo "$ac_cs_version"; exit ;;
14557 --config | --confi | --conf | --con | --co | --c )
14558 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 debug=: ;;
14561 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014562 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 case $ac_optarg in
14564 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014565 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 esac
14567 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 ac_need_defaults=false;;
14569 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014570 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 case $ac_optarg in
14572 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14573 esac
14574 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576 --he | --h)
14577 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014578 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014579Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014582 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14583 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14584 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
14586 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014587 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014588Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
14593 esac
14594 shift
14595done
14596
Skip Montanaro6dead952003-09-25 14:50:04 +000014597ac_configure_extra_args=
14598
14599if $ac_cs_silent; then
14600 exec 6>/dev/null
14601 ac_configure_extra_args="$ac_configure_extra_args --silent"
14602fi
14603
14604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014606if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14608 shift
14609 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14610 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014613fi
14614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617exec 5>>config.log
14618{
14619 echo
14620 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14621## Running $as_me. ##
14622_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014624} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631
14632# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014633for ac_config_target in $ac_config_targets
14634do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 case $ac_config_target in
14636 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14637 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14638 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014639 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14640 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14642 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014643 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014644 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014646 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 esac
14648done
14649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651# If the user did not use the arguments to specify the items to instantiate,
14652# then the envvar interface is used. Set only those that are not.
14653# We use the long form for the default assignment because of an extremely
14654# bizarre bug on SunOS 4.1.3.
14655if $ac_need_defaults; then
14656 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14657 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14658fi
14659
Skip Montanaro6dead952003-09-25 14:50:04 +000014660# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014662# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663# Hook for its removal unless debugging.
14664# Note that there is a small window in which the directory will not be cleaned:
14665# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014666$debug ||
14667{
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014668 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 trap 'exit_status=$?
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014670 : "${ac_tmp:=$tmp}"
14671 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014674}
Martin v. Löwis11437992002-04-12 09:54:03 +000014675# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014679 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014680} ||
14681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682 tmp=./conf$$-$RANDOM
14683 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014684} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014685ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687# Set up the scripts for CONFIG_FILES section.
14688# No need to generate them if there are no CONFIG_FILES.
14689# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692
14693ac_cr=`echo X | tr X '\015'`
14694# On cygwin, bash can eat \r inside `` if the user requested igncr.
14695# But we know of no other shell where ac_cr would be empty at this
14696# point, so we can use a bashism as a fallback.
14697if test "x$ac_cr" = x; then
14698 eval ac_cr=\$\'\\r\'
14699fi
14700ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14701if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014702 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014703else
14704 ac_cs_awk_cr=$ac_cr
14705fi
14706
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014707echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014708_ACEOF
14709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{
14712 echo "cat >conf$$subs.awk <<_ACEOF" &&
14713 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14714 echo "_ACEOF"
14715} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014716 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14717ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718ac_delim='%!_!# '
14719for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014721 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14724 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 break
14726 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014727 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728 else
14729 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731done
Matthias Kloseb9621712010-04-24 17:59:49 +000014732rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014735cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014737sed -n '
14738h
14739s/^/S["/; s/!.*/"]=/
14740p
14741g
14742s/^[^!]*!//
14743:repl
14744t repl
14745s/'"$ac_delim"'$//
14746t delim
14747:nl
14748h
14749s/\(.\{148\}\)..*/\1/
14750t more1
14751s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14752p
14753n
14754b repl
14755:more1
14756s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14757p
14758g
14759s/.\{148\}//
14760t nl
14761:delim
14762h
14763s/\(.\{148\}\)..*/\1/
14764t more2
14765s/["\\]/\\&/g; s/^/"/; s/$/"/
14766p
14767b
14768:more2
14769s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14770p
14771g
14772s/.\{148\}//
14773t delim
14774' <conf$$subs.awk | sed '
14775/^[^""]/{
14776 N
14777 s/\n//
14778}
14779' >>$CONFIG_STATUS || ac_write_fail=1
14780rm -f conf$$subs.awk
14781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14782_ACAWK
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014783cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 for (key in S) S_is_set[key] = 1
14785 FS = ""
14786
14787}
14788{
14789 line = $ 0
14790 nfields = split(line, field, "@")
14791 substed = 0
14792 len = length(field[1])
14793 for (i = 2; i < nfields; i++) {
14794 key = field[i]
14795 keylen = length(key)
14796 if (S_is_set[key]) {
14797 value = S[key]
14798 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14799 len += length(value) + length(field[++i])
14800 substed = 1
14801 } else
14802 len += 1 + keylen
14803 }
14804
14805 print line
14806}
14807
14808_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14811if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14812 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14813else
14814 cat
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014815fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014816 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014817_ACEOF
14818
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014819# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14820# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821# trailing colons and then remove the whole line if VPATH becomes empty
14822# (actually we leave an empty line to preserve line numbers).
14823if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014824 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14825h
14826s///
14827s/^/:/
14828s/[ ]*$/:/
14829s/:\$(srcdir):/:/g
14830s/:\${srcdir}:/:/g
14831s/:@srcdir@:/:/g
14832s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014834x
14835s/\(=[ ]*\).*/\1/
14836G
14837s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838s/^[^=]*=[ ]*$//
14839}'
14840fi
14841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014843fi # test -n "$CONFIG_FILES"
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845# Set up the scripts for CONFIG_HEADERS section.
14846# No need to generate them if there are no CONFIG_HEADERS.
14847# This happens for instance with `./config.status Makefile'.
14848if test -n "$CONFIG_HEADERS"; then
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014849cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014850BEGIN {
14851_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853# Transform confdefs.h into an awk script `defines.awk', embedded as
14854# here-document in config.status, that substitutes the proper values into
14855# config.h.in to produce config.h.
14856
14857# Create a delimiter string that does not exist in confdefs.h, to ease
14858# handling of long lines.
14859ac_delim='%!_!# '
14860for ac_last_try in false false :; do
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014861 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14862 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 break
14864 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014865 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 else
14867 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14868 fi
14869done
14870
14871# For the awk script, D is an array of macro values keyed by name,
14872# likewise P contains macro parameters if any. Preserve backslash
14873# newline sequences.
14874
14875ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14876sed -n '
14877s/.\{148\}/&'"$ac_delim"'/g
14878t rset
14879:rset
14880s/^[ ]*#[ ]*define[ ][ ]*/ /
14881t def
14882d
14883:def
14884s/\\$//
14885t bsnl
14886s/["\\]/\\&/g
14887s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14888D["\1"]=" \3"/p
14889s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14890d
14891:bsnl
14892s/["\\]/\\&/g
14893s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14894D["\1"]=" \3\\\\\\n"\\/p
14895t cont
14896s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14897t cont
14898d
14899:cont
14900n
14901s/.\{148\}/&'"$ac_delim"'/g
14902t clear
14903:clear
14904s/\\$//
14905t bsnlc
14906s/["\\]/\\&/g; s/^/"/; s/$/"/p
14907d
14908:bsnlc
14909s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14910b cont
14911' <confdefs.h | sed '
14912s/'"$ac_delim"'/"\\\
14913"/g' >>$CONFIG_STATUS || ac_write_fail=1
14914
14915cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14916 for (key in D) D_is_set[key] = 1
14917 FS = ""
14918}
14919/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14920 line = \$ 0
14921 split(line, arg, " ")
14922 if (arg[1] == "#") {
14923 defundef = arg[2]
14924 mac1 = arg[3]
14925 } else {
14926 defundef = substr(arg[1], 2)
14927 mac1 = arg[2]
14928 }
14929 split(mac1, mac2, "(") #)
14930 macro = mac2[1]
14931 prefix = substr(line, 1, index(line, defundef) - 1)
14932 if (D_is_set[macro]) {
14933 # Preserve the white space surrounding the "#".
14934 print prefix "define", macro P[macro] D[macro]
14935 next
14936 } else {
14937 # Replace #undef with comments. This is necessary, for example,
14938 # in the case of _POSIX_SOURCE, which is predefined and required
14939 # on some systems where configure will not decide to define it.
14940 if (defundef == "undef") {
14941 print "/*", prefix defundef, macro, "*/"
14942 next
14943 }
14944 }
14945}
14946{ print }
14947_ACAWK
14948_ACEOF
14949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014950 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014951fi # test -n "$CONFIG_HEADERS"
14952
14953
14954eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14955shift
14956for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957do
14958 case $ac_tag in
14959 :[FHLC]) ac_mode=$ac_tag; continue;;
14960 esac
14961 case $ac_mode$ac_tag in
14962 :[FHL]*:*);;
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014963 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964 :[FH]-) ac_tag=-:-;;
14965 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14966 esac
14967 ac_save_IFS=$IFS
14968 IFS=:
14969 set x $ac_tag
14970 IFS=$ac_save_IFS
14971 shift
14972 ac_file=$1
14973 shift
14974
14975 case $ac_mode in
14976 :L) ac_source=$1;;
14977 :[FH])
14978 ac_file_inputs=
14979 for ac_f
14980 do
14981 case $ac_f in
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014982 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 *) # Look for the file first in the build tree, then in the source tree
14984 # (if the path is not absolute). The absolute path cannot be DOS-style,
14985 # because $ac_f cannot contain `:'.
14986 test -f "$ac_f" ||
14987 case $ac_f in
14988 [\\/$]*) false;;
14989 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14990 esac ||
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020014991 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14994 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 done
14996
14997 # Let's still pretend it is `configure' which instantiates (i.e., don't
14998 # use $as_me), people would be surprised to read:
14999 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 configure_input='Generated from '`
15001 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15002 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 if test x"$ac_file" != x-; then
15004 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15006$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 # Neutralize special characters interpreted by sed in replacement strings.
15009 case $configure_input in #(
15010 *\&* | *\|* | *\\* )
15011 ac_sed_conf_input=`$as_echo "$configure_input" |
15012 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15013 *) ac_sed_conf_input=$configure_input;;
15014 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015
15016 case $ac_tag in
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015017 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15018 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 esac
15020 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 esac
15022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015024$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015025 X"$ac_file" : 'X\(//\)[^/]' \| \
15026 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015028$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15030 s//\1/
15031 q
15032 }
15033 /^X\(\/\/\)[^/].*/{
15034 s//\1/
15035 q
15036 }
15037 /^X\(\/\/\)$/{
15038 s//\1/
15039 q
15040 }
15041 /^X\(\/\).*/{
15042 s//\1/
15043 q
15044 }
15045 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ac_builddir=.
15048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049case "$ac_dir" in
15050.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15051*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055 case $ac_top_builddir_sub in
15056 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15057 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15058 esac ;;
15059esac
15060ac_abs_top_builddir=$ac_pwd
15061ac_abs_builddir=$ac_pwd$ac_dir_suffix
15062# for backward compatibility:
15063ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015064
15065case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 ac_top_srcdir=$ac_top_builddir_sub
15069 ac_abs_top_srcdir=$ac_pwd ;;
15070 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015072 ac_top_srcdir=$srcdir
15073 ac_abs_top_srcdir=$srcdir ;;
15074 *) # Relative name.
15075 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15076 ac_top_srcdir=$ac_top_build_prefix$srcdir
15077 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015078esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015080
Martin v. Löwis11437992002-04-12 09:54:03 +000015081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082 case $ac_mode in
15083 :F)
15084 #
15085 # CONFIG_FILE
15086 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015087
15088 case $INSTALL in
15089 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093
Matthias Kloseb9621712010-04-24 17:59:49 +000015094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095# If the template does not know about datarootdir, expand it.
15096# FIXME: This hack should be removed a few years after 2.60.
15097ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015098ac_sed_dataroot='
15099/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100 p
15101 q
15102}
15103/@datadir@/p
15104/@docdir@/p
15105/@infodir@/p
15106/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015107/@mandir@/p'
15108case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109*datarootdir*) ac_datarootdir_seen=yes;;
15110*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15112$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115 ac_datarootdir_hack='
15116 s&@datadir@&$datadir&g
15117 s&@docdir@&$docdir&g
15118 s&@infodir@&$infodir&g
15119 s&@localedir@&$localedir&g
15120 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122esac
15123_ACEOF
15124
15125# Neutralize VPATH when `$srcdir' = `.'.
15126# Shell code in configure.ac might set extrasub.
15127# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15129ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015130$extrasub
15131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015133:t
15134/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015135s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015137s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138s&@srcdir@&$ac_srcdir&;t t
15139s&@abs_srcdir@&$ac_abs_srcdir&;t t
15140s&@top_srcdir@&$ac_top_srcdir&;t t
15141s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15142s&@builddir@&$ac_builddir&;t t
15143s&@abs_builddir@&$ac_abs_builddir&;t t
15144s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15145s&@INSTALL@&$ac_INSTALL&;t t
15146$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015147"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015148eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15149 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015152 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15153 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15154 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 { $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 +000015156which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015157$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015158which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015159
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015160 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 case $ac_file in
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015162 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15163 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015165 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166 ;;
15167 :H)
15168 #
15169 # CONFIG_HEADER
15170 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 {
15173 $as_echo "/* $configure_input */" \
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015174 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15175 } >"$ac_tmp/config.h" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015176 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015177 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15179$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 rm -f "$ac_file"
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015182 mv "$ac_tmp/config.h" "$ac_file" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015183 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 fi
15185 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 $as_echo "/* $configure_input */" \
Antoine Pitrou5cd3e302011-07-27 01:16:18 +020015187 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015188 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192
15193 esac
15194
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015195
15196 case $ac_file$ac_mode in
15197 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15198
15199 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200done # for ac_tag
15201
Guido van Rossum627b2d71993-12-24 10:39:16 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015204_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015205ac_clean_files=$ac_clean_files_save
15206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015208 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210
15211# configure is writing to config.log, and then calls config.status.
15212# config.status does its own redirection, appending to config.log.
15213# Unfortunately, on DOS this fails, as config.log is still kept open
15214# by configure, so config.status won't be able to write to it; its
15215# output is simply discarded. So we exec the FD to /dev/null,
15216# effectively closing config.log, so it can be properly (re)opened and
15217# appended to by config.status. When coming back to configure, we
15218# need to make the FD available again.
15219if test "$no_create" != yes; then
15220 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015221 ac_config_status_args=
15222 test "$silent" = yes &&
15223 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015225 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 exec 5>>config.log
15227 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15228 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015229 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015230fi
15231if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15233$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015234fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015235
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015236
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015237echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015238if test ! -f Modules/Setup
15239then
15240 cp $srcdir/Modules/Setup.dist Modules/Setup
15241fi
15242
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015243echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015244if test ! -f Modules/Setup.local
15245then
15246 echo "# Edit this file for local setup changes" >Modules/Setup.local
15247fi
15248
15249echo "creating Makefile"
15250$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15251 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015252 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015253mv config.c Modules