blob: 23664e834614ac3adfdb199ae1d8a3fb845198e4 [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.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004# Generated by GNU Autoconf 2.68 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000564PACKAGE_VERSION='3.2'
565PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001189 : "${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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001527generated 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001573 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
1619 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1620 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001656 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001669 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001672if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001739if 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001748 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001789 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001803if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001821 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001834if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001875 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001888if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001928 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001941if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002002 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002179 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002192if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002247 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002260if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002304 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; }
2319if 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; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002350 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002358generated 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
2616See \`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
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003000 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003001 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003002 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003003 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003004 esac
3005fi
Guido van Rossum91922671997-10-09 20:24:13 +00003006
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003007# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3008# disable features if it is defined, without any means to access these
3009# features as extensions. For these systems, we skip the definition of
3010# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3011# some feature, make sure there is no alternative way to access this
3012# feature. Also, when using wildcards, make sure you have verified the
3013# need for not defining _XOPEN_SOURCE on all systems matching the
3014# wildcard, and that the wildcard does not include future systems
3015# (which may remove their limitations).
3016case $ac_sys_system/$ac_sys_release in
3017 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3018 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003019 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003020 # In addition, Stefan Krah confirms that issue #1244610 exists through
3021 # OpenBSD 4.6, but is fixed in 4.7.
3022 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003023 define_xopen_source=no
3024 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3025 # also defined. This can be overridden by defining _BSD_SOURCE
3026 # As this has a different meaning on Linux, only define it on OpenBSD
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003029
3030 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003031 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003032 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3033 # also defined. This can be overridden by defining _BSD_SOURCE
3034 # As this has a different meaning on Linux, only define it on OpenBSD
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003037
3038 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003039 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3040 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3041 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003042 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 +00003043 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003044 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3045 # request to enable features supported by the standard as a request
3046 # to disable features not supported by the standard. The best way
3047 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3048 # entirely and define __EXTENSIONS__ instead.
3049 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003050 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3052 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003053 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003054 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 define_xopen_source=no;;
3056 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003057 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003059 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003060 # On FreeBSD 4, the math functions C89 does not cover are never defined
3061 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3062 FreeBSD/4.*)
3063 define_xopen_source=no;;
3064 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3065 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3066 # identifies itself as Darwin/7.*
3067 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3068 # disables platform specific features beyond repair.
3069 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3070 # has no effect, don't bother defining them
3071 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003072 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003073 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003074 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003075 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3076 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3077 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003078 AIX/4)
3079 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003080 AIX/5)
3081 if test `uname -r` -eq 1; then
3082 define_xopen_source=no
3083 fi
3084 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003085 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3086 # defining NI_NUMERICHOST.
3087 QNX/6.3.2)
3088 define_xopen_source=no
3089 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091esac
3092
3093if test $define_xopen_source = yes
3094then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
Matthias Kloseb9621712010-04-24 17:59:49 +00003096$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003097
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3100 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3101 # several APIs are not declared. Since this is also needed in some
3102 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
Matthias Kloseb9621712010-04-24 17:59:49 +00003104$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
3106
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003107
Matthias Kloseb9621712010-04-24 17:59:49 +00003108$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
3110
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003111fi
3112
Guido van Rossum91922671997-10-09 20:24:13 +00003113#
3114# SGI compilers allow the specification of the both the ABI and the
3115# ISA on the command line. Depending on the values of these switches,
3116# different and often incompatable code will be generated.
3117#
3118# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3119# thus supply support for various ABI/ISA combinations. The MACHDEP
3120# variable is also adjusted.
3121#
3122
3123if test ! -z "$SGI_ABI"
3124then
3125 CC="cc $SGI_ABI"
3126 LDFLAGS="$SGI_ABI $LDFLAGS"
3127 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3130$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003131
Jack Jansen6b08a402004-06-03 12:41:45 +00003132# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3133# it may influence the way we can build extensions, so distutils
3134# needs to check it
3135
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136
Jack Jansen6b08a402004-06-03 12:41:45 +00003137CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003139
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3141$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003142ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3144$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003145
Guido van Rossum627b2d71993-12-24 10:39:16 +00003146# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003147
3148# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3149# for debug/optimization stuff. BASECFLAGS is for flags that are required
3150# just to get things to compile and link. Users are free to override OPT
3151# when running configure or make. The build should not break if they do.
3152# BASECFLAGS should generally not be messed with, however.
3153
3154# XXX shouldn't some/most/all of this code be merged with the stuff later
3155# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3157$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003160if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003162 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003163 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003164 without_gcc=yes;;
3165 yes) CC=gcc
3166 without_gcc=no;;
3167 *) CC=$withval
3168 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003169 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003170else
Martin v. Löwis11437992002-04-12 09:54:03 +00003171
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003172 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003173 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003174 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003175 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003176 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177fi
3178
Matthias Kloseb9621712010-04-24 17:59:49 +00003179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3180$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003181
Guido van Rossum8b131c51995-03-09 14:10:13 +00003182# If the user switches compilers, we can't believe the cache
3183if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3184then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003185 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003186(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003187fi
3188
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003189# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3190# when the compiler supports them, but we don't always want -O2, and
3191# we set -g later.
3192if test -z "$CFLAGS"; then
3193 CFLAGS=
3194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003195ac_ext=c
3196ac_cpp='$CPP $CPPFLAGS'
3197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3199ac_compiler_gnu=$ac_cv_c_compiler_gnu
3200if test -n "$ac_tool_prefix"; then
3201 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3202set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3204$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003205if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003207else
3208 if test -n "$CC"; then
3209 ac_cv_prog_CC="$CC" # Let the user override the test.
3210else
Martin v. Löwis11437992002-04-12 09:54:03 +00003211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3212for as_dir in $PATH
3213do
3214 IFS=$as_save_IFS
3215 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003216 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217 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 +00003218 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003219 $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 +00003220 break 2
3221 fi
3222done
Matthias Kloseb9621712010-04-24 17:59:49 +00003223 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003225
Jack Jansendd19cf82001-12-06 22:36:17 +00003226fi
3227fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003228CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003229if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3231$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003232else
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3234$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003235fi
3236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237
Martin v. Löwis11437992002-04-12 09:54:03 +00003238fi
3239if test -z "$ac_cv_prog_CC"; then
3240 ac_ct_CC=$CC
3241 # Extract the first word of "gcc", so it can be a program name with args.
3242set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3244$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003245if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003247else
3248 if test -n "$ac_ct_CC"; then
3249 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3250else
3251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3252for as_dir in $PATH
3253do
3254 IFS=$as_save_IFS
3255 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003256 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 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 +00003258 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003259 $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 +00003260 break 2
3261 fi
3262done
Matthias Kloseb9621712010-04-24 17:59:49 +00003263 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003265
3266fi
3267fi
3268ac_ct_CC=$ac_cv_prog_ac_ct_CC
3269if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3271$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003272else
Matthias Kloseb9621712010-04-24 17:59:49 +00003273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3274$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003275fi
3276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277 if test "x$ac_ct_CC" = x; then
3278 CC=""
3279 else
3280 case $cross_compiling:$ac_tool_warned in
3281yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3283$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284ac_tool_warned=yes ;;
3285esac
3286 CC=$ac_ct_CC
3287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003288else
3289 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003290fi
3291
Jack Jansendd19cf82001-12-06 22:36:17 +00003292if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293 if test -n "$ac_tool_prefix"; then
3294 # 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 +00003295set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3297$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003298if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003300else
3301 if test -n "$CC"; then
3302 ac_cv_prog_CC="$CC" # Let the user override the test.
3303else
Martin v. Löwis11437992002-04-12 09:54:03 +00003304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3305for as_dir in $PATH
3306do
3307 IFS=$as_save_IFS
3308 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003309 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310 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 +00003311 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003312 $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 +00003313 break 2
3314 fi
3315done
Matthias Kloseb9621712010-04-24 17:59:49 +00003316 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003318
3319fi
3320fi
3321CC=$ac_cv_prog_CC
3322if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3324$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003325else
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3327$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003328fi
3329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003330
Martin v. Löwis11437992002-04-12 09:54:03 +00003331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003332fi
3333if test -z "$CC"; then
3334 # Extract the first word of "cc", so it can be a program name with args.
3335set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3337$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003338if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003339 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003340else
3341 if test -n "$CC"; then
3342 ac_cv_prog_CC="$CC" # Let the user override the test.
3343else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348 IFS=$as_save_IFS
3349 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003350 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003351 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 +00003352 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3353 ac_prog_rejected=yes
3354 continue
3355 fi
3356 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 $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 +00003358 break 2
3359 fi
3360done
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003363
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364if test $ac_prog_rejected = yes; then
3365 # We found a bogon in the path, so make sure we never use it.
3366 set dummy $ac_cv_prog_CC
3367 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369 # We chose a different compiler from the bogus one.
3370 # However, it has the same basename, so the bogon will be chosen
3371 # first if we set CC to just the basename; use the full file name.
3372 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003373 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374 fi
3375fi
3376fi
3377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003378CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003379if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3381$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003382else
Matthias Kloseb9621712010-04-24 17:59:49 +00003383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3384$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003385fi
3386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003387
Martin v. Löwis11437992002-04-12 09:54:03 +00003388fi
3389if test -z "$CC"; then
3390 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 do
3393 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3396$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003397if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003399else
3400 if test -n "$CC"; then
3401 ac_cv_prog_CC="$CC" # Let the user override the test.
3402else
Martin v. Löwis11437992002-04-12 09:54:03 +00003403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3404for as_dir in $PATH
3405do
3406 IFS=$as_save_IFS
3407 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003408 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409 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 +00003410 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003411 $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 +00003412 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003414done
Matthias Kloseb9621712010-04-24 17:59:49 +00003415 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003417
3418fi
3419fi
3420CC=$ac_cv_prog_CC
3421if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3423$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003424else
Matthias Kloseb9621712010-04-24 17:59:49 +00003425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003427fi
3428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 test -n "$CC" && break
3431 done
3432fi
3433if test -z "$CC"; then
3434 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003436do
3437 # Extract the first word of "$ac_prog", so it can be a program name with args.
3438set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3440$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003441if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003443else
3444 if test -n "$ac_ct_CC"; then
3445 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3446else
3447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448for as_dir in $PATH
3449do
3450 IFS=$as_save_IFS
3451 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003452 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 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 +00003454 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003455 $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 +00003456 break 2
3457 fi
3458done
Matthias Kloseb9621712010-04-24 17:59:49 +00003459 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462fi
3463fi
3464ac_ct_CC=$ac_cv_prog_ac_ct_CC
3465if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3467$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003468else
Matthias Kloseb9621712010-04-24 17:59:49 +00003469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3470$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 test -n "$ac_ct_CC" && break
3475done
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477 if test "x$ac_ct_CC" = x; then
3478 CC=""
3479 else
3480 case $cross_compiling:$ac_tool_warned in
3481yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484ac_tool_warned=yes ;;
3485esac
3486 CC=$ac_ct_CC
3487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003488fi
3489
3490fi
3491
3492
Matthias Kloseb9621712010-04-24 17:59:49 +00003493test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003495as_fn_error $? "no acceptable C compiler found in \$PATH
3496See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003497
3498# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003499$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3500set X $ac_compile
3501ac_compiler=$2
3502for ac_option in --version -v -V -qversion; do
3503 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504case "(($ac_try" in
3505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3506 *) ac_try_echo=$ac_try;;
3507esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3509$as_echo "$ac_try_echo"; } >&5
3510 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003512 if test -s conftest.err; then
3513 sed '10a\
3514... rest of stderr output deleted ...
3515 10q' conftest.err >conftest.er1
3516 cat conftest.er1 >&5
3517 fi
3518 rm -f conftest.er1 conftest.err
3519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3520 test $ac_status = 0; }
3521done
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Matthias Kloseb9621712010-04-24 17:59:49 +00003523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003524/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003525
Martin v. Löwis11437992002-04-12 09:54:03 +00003526int
3527main ()
3528{
3529
3530 ;
3531 return 0;
3532}
3533_ACEOF
3534ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003535ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003536# Try to create an executable without -o first, disregard a.out.
3537# It will help us diagnose broken compilers, and finding out an intuition
3538# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3540$as_echo_n "checking whether the C compiler works... " >&6; }
3541ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3542
3543# The possible output files:
3544ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546ac_rmfiles=
3547for ac_file in $ac_files
3548do
3549 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3552 esac
3553done
3554rm -f $ac_rmfiles
3555
Matthias Kloseb9621712010-04-24 17:59:49 +00003556if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557case "(($ac_try" in
3558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3559 *) ac_try_echo=$ac_try;;
3560esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3562$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003564 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3566 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3568# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3569# in a Makefile. We should not override ac_cv_exeext if it was cached,
3570# so that the user can short-circuit this test for compilers unknown to
3571# Autoconf.
3572for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003573do
3574 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003577 ;;
3578 [ab].out )
3579 # We found the default executable, but exeext='' is most
3580 # certainly right.
3581 break;;
3582 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 then :; else
3585 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3586 fi
3587 # We set ac_cv_exeext here because the later test for it is not
3588 # safe: cross compilers may not add the suffix if given an `-o'
3589 # argument, so we may need to know it at that point already.
3590 # Even if this section looks crufty: it has the advantage of
3591 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003592 break;;
3593 * )
3594 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 esac
3596done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597test "$ac_cv_exeext" = no && ac_cv_exeext=
3598
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003599else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600 ac_file=''
3601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if test -z "$ac_file"; then :
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3604$as_echo "no" >&6; }
3605$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003606sed 's/^/| /' conftest.$ac_ext >&5
3607
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003610as_fn_error 77 "C compiler cannot create executables
3611See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003612else
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3614$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3617$as_echo_n "checking for C compiler default output file name... " >&6; }
3618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3619$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003621
Matthias Kloseb9621712010-04-24 17:59:49 +00003622rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3625$as_echo_n "checking for suffix of executables... " >&6; }
3626if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627case "(($ac_try" in
3628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3629 *) ac_try_echo=$ac_try;;
3630esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003631eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3632$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3636 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003637 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3638# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3639# work properly (i.e., refer to `conftest.exe'), while it won't with
3640# `rm'.
3641for ac_file in conftest.exe conftest conftest.*; do
3642 test -f "$ac_file" || continue
3643 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003645 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3646 break;;
3647 * ) break;;
3648 esac
3649done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003653as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3654See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003656rm -f conftest conftest$ac_cv_exeext
3657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3658$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003659
3660rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003661EXEEXT=$ac_cv_exeext
3662ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664/* end confdefs.h. */
3665#include <stdio.h>
3666int
3667main ()
3668{
3669FILE *f = fopen ("conftest.out", "w");
3670 return ferror (f) || fclose (f) != 0;
3671
3672 ;
3673 return 0;
3674}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003676ac_clean_files="$ac_clean_files conftest.out"
3677# Check that the compiler produces executables we can run. If not, either
3678# the compiler is broken, or we cross compile.
3679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3680$as_echo_n "checking whether we are cross compiling... " >&6; }
3681if test "$cross_compiling" != yes; then
3682 { { ac_try="$ac_link"
3683case "(($ac_try" in
3684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3685 *) ac_try_echo=$ac_try;;
3686esac
3687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3688$as_echo "$ac_try_echo"; } >&5
3689 (eval "$ac_link") 2>&5
3690 ac_status=$?
3691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3692 test $ac_status = 0; }
3693 if { ac_try='./conftest$ac_cv_exeext'
3694 { { case "(($ac_try" in
3695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3696 *) ac_try_echo=$ac_try;;
3697esac
3698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3699$as_echo "$ac_try_echo"; } >&5
3700 (eval "$ac_try") 2>&5
3701 ac_status=$?
3702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3703 test $ac_status = 0; }; }; then
3704 cross_compiling=no
3705 else
3706 if test "$cross_compiling" = maybe; then
3707 cross_compiling=yes
3708 else
3709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003711as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003712If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003713See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 fi
3715 fi
3716fi
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3718$as_echo "$cross_compiling" >&6; }
3719
3720rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3721ac_clean_files=$ac_clean_files_save
3722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3723$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003724if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
3726else
3727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003728/* end confdefs.h. */
3729
3730int
3731main ()
3732{
3733
3734 ;
3735 return 0;
3736}
3737_ACEOF
3738rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003739if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740case "(($ac_try" in
3741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3742 *) ac_try_echo=$ac_try;;
3743esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3745$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3749 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 for ac_file in conftest.o conftest.obj conftest.*; do
3751 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3755 break;;
3756 esac
3757done
3758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003760sed 's/^/| /' conftest.$ac_ext >&5
3761
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003764as_fn_error $? "cannot compute suffix of object files: cannot compile
3765See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003767rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3770$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003771OBJEXT=$ac_cv_objext
3772ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3774$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003775if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781int
3782main ()
3783{
3784#ifndef __GNUC__
3785 choke me
3786#endif
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_compiler_gnu=yes
3794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003798ac_cv_c_compiler_gnu=$ac_compiler_gnu
3799
3800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3802$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3803if test $ac_compiler_gnu = yes; then
3804 GCC=yes
3805else
3806 GCC=
3807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003808ac_test_CFLAGS=${CFLAGS+set}
3809ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3811$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003812if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 ac_save_c_werror_flag=$ac_c_werror_flag
3816 ac_c_werror_flag=yes
3817 ac_cv_prog_cc_g=no
3818 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822int
3823main ()
3824{
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003830if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003831 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 CFLAGS=""
3834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835/* end confdefs.h. */
3836
3837int
3838main ()
3839{
3840
3841 ;
3842 return 0;
3843}
3844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003845if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846
Matthias Kloseb9621712010-04-24 17:59:49 +00003847else
3848 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851/* end confdefs.h. */
3852
3853int
3854main ()
3855{
3856
3857 ;
3858 return 0;
3859}
3860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003861if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3869 ac_c_werror_flag=$ac_save_c_werror_flag
3870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3872$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003875elif test $ac_cv_prog_cc_g = yes; then
3876 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877 CFLAGS="-g -O2"
3878 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003879 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880 fi
3881else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003882 if test "$GCC" = yes; then
3883 CFLAGS="-O2"
3884 else
3885 CFLAGS=
3886 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3889$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003890if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003892else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003894ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003896/* end confdefs.h. */
3897#include <stdarg.h>
3898#include <stdio.h>
3899#include <sys/types.h>
3900#include <sys/stat.h>
3901/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3902struct buf { int x; };
3903FILE * (*rcsopen) (struct buf *, struct stat *, int);
3904static char *e (p, i)
3905 char **p;
3906 int i;
3907{
3908 return p[i];
3909}
3910static char *f (char * (*g) (char **, int), char **p, ...)
3911{
3912 char *s;
3913 va_list v;
3914 va_start (v,p);
3915 s = g (p, va_arg (v,int));
3916 va_end (v);
3917 return s;
3918}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003919
3920/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3921 function prototypes and stuff, but not '\xHH' hex character constants.
3922 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003924 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3925 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003927int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3930 inside strings and character constants. */
3931#define FOO(x) 'x'
3932int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3933
Skip Montanaro6dead952003-09-25 14:50:04 +00003934int test (int i, double x);
3935struct s1 {int (*f) (int a);};
3936struct s2 {int (*f) (double a);};
3937int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3938int argc;
3939char **argv;
3940int
3941main ()
3942{
3943return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3944 ;
3945 return 0;
3946}
3947_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3949 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003950do
3951 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955rm -f core conftest.err conftest.$ac_objext
3956 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003957done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003959CC=$ac_save_CC
3960
3961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962# AC_CACHE_VAL
3963case "x$ac_cv_prog_cc_c89" in
3964 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3966$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3969$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003970 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3973$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003974esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003975if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003976
Matthias Kloseb9621712010-04-24 17:59:49 +00003977fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003978
Martin v. Löwis11437992002-04-12 09:54:03 +00003979ac_ext=c
3980ac_cpp='$CPP $CPPFLAGS'
3981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3983ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003985
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003986
3987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3989$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003992if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003994
3995 case $withval in
3996 no) with_cxx_main=no
3997 MAINCC='$(CC)';;
3998 yes) with_cxx_main=yes
3999 MAINCC='$(CXX)';;
4000 *) with_cxx_main=yes
4001 MAINCC=$withval
4002 if test -z "$CXX"
4003 then
4004 CXX=$withval
4005 fi;;
4006 esac
4007else
4008
4009 with_cxx_main=no
4010 MAINCC='$(CC)'
4011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012fi
4013
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4015$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004016
4017preset_cxx="$CXX"
4018if test -z "$CXX"
4019then
4020 case "$CC" in
4021 gcc) # Extract the first word of "g++", so it can be a program name with args.
4022set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4024$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004025if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027else
4028 case $CXX in
4029 [\\/]* | ?:[\\/]*)
4030 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4031 ;;
4032 *)
4033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4034for as_dir in notfound
4035do
4036 IFS=$as_save_IFS
4037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004039 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 +00004040 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042 break 2
4043 fi
4044done
Matthias Kloseb9621712010-04-24 17:59:49 +00004045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004047
4048 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4049 ;;
4050esac
4051fi
4052CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004053if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4055$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004056else
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4058$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004061 ;;
4062 cc) # Extract the first word of "c++", so it can be a program name with args.
4063set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4065$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004066if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068else
4069 case $CXX in
4070 [\\/]* | ?:[\\/]*)
4071 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4072 ;;
4073 *)
4074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4075for as_dir in notfound
4076do
4077 IFS=$as_save_IFS
4078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 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 +00004081 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083 break 2
4084 fi
4085done
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004088
4089 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4090 ;;
4091esac
4092fi
4093CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004094if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4096$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004097else
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102 ;;
4103 esac
4104 if test "$CXX" = "notfound"
4105 then
4106 CXX=""
4107 fi
4108fi
4109if test -z "$CXX"
4110then
4111 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4112do
4113 # Extract the first word of "$ac_prog", so it can be a program name with args.
4114set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4116$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004117if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119else
4120 if test -n "$CXX"; then
4121 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4122else
4123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4124for as_dir in $PATH
4125do
4126 IFS=$as_save_IFS
4127 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 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 +00004130 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132 break 2
4133 fi
4134done
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138fi
4139fi
4140CXX=$ac_cv_prog_CXX
4141if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4143$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4146$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147fi
4148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004150 test -n "$CXX" && break
4151done
4152test -n "$CXX" || CXX="notfound"
4153
4154 if test "$CXX" = "notfound"
4155 then
4156 CXX=""
4157 fi
4158fi
4159if test "$preset_cxx" != "$CXX"
4160then
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004162
4163 By default, distutils will build C++ extension modules with \"$CXX\".
4164 If this is not intended, then set CXX on the configure command line.
4165 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004166$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004167
4168 By default, distutils will build C++ extension modules with \"$CXX\".
4169 If this is not intended, then set CXX on the configure command line.
4170 " >&2;}
4171fi
4172
4173
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4175$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4176save_LDFLAGS="$LDFLAGS"
4177LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4180/* end confdefs.h. */
4181
4182int
4183main ()
4184{
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
4190if ac_fn_c_try_link "$LINENO"; then :
4191 NO_AS_NEEDED="-Wl,--no-as-needed"
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4193$as_echo "yes" >&6; }
4194else
4195 NO_AS_NEEDED=""
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4197$as_echo "no" >&6; }
4198fi
4199rm -f core conftest.err conftest.$ac_objext \
4200 conftest$ac_exeext conftest.$ac_ext
4201LDFLAGS="$save_LDFLAGS"
4202
4203
4204
4205# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_ext=c
4207ac_cpp='$CPP $CPPFLAGS'
4208ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4209ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4210ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4212$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004213# On Suns, sometimes $CPP names a directory.
4214if test -n "$CPP" && test -d "$CPP"; then
4215 CPP=
4216fi
4217if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004218 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004220else
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 # Double quotes because CPP needs to be expanded
4222 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4223 do
4224 ac_preproc_ok=false
4225for ac_c_preproc_warn_flag in '' yes
4226do
4227 # Use a header file that comes with gcc, so configuring glibc
4228 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004229 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4230 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004231 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* end confdefs.h. */
4235#ifdef __STDC__
4236# include <limits.h>
4237#else
4238# include <assert.h>
4239#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004240 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004243
Matthias Kloseb9621712010-04-24 17:59:49 +00004244else
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # Broken: fails on valid input.
4246continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004247fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004248rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004254#include <ac_nonexistent.h>
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # Broken: success on invalid input.
4258continue
4259else
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # Passes both tests.
4261ac_preproc_ok=:
4262break
4263fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004264rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004265
4266done
4267# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004268rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 break
4271fi
4272
4273 done
4274 ac_cv_prog_CPP=$CPP
4275
4276fi
4277 CPP=$ac_cv_prog_CPP
4278else
4279 ac_cv_prog_CPP=$CPP
4280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4282$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004283ac_preproc_ok=false
4284for ac_c_preproc_warn_flag in '' yes
4285do
4286 # Use a header file that comes with gcc, so configuring glibc
4287 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004288 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4289 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004290 # On the NeXT, cc -E runs the code through the compiler's parser,
4291 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
4294#ifdef __STDC__
4295# include <limits.h>
4296#else
4297# include <assert.h>
4298#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303else
Martin v. Löwis11437992002-04-12 09:54:03 +00004304 # Broken: fails on valid input.
4305continue
4306fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004307rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004313#include <ac_nonexistent.h>
4314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004315if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 # Broken: success on invalid input.
4317continue
4318else
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 # Passes both tests.
4320ac_preproc_ok=:
4321break
4322fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004323rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004324
4325done
4326# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004327rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004328if $ac_preproc_ok; then :
4329
Martin v. Löwis11437992002-04-12 09:54:03 +00004330else
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004333as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4334See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004335fi
4336
4337ac_ext=c
4338ac_cpp='$CPP $CPPFLAGS'
4339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4341ac_compiler_gnu=$ac_cv_c_compiler_gnu
4342
4343
Matthias Kloseb9621712010-04-24 17:59:49 +00004344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4345$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004346if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004348else
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 # Loop through the user's path and test for each of PROGNAME-LIST
4352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4354do
4355 IFS=$as_save_IFS
4356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 for ac_prog in grep ggrep; do
4358 for ac_exec_ext in '' $ac_executable_extensions; do
4359 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4360 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4361# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 # Check for GNU $ac_path_GREP
4363case `"$ac_path_GREP" --version 2>&1` in
4364*GNU*)
4365 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4366*)
4367 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 while :
4370 do
4371 cat "conftest.in" "conftest.in" >"conftest.tmp"
4372 mv "conftest.tmp" "conftest.in"
4373 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4376 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4379 # Best one so far, save it but keep looking for a better one
4380 ac_cv_path_GREP="$ac_path_GREP"
4381 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004382 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 # 10*(2^10) chars as input seems more than enough
4384 test $ac_count -gt 10 && break
4385 done
4386 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4387esac
4388
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 $ac_path_GREP_found && break 3
4390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004395 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 +00004396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397else
4398 ac_cv_path_GREP=$GREP
4399fi
4400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4403$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 GREP="$ac_cv_path_GREP"
4405
4406
Matthias Kloseb9621712010-04-24 17:59:49 +00004407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4408$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004409if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411else
4412 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4413 then ac_cv_path_EGREP="$GREP -E"
4414 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 # Loop through the user's path and test for each of PROGNAME-LIST
4418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4420do
4421 IFS=$as_save_IFS
4422 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 for ac_prog in egrep; do
4424 for ac_exec_ext in '' $ac_executable_extensions; do
4425 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4426 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4427# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 # Check for GNU $ac_path_EGREP
4429case `"$ac_path_EGREP" --version 2>&1` in
4430*GNU*)
4431 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4432*)
4433 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004434 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435 while :
4436 do
4437 cat "conftest.in" "conftest.in" >"conftest.tmp"
4438 mv "conftest.tmp" "conftest.in"
4439 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4442 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4445 # Best one so far, save it but keep looking for a better one
4446 ac_cv_path_EGREP="$ac_path_EGREP"
4447 ac_path_EGREP_max=$ac_count
4448 fi
4449 # 10*(2^10) chars as input seems more than enough
4450 test $ac_count -gt 10 && break
4451 done
4452 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4453esac
4454
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 $ac_path_EGREP_found && break 3
4456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004457 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004461 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 +00004462 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463else
4464 ac_cv_path_EGREP=$EGREP
4465fi
4466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467 fi
4468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4470$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004472
4473
Matthias Kloseb9621712010-04-24 17:59:49 +00004474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4475$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004476if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 $as_echo_n "(cached) " >&6
4478else
4479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004481#include <stdlib.h>
4482#include <stdarg.h>
4483#include <string.h>
4484#include <float.h>
4485
4486int
4487main ()
4488{
4489
4490 ;
4491 return 0;
4492}
4493_ACEOF
4494if ac_fn_c_try_compile "$LINENO"; then :
4495 ac_cv_header_stdc=yes
4496else
4497 ac_cv_header_stdc=no
4498fi
4499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4500
4501if test $ac_cv_header_stdc = yes; then
4502 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504/* end confdefs.h. */
4505#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004506
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004507_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004510
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004511else
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004514rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004515
Matthias Kloseb9621712010-04-24 17:59:49 +00004516fi
4517
4518if test $ac_cv_header_stdc = yes; then
4519 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4521/* end confdefs.h. */
4522#include <stdlib.h>
4523
4524_ACEOF
4525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4526 $EGREP "free" >/dev/null 2>&1; then :
4527
4528else
4529 ac_cv_header_stdc=no
4530fi
4531rm -f conftest*
4532
4533fi
4534
4535if test $ac_cv_header_stdc = yes; then
4536 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4537 if test "$cross_compiling" = yes; then :
4538 :
4539else
4540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4541/* end confdefs.h. */
4542#include <ctype.h>
4543#include <stdlib.h>
4544#if ((' ' & 0x0FF) == 0x020)
4545# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4546# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4547#else
4548# define ISLOWER(c) \
4549 (('a' <= (c) && (c) <= 'i') \
4550 || ('j' <= (c) && (c) <= 'r') \
4551 || ('s' <= (c) && (c) <= 'z'))
4552# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4553#endif
4554
4555#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4556int
4557main ()
4558{
4559 int i;
4560 for (i = 0; i < 256; i++)
4561 if (XOR (islower (i), ISLOWER (i))
4562 || toupper (i) != TOUPPER (i))
4563 return 2;
4564 return 0;
4565}
4566_ACEOF
4567if ac_fn_c_try_run "$LINENO"; then :
4568
4569else
4570 ac_cv_header_stdc=no
4571fi
4572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4573 conftest.$ac_objext conftest.beam conftest.$ac_ext
4574fi
4575
4576fi
4577fi
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4579$as_echo "$ac_cv_header_stdc" >&6; }
4580if test $ac_cv_header_stdc = yes; then
4581
4582$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4583
4584fi
4585
4586# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4587for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4588 inttypes.h stdint.h unistd.h
4589do :
4590 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4591ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4592"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004593if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 cat >>confdefs.h <<_ACEOF
4595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4596_ACEOF
4597
4598fi
4599
4600done
4601
4602
4603
4604 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004605if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004606 MINIX=yes
4607else
4608 MINIX=
4609fi
4610
4611
4612 if test "$MINIX" = yes; then
4613
4614$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4615
4616
4617$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4618
4619
4620$as_echo "#define _MINIX 1" >>confdefs.h
4621
4622 fi
4623
4624
4625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4626$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004627if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004628 $as_echo_n "(cached) " >&6
4629else
4630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4631/* end confdefs.h. */
4632
4633# define __EXTENSIONS__ 1
4634 $ac_includes_default
4635int
4636main ()
4637{
4638
4639 ;
4640 return 0;
4641}
4642_ACEOF
4643if ac_fn_c_try_compile "$LINENO"; then :
4644 ac_cv_safe_to_define___extensions__=yes
4645else
4646 ac_cv_safe_to_define___extensions__=no
4647fi
4648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4649fi
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4651$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4652 test $ac_cv_safe_to_define___extensions__ = yes &&
4653 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4654
4655 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4656
4657 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4658
4659 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4660
4661 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4662
4663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665# Check for unsupported systems
4666case $ac_sys_system/$ac_sys_release in
4667atheos*|Linux*/1*)
4668 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4669 echo See README for details.
4670 exit 1;;
4671esac
4672
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4675$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004676
4677# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004678if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004679 withval=$with_suffix;
4680 case $withval in
4681 no) EXEEXT=;;
4682 yes) EXEEXT=.exe;;
4683 *) EXEEXT=$withval;;
4684 esac
4685fi
4686
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4688$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689
4690# Test whether we're running on a non-case-sensitive system, in which
4691# case we give a warning if no ext is given
4692
Matthias Kloseb9621712010-04-24 17:59:49 +00004693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4694$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695if test ! -d CaseSensitiveTestDir; then
4696mkdir CaseSensitiveTestDir
4697fi
4698
4699if test -d casesensitivetestdir
4700then
Matthias Kloseb9621712010-04-24 17:59:49 +00004701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4702$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004703 BUILDEXEEXT=.exe
4704else
Matthias Kloseb9621712010-04-24 17:59:49 +00004705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707 BUILDEXEEXT=$EXEEXT
4708fi
4709rmdir CaseSensitiveTestDir
4710
4711case $MACHDEP in
4712bsdos*)
4713 case $CC in
4714 gcc) CC="$CC -D_HAVE_BSDI";;
4715 esac;;
4716esac
4717
4718case $ac_sys_system in
4719hp*|HP*)
4720 case $CC in
4721 cc|*/cc) CC="$CC -Ae";;
4722 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004723esac
4724
4725
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4728$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729if test -z "$LIBRARY"
4730then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004731 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4734$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735
4736# LDLIBRARY is the name of the library to link against (as opposed to the
4737# name of the library into which to insert object files). BLDLIBRARY is also
4738# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4739# is blank as the main program is not linked directly against LDLIBRARY.
4740# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4741# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4742# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4743# DLLLIBRARY is the shared (i.e., DLL) library.
4744#
4745# RUNSHARED is used to run shared python without installed libraries
4746#
4747# INSTSONAME is the name of the shared library that will be use to install
4748# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004749#
4750# LDVERSION is the shared library version number, normally the Python version
4751# with the ABI build flags appended.
4752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753
4754
4755
4756
4757
4758
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760LDLIBRARY="$LIBRARY"
4761BLDLIBRARY='$(LDLIBRARY)'
4762INSTSONAME='$(LDLIBRARY)'
4763DLLLIBRARY=''
4764LDLIBRARYDIR=''
4765RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004766LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
4768# LINKCC is the command that links the python executable -- default is $(CC).
4769# If CXX is set, and if it is needed to link a main function that was
4770# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4771# python might then depend on the C++ runtime
4772# This is altered for AIX in order to build the export list before
4773# linking.
4774
Matthias Kloseb9621712010-04-24 17:59:49 +00004775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4776$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777if test -z "$LINKCC"
4778then
4779 LINKCC='$(PURIFY) $(MAINCC)'
4780 case $ac_sys_system in
4781 AIX*)
4782 exp_extra="\"\""
4783 if test $ac_sys_release -ge 5 -o \
4784 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4785 exp_extra="."
4786 fi
4787 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788 QNX*)
4789 # qcc must be used because the other compilers do not
4790 # support -N.
4791 LINKCC=qcc;;
4792 esac
4793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4795$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004796
4797# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4798# make sure we default having it set to "no": this is used by
4799# distutils.unixccompiler to know if it should add --enable-new-dtags
4800# to linker command lines, and failing to detect GNU ld simply results
4801# in the same bahaviour as before.
4802
Matthias Kloseb9621712010-04-24 17:59:49 +00004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4804$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805ac_prog=ld
4806if test "$GCC" = yes; then
4807 ac_prog=`$CC -print-prog-name=ld`
4808fi
4809case `"$ac_prog" -V 2>&1 < /dev/null` in
4810 *GNU*)
4811 GNULD=yes;;
4812 *)
4813 GNULD=no;;
4814esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4816$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4819$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004820if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004821 $as_echo_n "(cached) " >&6
4822else
4823 ac_cv_c_inline=no
4824for ac_kw in inline __inline__ __inline; do
4825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4826/* end confdefs.h. */
4827#ifndef __cplusplus
4828typedef int foo_t;
4829static $ac_kw foo_t static_foo () {return 0; }
4830$ac_kw foo_t foo () {return 0; }
4831#endif
4832
4833_ACEOF
4834if ac_fn_c_try_compile "$LINENO"; then :
4835 ac_cv_c_inline=$ac_kw
4836fi
4837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4838 test "$ac_cv_c_inline" != no && break
4839done
4840
4841fi
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4843$as_echo "$ac_cv_c_inline" >&6; }
4844
4845case $ac_cv_c_inline in
4846 inline | yes) ;;
4847 *)
4848 case $ac_cv_c_inline in
4849 no) ac_val=;;
4850 *) ac_val=$ac_cv_c_inline;;
4851 esac
4852 cat >>confdefs.h <<_ACEOF
4853#ifndef __cplusplus
4854#define inline $ac_val
4855#endif
4856_ACEOF
4857 ;;
4858esac
4859
4860if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004861
4862$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004863
4864
4865fi
4866
4867
Matthias Kloseb9621712010-04-24 17:59:49 +00004868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4869$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004871if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 enableval=$enable_shared;
4873fi
4874
4875
4876if test -z "$enable_shared"
4877then
4878 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004879 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880 enable_shared="yes";;
4881 *)
4882 enable_shared="no";;
4883 esac
4884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4886$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887
Matthias Kloseb9621712010-04-24 17:59:49 +00004888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4889$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004891if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892 enableval=$enable_profiling; ac_save_cc="$CC"
4893 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004894 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 ac_enable_profiling="no"
4896else
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898/* end confdefs.h. */
4899int main() { return 0; }
4900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902 ac_enable_profiling="yes"
4903else
Matthias Kloseb9621712010-04-24 17:59:49 +00004904 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908fi
4909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 CC="$ac_save_cc"
4911fi
4912
Matthias Kloseb9621712010-04-24 17:59:49 +00004913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4914$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915
4916case "$ac_enable_profiling" in
4917 "yes")
4918 BASECFLAGS="-pg $BASECFLAGS"
4919 LDFLAGS="-pg $LDFLAGS"
4920 ;;
4921esac
4922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4924$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925
4926# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4927# library that we build, but we do not want to link against it (we
4928# will find it with a -framework option). For this reason there is an
4929# extra variable BLDLIBRARY against which Python and the extension
4930# modules are linked, BLDLIBRARY. This is normally the same as
4931# LDLIBRARY, but empty for MacOSX framework builds.
4932if test "$enable_framework"
4933then
4934 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4935 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4936 BLDLIBRARY=''
4937else
4938 BLDLIBRARY='$(LDLIBRARY)'
4939fi
4940
4941# Other platforms follow
4942if test $enable_shared = "yes"; then
4943
Matthias Kloseb9621712010-04-24 17:59:49 +00004944$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945
4946 case $ac_sys_system in
4947 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 LDLIBRARY='libpython$(LDVERSION).dll.a'
4949 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ;;
4951 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004952 LDLIBRARY='libpython$(LDVERSION).so'
4953 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4955 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004956 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004957 then
4958 PY3LIBRARY=libpython3.so
4959 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 ;;
4961 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004962 LDLIBRARY='libpython$(LDVERSION).so'
4963 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4965 case $ac_sys_system in
4966 FreeBSD*)
4967 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4968 ;;
4969 esac
4970 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004971 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004972 then
4973 PY3LIBRARY=libpython3.so
4974 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 ;;
4976 hp*|HP*)
4977 case `uname -m` in
4978 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004979 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980 ;;
4981 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004982 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983 ;;
4984 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004985 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4987 ;;
4988 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004989 LDLIBRARY='libpython$(LDVERSION).so'
4990 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4992 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004994 LDLIBRARY='libpython$(LDVERSION).dylib'
4995 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4997 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004998 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004999 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005000 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5001 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005002
5003 esac
5004else # shared is disabled
5005 case $ac_sys_system in
5006 CYGWIN*)
5007 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005008 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 ;;
5010 esac
5011fi
5012
Matthias Kloseb9621712010-04-24 17:59:49 +00005013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5014$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015
5016if test -n "$ac_tool_prefix"; then
5017 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5018set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005021if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023else
5024 if test -n "$RANLIB"; then
5025 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5026else
5027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5034 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 break 2
5037 fi
5038done
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040IFS=$as_save_IFS
5041
5042fi
5043fi
5044RANLIB=$ac_cv_prog_RANLIB
5045if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5047$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048else
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051fi
5052
5053
5054fi
5055if test -z "$ac_cv_prog_RANLIB"; then
5056 ac_ct_RANLIB=$RANLIB
5057 # Extract the first word of "ranlib", so it can be a program name with args.
5058set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005061if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063else
5064 if test -n "$ac_ct_RANLIB"; then
5065 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5066else
5067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068for as_dir in $PATH
5069do
5070 IFS=$as_save_IFS
5071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5074 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076 break 2
5077 fi
5078done
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080IFS=$as_save_IFS
5081
5082fi
5083fi
5084ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5085if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5087$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088else
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091fi
5092
5093 if test "x$ac_ct_RANLIB" = x; then
5094 RANLIB=":"
5095 else
5096 case $cross_compiling:$ac_tool_warned in
5097yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100ac_tool_warned=yes ;;
5101esac
5102 RANLIB=$ac_ct_RANLIB
5103 fi
5104else
5105 RANLIB="$ac_cv_prog_RANLIB"
5106fi
5107
5108
5109for ac_prog in ar aal
5110do
5111 # Extract the first word of "$ac_prog", so it can be a program name with args.
5112set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005115if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117else
5118 if test -n "$AR"; then
5119 ac_cv_prog_AR="$AR" # Let the user override the test.
5120else
5121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5128 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 break 2
5131 fi
5132done
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134IFS=$as_save_IFS
5135
5136fi
5137fi
5138AR=$ac_cv_prog_AR
5139if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5141$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142else
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145fi
5146
5147
5148 test -n "$AR" && break
5149done
5150test -n "$AR" || AR="ar"
5151
5152
5153# tweak ARFLAGS only if the user didn't set it on the command line
5154
5155if test -z "$ARFLAGS"
5156then
5157 ARFLAGS="rc"
5158fi
5159
5160
5161# Extract the first word of "svnversion", so it can be a program name with args.
5162set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005165if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167else
5168 if test -n "$SVNVERSION"; then
5169 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5170else
5171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5178 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180 break 2
5181 fi
5182done
Matthias Kloseb9621712010-04-24 17:59:49 +00005183 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184IFS=$as_save_IFS
5185
5186 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5187fi
5188fi
5189SVNVERSION=$ac_cv_prog_SVNVERSION
5190if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5192$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193else
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196fi
5197
5198
5199if test $SVNVERSION = found
5200then
5201 SVNVERSION="svnversion \$(srcdir)"
5202else
5203 SVNVERSION="echo Unversioned directory"
5204fi
5205
Georg Brandl1ca2e792011-03-05 20:51:24 +01005206
5207
5208
Georg Brandl187c1112011-07-03 09:23:20 +02005209
5210if test -e $srcdir/.hg/00changelog.i
5211then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005212# Extract the first word of "hg", so it can be a program name with args.
5213set dummy hg; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if ${ac_cv_prog_HAS_HG+:} false; then :
5217 $as_echo_n "(cached) " >&6
5218else
5219 if test -n "$HAS_HG"; then
5220 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5221else
5222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229 ac_cv_prog_HAS_HG="found"
5230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234 done
5235IFS=$as_save_IFS
5236
5237 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5238fi
5239fi
5240HAS_HG=$ac_cv_prog_HAS_HG
5241if test -n "$HAS_HG"; then
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5243$as_echo "$HAS_HG" >&6; }
5244else
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
Georg Brandl187c1112011-07-03 09:23:20 +02005250else
5251HAS_HG=no-repository
5252fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005253if test $HAS_HG = found
5254then
5255 HGVERSION="hg id -i \$(srcdir)"
5256 HGTAG="hg id -t \$(srcdir)"
5257 HGBRANCH="hg id -b \$(srcdir)"
5258else
5259 HGVERSION=""
5260 HGTAG=""
5261 HGBRANCH=""
5262fi
5263
Georg Brandl187c1112011-07-03 09:23:20 +02005264
5265DISABLE_ASDLGEN=""
5266# Extract the first word of "python", so it can be a program name with args.
5267set dummy python; ac_word=$2
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5269$as_echo_n "checking for $ac_word... " >&6; }
5270if ${ac_cv_prog_HAS_PYTHON+:} false; then :
5271 $as_echo_n "(cached) " >&6
5272else
5273 if test -n "$HAS_PYTHON"; then
5274 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5275else
5276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5277for as_dir in $PATH
5278do
5279 IFS=$as_save_IFS
5280 test -z "$as_dir" && as_dir=.
5281 for ac_exec_ext in '' $ac_executable_extensions; do
5282 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5283 ac_cv_prog_HAS_PYTHON="found"
5284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5285 break 2
5286 fi
5287done
5288 done
5289IFS=$as_save_IFS
5290
5291 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5292fi
5293fi
5294HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5295if test -n "$HAS_PYTHON"; then
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5297$as_echo "$HAS_PYTHON" >&6; }
5298else
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }
5301fi
5302
5303
5304if test $HAS_HG != found -o $HAS_PYTHON != found
5305then
5306 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5307fi
5308
5309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310case $MACHDEP in
5311bsdos*|hp*|HP*)
5312 # install -d does not work on BSDI or HP-UX
5313 if test -z "$INSTALL"
5314 then
5315 INSTALL="${srcdir}/install-sh -c"
5316 fi
5317esac
5318ac_aux_dir=
5319for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005320 if test -f "$ac_dir/install-sh"; then
5321 ac_aux_dir=$ac_dir
5322 ac_install_sh="$ac_aux_dir/install-sh -c"
5323 break
5324 elif test -f "$ac_dir/install.sh"; then
5325 ac_aux_dir=$ac_dir
5326 ac_install_sh="$ac_aux_dir/install.sh -c"
5327 break
5328 elif test -f "$ac_dir/shtool"; then
5329 ac_aux_dir=$ac_dir
5330 ac_install_sh="$ac_aux_dir/shtool install -c"
5331 break
5332 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333done
5334if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005335 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336fi
5337
5338# These three variables are undocumented and unsupported,
5339# and are intended to be withdrawn in a future Autoconf release.
5340# They can cause serious problems if a builder's source tree is in a directory
5341# whose full name contains unusual characters.
5342ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5343ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5344ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5345
5346
5347# Find a good install program. We prefer a C program (faster),
5348# so one script is as good as another. But avoid the broken or
5349# incompatible versions:
5350# SysV /etc/install, /usr/sbin/install
5351# SunOS /usr/etc/install
5352# IRIX /sbin/install
5353# AIX /bin/install
5354# AmigaOS /C/install, which installs bootblocks on floppy discs
5355# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5356# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5357# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5358# OS/2's system install, which has a completely different semantic
5359# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005360# Reject install programs that cannot install multiple files.
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5362$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005364if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366else
5367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368for as_dir in $PATH
5369do
5370 IFS=$as_save_IFS
5371 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 # Account for people who put trailing slashes in PATH elements.
5373case $as_dir/ in #((
5374 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377 /usr/ucb/* ) ;;
5378 *)
5379 # OSF1 and SCO ODT 3.0 have their own names for install.
5380 # Don't use installbsd from OSF since it installs stuff as root
5381 # by default.
5382 for ac_prog in ginstall scoinst install; do
5383 for ac_exec_ext in '' $ac_executable_extensions; do
5384 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5385 if test $ac_prog = install &&
5386 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5387 # AIX install. It has an incompatible calling convention.
5388 :
5389 elif test $ac_prog = install &&
5390 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5391 # program-specific install script used by HP pwplus--don't use.
5392 :
5393 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 rm -rf conftest.one conftest.two conftest.dir
5395 echo one > conftest.one
5396 echo two > conftest.two
5397 mkdir conftest.dir
5398 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5399 test -s conftest.one && test -s conftest.two &&
5400 test -s conftest.dir/conftest.one &&
5401 test -s conftest.dir/conftest.two
5402 then
5403 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5404 break 3
5405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406 fi
5407 fi
5408 done
5409 done
5410 ;;
5411esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005412
5413 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414IFS=$as_save_IFS
5415
Matthias Kloseb9621712010-04-24 17:59:49 +00005416rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417
5418fi
5419 if test "${ac_cv_path_install+set}" = set; then
5420 INSTALL=$ac_cv_path_install
5421 else
5422 # As a last resort, use the slow shell script. Don't cache a
5423 # value for INSTALL within a source directory, because that will
5424 # break other packages using the cache if that directory is
5425 # removed, or if the value is a relative name.
5426 INSTALL=$ac_install_sh
5427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5430$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
5432# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5433# It thinks the first close brace ends the variable substitution.
5434test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5435
5436test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5437
5438test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5439
5440
5441# Not every filesystem supports hard links
5442
5443if test -z "$LN" ; then
5444 case $ac_sys_system in
5445 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446 *) LN=ln;;
5447 esac
5448fi
5449
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005450# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005451
5452ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005453
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5456$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
5458# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005459if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460 withval=$with_pydebug;
5461if test "$withval" != no
5462then
5463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5467$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005469 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005470else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5471$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472fi
5473else
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476fi
5477
5478
5479# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5480# merged with this chunk of code?
5481
5482# Optimizer/debugger flags
5483# ------------------------
5484# (The following bit of code is complicated enough - please keep things
5485# indented properly. Just pretend you're editing Python code. ;-)
5486
5487# There are two parallel sets of case statements below, one that checks to
5488# see if OPT was set and one that does BASECFLAGS setting based upon
5489# compiler and platform. BASECFLAGS tweaks need to be made even if the
5490# user set OPT.
5491
5492# tweak OPT based on compiler and platform, only if the user didn't set
5493# it on the command line
5494
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005495if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496then
5497 case $GCC in
5498 yes)
5499 if test "$CC" != 'g++' ; then
5500 STRICT_PROTO="-Wstrict-prototypes"
5501 fi
5502 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5503 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5504 WRAP="-fwrapv"
5505 fi
5506 case $ac_cv_prog_cc_g in
5507 yes)
5508 if test "$Py_DEBUG" = 'true' ; then
5509 # Optimization messes up debuggers, so turn it off for
5510 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005511 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512 else
5513 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5514 fi
5515 ;;
5516 *)
5517 OPT="-O3 -Wall $STRICT_PROTO"
5518 ;;
5519 esac
5520 case $ac_sys_system in
5521 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5522 ;;
5523 esac
5524 ;;
5525
5526 *)
5527 OPT="-O"
5528 ;;
5529 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005530fi
5531
5532
5533
5534# The -arch flags for universal builds on OSX
5535UNIVERSAL_ARCH_FLAGS=
5536
5537
5538# tweak BASECFLAGS based on compiler and platform
5539case $GCC in
5540yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005541 # Python doesn't violate C99 aliasing rules, but older versions of
5542 # GCC produce warnings for legal Python code. Enable
5543 # -fno-strict-aliasing on versions of GCC that support but produce
5544 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5546$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 ac_save_cc="$CC"
5548 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005549 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005550 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005552else
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005555
Matthias Kloseb159a552010-04-25 21:00:44 +00005556
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005557int
5558main ()
5559{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005560
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005561 ;
5562 return 0;
5563}
Matthias Kloseb159a552010-04-25 21:00:44 +00005564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005566if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005567
5568 CC="$ac_save_cc -fstrict-aliasing"
5569 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005571/* end confdefs.h. */
5572
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005573 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005574int
5575main ()
5576{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005577double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005578 ;
5579 return 0;
5580}
Matthias Kloseb159a552010-04-25 21:00:44 +00005581
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005583if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005584
5585 ac_cv_no_strict_aliasing=no
5586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587else
Matthias Kloseb159a552010-04-25 21:00:44 +00005588
5589 ac_cv_no_strict_aliasing=yes
5590
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005591fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005593
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005594else
Matthias Kloseb159a552010-04-25 21:00:44 +00005595
5596 ac_cv_no_strict_aliasing=no
5597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005600fi
5601
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005602 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5605$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005606 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 then
5608 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5609 fi
5610
5611 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5612 # support. Without this, treatment of subnormals doesn't follow
5613 # the standard.
5614 case $ac_sys_machine in
5615 alpha*)
5616 BASECFLAGS="$BASECFLAGS -mieee"
5617 ;;
5618 esac
5619
5620 case $ac_sys_system in
5621 SCO_SV*)
5622 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5623 ;;
5624 # is there any other compiler on Darwin besides gcc?
5625 Darwin*)
5626 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5627 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005628 if test "${CC}" = gcc
5629 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5631$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005632 case "${UNIVERSALSDK}" in
5633 */MacOSX10.4u.sdk)
5634 # Build using 10.4 SDK, force usage of gcc when the
5635 # compiler is gcc, otherwise the user will get very
5636 # confusing error messages when building on OSX 10.6
5637 CC=gcc-4.0
5638 CPP=cpp-4.0
5639 ;;
5640 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5642$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005643 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645
5646 if test "${enable_universalsdk}"; then
5647 UNIVERSAL_ARCH_FLAGS=""
5648 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5649 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5650 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005651 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5653 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005654 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005655 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
5657 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005659 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005660 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005662 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5663 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005664 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005665 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005666
5667 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5668 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005669 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005670 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005671
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005673 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 +00005674
5675 fi
5676
5677
Ronald Oussoren666028b2010-04-18 19:07:43 +00005678 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5679 if test "${UNIVERSALSDK}" != "/"
5680 then
5681 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5682 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005683 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 fi
5685 fi
5686
5687 # Calculate the right deployment target for this build.
5688 #
5689 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5690 if test ${cur_target} '>' 10.2; then
5691 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005692 if test ${enable_universalsdk}; then
5693 if test "${UNIVERSAL_ARCHS}" = "all"; then
5694 # Ensure that the default platform for a
5695 # 4-way universal build is OSX 10.5,
5696 # that's the first OS release where
5697 # 4-way builds make sense.
5698 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005699
5700 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5701 cur_target='10.5'
5702
5703 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5704 cur_target='10.5'
5705
5706 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5707 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005708 fi
5709 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005710 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005711 # On Intel macs default to a deployment
5712 # target of 10.4, that's the first OSX
5713 # release with Intel support.
5714 cur_target="10.4"
5715 fi
5716 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 fi
5718 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5719
5720 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5721 # environment with a value that is the same as what we'll use
5722 # in the Makefile to ensure that we'll get the same compiler
5723 # environment during configure and build time.
5724 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5725 export MACOSX_DEPLOYMENT_TARGET
5726 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5727
5728 ;;
5729 OSF*)
5730 BASECFLAGS="$BASECFLAGS -mieee"
5731 ;;
5732 esac
5733 ;;
5734
5735*)
5736 case $ac_sys_system in
5737 OpenUNIX*|UnixWare*)
5738 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5739 ;;
5740 OSF*)
5741 BASECFLAGS="$BASECFLAGS -ieee -std"
5742 ;;
5743 SCO_SV*)
5744 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5745 ;;
5746 esac
5747 ;;
5748esac
5749
5750if test "$Py_DEBUG" = 'true'; then
5751 :
5752else
5753 OPT="-DNDEBUG $OPT"
5754fi
5755
5756if test "$ac_arch_flags"
5757then
5758 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5759fi
5760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761# Check whether GCC supports PyArg_ParseTuple format
5762if test "$GCC" = "yes"
5763then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5765$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 save_CFLAGS=$CFLAGS
5767 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769/* end confdefs.h. */
5770
5771 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772int
5773main ()
5774{
5775
5776 ;
5777 return 0;
5778}
Matthias Kloseb159a552010-04-25 21:00:44 +00005779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
Matthias Kloseb159a552010-04-25 21:00:44 +00005783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
Matthias Kloseb159a552010-04-25 21:00:44 +00005786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005787$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789else
Matthias Kloseb159a552010-04-25 21:00:44 +00005790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005792$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793
5794fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 CFLAGS=$save_CFLAGS
5797fi
5798
5799# On some compilers, pthreads are available without further options
5800# (e.g. MacOS X). On some of these systems, the compiler will not
5801# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5802# So we have to see first whether pthreads are available without
5803# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5805$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005806if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808else
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810 ac_cv_pthread_is_default=no
5811else
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813/* end confdefs.h. */
5814
5815#include <pthread.h>
5816
5817void* routine(void* p){return NULL;}
5818
5819int main(){
5820 pthread_t p;
5821 if(pthread_create(&p,NULL,routine,NULL)!=0)
5822 return 1;
5823 (void)pthread_detach(p);
5824 return 0;
5825}
5826
5827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
5830 ac_cv_pthread_is_default=yes
5831 ac_cv_kthread=no
5832 ac_cv_pthread=no
5833
5834else
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
5840
5841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
5843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5845$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
5847
5848if test $ac_cv_pthread_is_default = yes
5849then
5850 ac_cv_kpthread=no
5851else
5852# -Kpthread, if available, provides the right #defines
5853# and linker options to make pthread_create available
5854# Some compilers won't report that they do not support -Kpthread,
5855# so we need to run a program to see whether it really made the
5856# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5858$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005859if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005860 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861else
5862 ac_save_cc="$CC"
5863CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ac_cv_kpthread=no
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868/* end confdefs.h. */
5869
5870#include <pthread.h>
5871
5872void* routine(void* p){return NULL;}
5873
5874int main(){
5875 pthread_t p;
5876 if(pthread_create(&p,NULL,routine,NULL)!=0)
5877 return 1;
5878 (void)pthread_detach(p);
5879 return 0;
5880}
5881
5882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ac_cv_kpthread=yes
5885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892CC="$ac_save_cc"
5893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5896$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
5898
5899if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5900then
5901# -Kthread, if available, provides the right #defines
5902# and linker options to make pthread_create available
5903# Some compilers won't report that they do not support -Kthread,
5904# so we need to run a program to see whether it really made the
5905# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5907$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005908if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005909 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910else
5911 ac_save_cc="$CC"
5912CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005913if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ac_cv_kthread=no
5915else
Matthias Kloseb9621712010-04-24 17:59:49 +00005916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917/* end confdefs.h. */
5918
5919#include <pthread.h>
5920
5921void* routine(void* p){return NULL;}
5922
5923int main(){
5924 pthread_t p;
5925 if(pthread_create(&p,NULL,routine,NULL)!=0)
5926 return 1;
5927 (void)pthread_detach(p);
5928 return 0;
5929}
5930
5931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005932if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ac_cv_kthread=yes
5934else
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941CC="$ac_save_cc"
5942fi
5943
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5945$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946fi
5947
5948if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5949then
5950# -pthread, if available, provides the right #defines
5951# and linker options to make pthread_create available
5952# Some compilers won't report that they do not support -pthread,
5953# so we need to run a program to see whether it really made the
5954# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5956$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005957if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
5960 ac_save_cc="$CC"
5961CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ac_cv_pthread=no
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966/* end confdefs.h. */
5967
5968#include <pthread.h>
5969
5970void* routine(void* p){return NULL;}
5971
5972int main(){
5973 pthread_t p;
5974 if(pthread_create(&p,NULL,routine,NULL)!=0)
5975 return 1;
5976 (void)pthread_detach(p);
5977 return 0;
5978}
5979
5980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_pthread=yes
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988fi
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990CC="$ac_save_cc"
5991fi
5992
Matthias Kloseb9621712010-04-24 17:59:49 +00005993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5994$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
5997# If we have set a CC compiler flag for thread support then
5998# check if it works for CXX, too.
5999ac_cv_cxx_thread=no
6000if test ! -z "$CXX"
6001then
Matthias Kloseb9621712010-04-24 17:59:49 +00006002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6003$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004ac_save_cxx="$CXX"
6005
6006if test "$ac_cv_kpthread" = "yes"
6007then
6008 CXX="$CXX -Kpthread"
6009 ac_cv_cxx_thread=yes
6010elif test "$ac_cv_kthread" = "yes"
6011then
6012 CXX="$CXX -Kthread"
6013 ac_cv_cxx_thread=yes
6014elif test "$ac_cv_pthread" = "yes"
6015then
6016 CXX="$CXX -pthread"
6017 ac_cv_cxx_thread=yes
6018fi
6019
6020if test $ac_cv_cxx_thread = yes
6021then
6022 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6023 $CXX -c conftest.$ac_ext 2>&5
6024 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6025 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6026 then
6027 ac_cv_cxx_thread=yes
6028 else
6029 ac_cv_cxx_thread=no
6030 fi
6031 rm -fr conftest*
6032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6034$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035fi
6036CXX="$ac_save_cxx"
6037
6038
6039# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6041$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006042if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044else
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046/* end confdefs.h. */
6047#include <stdlib.h>
6048#include <stdarg.h>
6049#include <string.h>
6050#include <float.h>
6051
6052int
6053main ()
6054{
6055
6056 ;
6057 return 0;
6058}
6059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006060if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 ac_cv_header_stdc=yes
6062else
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066
6067if test $ac_cv_header_stdc = yes; then
6068 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070/* end confdefs.h. */
6071#include <string.h>
6072
6073_ACEOF
6074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $EGREP "memchr" >/dev/null 2>&1; then :
6076
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077else
6078 ac_cv_header_stdc=no
6079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006080rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083
6084if test $ac_cv_header_stdc = yes; then
6085 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087/* end confdefs.h. */
6088#include <stdlib.h>
6089
6090_ACEOF
6091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 $EGREP "free" >/dev/null 2>&1; then :
6093
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006094else
6095 ac_cv_header_stdc=no
6096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006097rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098
6099fi
6100
6101if test $ac_cv_header_stdc = yes; then
6102 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104 :
6105else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107/* end confdefs.h. */
6108#include <ctype.h>
6109#include <stdlib.h>
6110#if ((' ' & 0x0FF) == 0x020)
6111# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6112# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6113#else
6114# define ISLOWER(c) \
6115 (('a' <= (c) && (c) <= 'i') \
6116 || ('j' <= (c) && (c) <= 'r') \
6117 || ('s' <= (c) && (c) <= 'z'))
6118# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6119#endif
6120
6121#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6122int
6123main ()
6124{
6125 int i;
6126 for (i = 0; i < 256; i++)
6127 if (XOR (islower (i), ISLOWER (i))
6128 || toupper (i) != TOUPPER (i))
6129 return 2;
6130 return 0;
6131}
6132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006133if ac_fn_c_try_run "$LINENO"; then :
6134
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135else
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140fi
6141
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142fi
6143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6145$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146if test $ac_cv_header_stdc = yes; then
6147
Matthias Kloseb9621712010-04-24 17:59:49 +00006148$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149
6150fi
6151
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006152for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6153fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006154ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006155shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006156unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006157sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6158sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006159sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006160sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006161sys/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 +00006162sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006163bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006164do :
6165 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6166ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006167if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006169#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006170_ACEOF
6171
6172fi
6173
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174done
6175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006177for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6180$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006181if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006183else
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186#include <sys/types.h>
6187#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
6192if ((DIR *) 0)
6193return 0;
6194 ;
6195 return 0;
6196}
6197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006199 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006205eval ac_res=\$$as_ac_Header
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6207$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006208if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006210#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006211_ACEOF
6212
6213ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216done
6217# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6218if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6220$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006221if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006223else
Martin v. Löwis11437992002-04-12 09:54:03 +00006224 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228/* Override any GCC internal prototype to avoid an error.
6229 Use char because int might match the return type of a GCC
6230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006231#ifdef __cplusplus
6232extern "C"
6233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006234char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006235int
6236main ()
6237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006239 ;
6240 return 0;
6241}
6242_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243for ac_lib in '' dir; do
6244 if test -z "$ac_lib"; then
6245 ac_res="none required"
6246 else
6247 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006248 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006250 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006253rm -f core conftest.err conftest.$ac_objext \
6254 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006255 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006258done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006259if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261else
6262 ac_cv_search_opendir=no
6263fi
6264rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006265LIBS=$ac_func_search_save_LIBS
6266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6268$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006269ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006270if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
Michael W. Hudson54241132001-12-07 15:38:26 +00006275else
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6277$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006278if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006280else
6281 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006285/* Override any GCC internal prototype to avoid an error.
6286 Use char because int might match the return type of a GCC
6287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006288#ifdef __cplusplus
6289extern "C"
6290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006291char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006292int
6293main ()
6294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006295return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006296 ;
6297 return 0;
6298}
6299_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300for ac_lib in '' x; do
6301 if test -z "$ac_lib"; then
6302 ac_res="none required"
6303 else
6304 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006305 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006308 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006310rm -f core conftest.err conftest.$ac_objext \
6311 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006312 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006313 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006316if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318else
6319 ac_cv_search_opendir=no
6320fi
6321rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006322LIBS=$ac_func_search_save_LIBS
6323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6325$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006327if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006329
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330fi
6331
6332fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6335$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006336if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006341#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006342int
6343main ()
6344{
6345return makedev(0, 0);
6346 ;
6347 return 0;
6348}
6349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351 ac_cv_header_sys_types_h_makedev=yes
6352else
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006355rm -f core conftest.err conftest.$ac_objext \
6356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357
6358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6360$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361
6362if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006363ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006364if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368fi
6369
6370
6371
6372 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006373 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006374if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006375
Matthias Kloseb9621712010-04-24 17:59:49 +00006376$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377
6378fi
6379
6380
6381 fi
6382fi
6383
Michael W. Hudson54241132001-12-07 15:38:26 +00006384
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006385# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006386for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006387do :
6388 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006389#ifdef HAVE_CURSES_H
6390#include <curses.h>
6391#endif
6392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006394if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006396#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006397_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006398
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006399fi
6400
6401done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402
6403
Martin v. Löwis11017b12006-01-14 18:12:57 +00006404# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006405for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006406do :
6407 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 +00006408#ifdef HAVE_ASM_TYPES_H
6409#include <asm/types.h>
6410#endif
6411#ifdef HAVE_SYS_SOCKET_H
6412#include <sys/socket.h>
6413#endif
6414
Matthias Kloseb9621712010-04-24 17:59:49 +00006415"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006416if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006418#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419_ACEOF
6420
6421fi
6422
6423done
6424
6425
Guido van Rossum627b2d71993-12-24 10:39:16 +00006426# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006427was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6429$as_echo_n "checking for clock_t in time.h... " >&6; }
6430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006432#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006433
6434_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006438else
Martin v. Löwis11437992002-04-12 09:54:03 +00006439
6440
Matthias Kloseb9621712010-04-24 17:59:49 +00006441$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006442
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006445rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006446
Matthias Kloseb9621712010-04-24 17:59:49 +00006447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6448$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006449
Neal Norwitz11690112002-07-30 01:08:28 +00006450# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6452$as_echo_n "checking for makedev... " >&6; }
6453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006454/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006455
Jesus Cea740f53a2010-04-28 11:35:30 +00006456#if defined(MAJOR_IN_MKDEV)
6457#include <sys/mkdev.h>
6458#elif defined(MAJOR_IN_SYSMACROS)
6459#include <sys/sysmacros.h>
6460#else
6461#include <sys/types.h>
6462#endif
6463
Neal Norwitz11690112002-07-30 01:08:28 +00006464int
6465main ()
6466{
Jesus Cea740f53a2010-04-28 11:35:30 +00006467
6468 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006469 ;
6470 return 0;
6471}
Matthias Kloseb159a552010-04-25 21:00:44 +00006472
Neal Norwitz11690112002-07-30 01:08:28 +00006473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006474if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006475 ac_cv_has_makedev=yes
6476else
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006479rm -f core conftest.err conftest.$ac_objext \
6480 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006481if test "$ac_cv_has_makedev" = "no"; then
6482 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006484/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006485
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006486#define _OSF_SOURCE 1
6487#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006488
Neal Norwitz11690112002-07-30 01:08:28 +00006489int
6490main ()
6491{
6492 makedev(0, 0)
6493 ;
6494 return 0;
6495}
6496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006497if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006498 ac_cv_has_makedev=yes
6499else
Matthias Kloseb9621712010-04-24 17:59:49 +00006500 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006502rm -f core conftest.err conftest.$ac_objext \
6503 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006504 if test "$ac_cv_has_makedev" = "yes"; then
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006507
6508 fi
6509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6511$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006512if test "$ac_cv_has_makedev" = "yes"; then
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006515
6516fi
6517
Martin v. Löwis399a6892002-10-04 10:22:02 +00006518# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6519# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6520# defined, but the compiler does not support pragma redefine_extname,
6521# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6522# structures (such as rlimit64) without declaring them. As a
6523# work-around, disable LFS on such configurations
6524
6525use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6527$as_echo_n "checking Solaris LFS bug... " >&6; }
6528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006530
6531#define _LARGEFILE_SOURCE 1
6532#define _FILE_OFFSET_BITS 64
6533#include <sys/resource.h>
6534
Martin v. Löwis399a6892002-10-04 10:22:02 +00006535int
6536main ()
6537{
6538struct rlimit foo;
6539 ;
6540 return 0;
6541}
6542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006544 sol_lfs_bug=no
6545else
Matthias Kloseb9621712010-04-24 17:59:49 +00006546 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6550$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006551if test "$sol_lfs_bug" = "yes"; then
6552 use_lfs=no
6553fi
6554
6555if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006556# Two defines needed to enable largefile support on various platforms
6557# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006558case $ac_sys_system/$ac_sys_release in
6559AIX*)
6560
6561$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6562
6563 ;;
6564esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006567
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006570
Martin v. Löwis399a6892002-10-04 10:22:02 +00006571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006572
Guido van Rossum84e7b241996-08-19 21:59:00 +00006573# Add some code to confdefs.h so that the test for off_t works on SCO
6574cat >> confdefs.h <<\EOF
6575#if defined(SCO_DS)
6576#undef _OFF_T
6577#endif
6578EOF
6579
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006581ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006582if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006584else
Martin v. Löwis11437992002-04-12 09:54:03 +00006585
6586cat >>confdefs.h <<_ACEOF
6587#define mode_t int
6588_ACEOF
6589
6590fi
6591
Matthias Kloseb9621712010-04-24 17:59:49 +00006592ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006593if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006594
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006595else
Martin v. Löwis11437992002-04-12 09:54:03 +00006596
6597cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006599_ACEOF
6600
6601fi
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006604if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006605
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006606else
Martin v. Löwis11437992002-04-12 09:54:03 +00006607
6608cat >>confdefs.h <<_ACEOF
6609#define pid_t int
6610_ACEOF
6611
6612fi
6613
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006616#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006618
Matthias Kloseb9621712010-04-24 17:59:49 +00006619ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006620if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006621
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006622else
Martin v. Löwis11437992002-04-12 09:54:03 +00006623
6624cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006626_ACEOF
6627
6628fi
6629
Matthias Kloseb9621712010-04-24 17:59:49 +00006630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6631$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006632if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006636/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006637#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
6639_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006642 ac_cv_type_uid_t=yes
6643else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006644 ac_cv_type_uid_t=no
6645fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006646rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6650$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006651if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652
Matthias Kloseb9621712010-04-24 17:59:49 +00006653$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006654
6655
Matthias Kloseb9621712010-04-24 17:59:49 +00006656$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657
6658fi
6659
Matthias Kloseb9621712010-04-24 17:59:49 +00006660ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6661case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006662 no|yes) ;; #(
6663 *)
6664
Matthias Kloseb9621712010-04-24 17:59:49 +00006665$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006666
6667
6668cat >>confdefs.h <<_ACEOF
6669#define uint32_t $ac_cv_c_uint32_t
6670_ACEOF
6671;;
6672 esac
6673
Matthias Kloseb9621712010-04-24 17:59:49 +00006674ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6675case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006676 no|yes) ;; #(
6677 *)
6678
Matthias Kloseb9621712010-04-24 17:59:49 +00006679$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006680
6681
6682cat >>confdefs.h <<_ACEOF
6683#define uint64_t $ac_cv_c_uint64_t
6684_ACEOF
6685;;
6686 esac
6687
Matthias Kloseb9621712010-04-24 17:59:49 +00006688ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6689case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006690 no|yes) ;; #(
6691 *)
6692
6693cat >>confdefs.h <<_ACEOF
6694#define int32_t $ac_cv_c_int32_t
6695_ACEOF
6696;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006697esac
6698
Matthias Kloseb9621712010-04-24 17:59:49 +00006699ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6700case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006701 no|yes) ;; #(
6702 *)
6703
6704cat >>confdefs.h <<_ACEOF
6705#define int64_t $ac_cv_c_int64_t
6706_ACEOF
6707;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006708esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006709
Matthias Kloseb9621712010-04-24 17:59:49 +00006710ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006711if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712
Matthias Kloseb9621712010-04-24 17:59:49 +00006713$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006714
6715fi
6716
Jack Jansendd19cf82001-12-06 22:36:17 +00006717
Michael W. Hudson54241132001-12-07 15:38:26 +00006718# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006719# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720# The cast to long int works around a bug in the HP C Compiler
6721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6725$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006726if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006730
Martin v. Löwis11437992002-04-12 09:54:03 +00006731else
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 if test "$ac_cv_type_int" = yes; then
6733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006735as_fn_error 77 "cannot compute sizeof (int)
6736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737 else
6738 ac_cv_sizeof_int=0
6739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6744$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745
6746
6747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006749#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006751
6752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6758$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006759if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 if test "$ac_cv_type_long" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006768as_fn_error 77 "cannot compute sizeof (long)
6769See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770 else
6771 ac_cv_sizeof_long=0
6772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6777$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778
6779
6780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006782#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006784
6785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786# The cast to long int works around a bug in the HP C Compiler
6787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6791$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006792if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 if test "$ac_cv_type_void_p" = yes; then
6799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006801as_fn_error 77 "cannot compute sizeof (void *)
6802See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803 else
6804 ac_cv_sizeof_void_p=0
6805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6810$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811
6812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006815#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006817
6818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6824$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006825if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 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 +00006829
Martin v. Löwis11437992002-04-12 09:54:03 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 if test "$ac_cv_type_short" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006834as_fn_error 77 "cannot compute sizeof (short)
6835See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836 else
6837 ac_cv_sizeof_short=0
6838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6843$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844
6845
6846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006848#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006850
6851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6857$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006858if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 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 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 if test "$ac_cv_type_float" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006867as_fn_error 77 "cannot compute sizeof (float)
6868See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869 else
6870 ac_cv_sizeof_float=0
6871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6876$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877
6878
6879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006882_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006883
6884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885# The cast to long int works around a bug in the HP C Compiler
6886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6888# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6890$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006891if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 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 +00006895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896else
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 if test "$ac_cv_type_double" = yes; then
6898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006900as_fn_error 77 "cannot compute sizeof (double)
6901See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902 else
6903 ac_cv_sizeof_double=0
6904 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6909$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910
6911
6912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006915_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006916
6917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918# The cast to long int works around a bug in the HP C Compiler
6919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6921# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6923$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006924if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 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 +00006928
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 if test "$ac_cv_type_fpos_t" = yes; then
6931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006933as_fn_error 77 "cannot compute sizeof (fpos_t)
6934See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935 else
6936 ac_cv_sizeof_fpos_t=0
6937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6942$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943
6944
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006947#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006948_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006949
Michael W. Hudson54241132001-12-07 15:38:26 +00006950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951# The cast to long int works around a bug in the HP C Compiler
6952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6954# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6956$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006957if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006959else
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 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 +00006961
Martin v. Löwis18e16552006-02-15 17:27:45 +00006962else
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 if test "$ac_cv_type_size_t" = yes; then
6964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006966as_fn_error 77 "cannot compute sizeof (size_t)
6967See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968 else
6969 ac_cv_sizeof_size_t=0
6970 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006972
Martin v. Löwis18e16552006-02-15 17:27:45 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6975$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976
6977
6978
Martin v. Löwis18e16552006-02-15 17:27:45 +00006979cat >>confdefs.h <<_ACEOF
6980#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6981_ACEOF
6982
6983
Christian Heimes400adb02008-02-01 08:12:03 +00006984# The cast to long int works around a bug in the HP C Compiler
6985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6987# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6989$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006990if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006992else
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 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 +00006994
Christian Heimes400adb02008-02-01 08:12:03 +00006995else
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 if test "$ac_cv_type_pid_t" = yes; then
6997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006999as_fn_error 77 "cannot compute sizeof (pid_t)
7000See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007001 else
7002 ac_cv_sizeof_pid_t=0
7003 fi
7004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007005
Christian Heimes400adb02008-02-01 08:12:03 +00007006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7008$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007009
7010
7011
7012cat >>confdefs.h <<_ACEOF
7013#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7014_ACEOF
7015
7016
Michael W. Hudson54241132001-12-07 15:38:26 +00007017
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7019$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007020have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007022/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007023
Martin v. Löwis11437992002-04-12 09:54:03 +00007024int
7025main ()
7026{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007027long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 ;
7029 return 0;
7030}
7031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034
Matthias Kloseb9621712010-04-24 17:59:49 +00007035$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007037 have_long_long=yes
7038
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7042$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007043if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044# The cast to long int works around a bug in the HP C Compiler
7045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7049$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007050if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 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 +00007054
Martin v. Löwis11437992002-04-12 09:54:03 +00007055else
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 if test "$ac_cv_type_long_long" = yes; then
7057 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007059as_fn_error 77 "cannot compute sizeof (long long)
7060See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061 else
7062 ac_cv_sizeof_long_long=0
7063 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7068$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069
7070
7071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007073#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007075
Michael W. Hudson54241132001-12-07 15:38:26 +00007076
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007077fi
7078
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7080$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007081have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007083/* end confdefs.h. */
7084
7085int
7086main ()
7087{
7088long double x; x = (long double)0;
7089 ;
7090 return 0;
7091}
7092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007093if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007094
7095
Matthias Kloseb9621712010-04-24 17:59:49 +00007096$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007097
7098 have_long_double=yes
7099
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007100fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7103$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007104if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007105# The cast to long int works around a bug in the HP C Compiler
7106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7110$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007111if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007113else
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 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 +00007115
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if test "$ac_cv_type_long_double" = yes; then
7118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007120as_fn_error 77 "cannot compute sizeof (long double)
7121See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007122 else
7123 ac_cv_sizeof_long_double=0
7124 fi
7125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007126
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7129$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007130
7131
7132
7133cat >>confdefs.h <<_ACEOF
7134#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7135_ACEOF
7136
7137
7138fi
7139
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7142$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007143have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007145/* end confdefs.h. */
7146
7147int
7148main ()
7149{
7150_Bool x; x = (_Bool)0;
7151 ;
7152 return 0;
7153}
7154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007155if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007156
7157
Matthias Kloseb9621712010-04-24 17:59:49 +00007158$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007159
7160 have_c99_bool=yes
7161
Thomas Woutersb2137042007-02-01 18:02:27 +00007162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7165$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007166if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007167# The cast to long int works around a bug in the HP C Compiler
7168# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7169# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7170# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7172$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007173if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007175else
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 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 +00007177
Thomas Woutersb2137042007-02-01 18:02:27 +00007178else
Matthias Kloseb9621712010-04-24 17:59:49 +00007179 if test "$ac_cv_type__Bool" = yes; then
7180 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007182as_fn_error 77 "cannot compute sizeof (_Bool)
7183See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007184 else
7185 ac_cv_sizeof__Bool=0
7186 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007188
Thomas Woutersb2137042007-02-01 18:02:27 +00007189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7191$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192
7193
7194
Thomas Woutersb2137042007-02-01 18:02:27 +00007195cat >>confdefs.h <<_ACEOF
7196#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7197_ACEOF
7198
7199
7200fi
7201
Matthias Kloseb9621712010-04-24 17:59:49 +00007202ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007203 #include <stdint.h>
7204 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007205 #ifdef HAVE_INTTYPES_H
7206 #include <inttypes.h>
7207 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007208"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007209if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007210
7211cat >>confdefs.h <<_ACEOF
7212#define HAVE_UINTPTR_T 1
7213_ACEOF
7214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007215# The cast to long int works around a bug in the HP C Compiler
7216# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7217# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7218# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7220$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007221if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007223else
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 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 +00007225
Martin v. Löwis11437992002-04-12 09:54:03 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if test "$ac_cv_type_uintptr_t" = yes; then
7228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007230as_fn_error 77 "cannot compute sizeof (uintptr_t)
7231See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232 else
7233 ac_cv_sizeof_uintptr_t=0
7234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Martin v. Löwis11437992002-04-12 09:54:03 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7239$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240
7241
7242
Martin v. Löwis11437992002-04-12 09:54:03 +00007243cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007244#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007245_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007246
Michael W. Hudson54241132001-12-07 15:38:26 +00007247
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007248fi
7249
Thomas Wouters89f507f2006-12-13 04:49:30 +00007250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251# The cast to long int works around a bug in the HP C Compiler
7252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7254# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7256$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007257if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259else
Matthias Kloseb9621712010-04-24 17:59:49 +00007260 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007261#ifdef HAVE_SYS_TYPES_H
7262#include <sys/types.h>
7263#endif
7264
Matthias Kloseb9621712010-04-24 17:59:49 +00007265"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 if test "$ac_cv_type_off_t" = yes; then
7269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007271as_fn_error 77 "cannot compute sizeof (off_t)
7272See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_off_t=0
7275 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7280$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007285#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007289
Matthias Kloseb9621712010-04-24 17:59:49 +00007290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7291$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007292if test "$have_long_long" = yes
7293then
7294if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007295 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7300$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007304fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007305else
Matthias Kloseb9621712010-04-24 17:59:49 +00007306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007308fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310# The cast to long int works around a bug in the HP C Compiler
7311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7315$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007316if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007320#ifdef HAVE_SYS_TYPES_H
7321#include <sys/types.h>
7322#endif
7323#ifdef HAVE_TIME_H
7324#include <time.h>
7325#endif
7326
Matthias Kloseb9621712010-04-24 17:59:49 +00007327"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 if test "$ac_cv_type_time_t" = yes; then
7331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007333as_fn_error 77 "cannot compute sizeof (time_t)
7334See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007335 else
7336 ac_cv_sizeof_time_t=0
7337 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7342$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007344
7345
Martin v. Löwis11437992002-04-12 09:54:03 +00007346cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007347#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007348_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007349
Michael W. Hudson54241132001-12-07 15:38:26 +00007350
7351
Trent Mick635f6fb2000-08-23 21:33:05 +00007352# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007353ac_save_cc="$CC"
7354if test "$ac_cv_kpthread" = "yes"
7355then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007356elif test "$ac_cv_kthread" = "yes"
7357then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007358elif test "$ac_cv_pthread" = "yes"
7359then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007360fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Matthias Kloseb9621712010-04-24 17:59:49 +00007362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7363$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007364have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007366/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007367
7368 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007369int
7370main ()
7371{
Guido van Rossum12580492000-09-24 16:47:19 +00007372pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 ;
7374 return 0;
7375}
Matthias Kloseb159a552010-04-25 21:00:44 +00007376
Martin v. Löwis11437992002-04-12 09:54:03 +00007377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007378if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007379 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7383$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007384if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7390$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007391if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007395#ifdef HAVE_PTHREAD_H
7396#include <pthread.h>
7397#endif
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007400
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007401else
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 if test "$ac_cv_type_pthread_t" = yes; then
7403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007405as_fn_error 77 "cannot compute sizeof (pthread_t)
7406See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007407 else
7408 ac_cv_sizeof_pthread_t=0
7409 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007411
Trent Mick635f6fb2000-08-23 21:33:05 +00007412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7414$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007416
7417
Martin v. Löwis11437992002-04-12 09:54:03 +00007418cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007419#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007420_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007421
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007422
Trent Mick635f6fb2000-08-23 21:33:05 +00007423fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007424CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007425
Michael W. Hudson54241132001-12-07 15:38:26 +00007426
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007427case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007428 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007429 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7430 ;;
7431 Darwin/*)
7432 OTHER_LIBTOOL_OPT=""
7433 ;;
7434esac
7435
7436
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437ARCH_RUN_32BIT=""
7438
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007439case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007440 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007441 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7442 if test "${enable_universalsdk}"; then
7443 :
7444 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007445 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007446 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007449 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007450 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007451 if test ${gcc_version} '<' 4.0
7452 then
7453 LIBTOOL_CRUFT="-lcc_dynamic"
7454 else
7455 LIBTOOL_CRUFT=""
7456 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007458 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007459else
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007461/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007462
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007463 #include <unistd.h>
7464 int main(int argc, char*argv[])
7465 {
7466 if (sizeof(long) == 4) {
7467 return 0;
7468 } else {
7469 return 1;
7470 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007471 }
7472
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007474if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007475 ac_osx_32bit=yes
7476else
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007481fi
7482
7483
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007484 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007485 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007486 i386)
7487 MACOSX_DEFAULT_ARCH="i386"
7488 ;;
7489 ppc)
7490 MACOSX_DEFAULT_ARCH="ppc"
7491 ;;
7492 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007493 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007494 ;;
7495 esac
7496 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007497 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007498 i386)
7499 MACOSX_DEFAULT_ARCH="x86_64"
7500 ;;
7501 ppc)
7502 MACOSX_DEFAULT_ARCH="ppc64"
7503 ;;
7504 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007505 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007506 ;;
7507 esac
7508
7509 #ARCH_RUN_32BIT="true"
7510 fi
7511
7512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007514 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515esac
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7518$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007519if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007521 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007523 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007526
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7528$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007529 if test $enable_shared = "yes"
7530 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007531 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 +00007532 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7535$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007536fi
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7539$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007540case $ac_sys_system/$ac_sys_release in
7541 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007544
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7546$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007547 ;;
7548 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007551 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007552esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007553
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007555
Michael W. Hudson54241132001-12-07 15:38:26 +00007556
7557
7558
7559
Benjamin Peterson99f03762010-04-11 22:15:28 +00007560
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561
Georg Brandlb1441c72009-01-03 22:33:39 +00007562
Thomas Wouters477c8d52006-05-27 19:21:47 +00007563cat >>confdefs.h <<_ACEOF
7564#define SHLIB_EXT "$SO"
7565_ACEOF
7566
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007568# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007569# (Shared libraries in this instance are shared modules to be loaded into
7570# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7572$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007573if test -z "$LDSHARED"
7574then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007576 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007577 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007578 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007579 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007580 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007581 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007582 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 if test "$GCC" = "yes" ; then
7584 LDSHARED='$(CC) -shared'
7585 LDCXXSHARED='$(CXX) -shared'
7586 else
7587 LDSHARED='$(CC) -G'
7588 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007589 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007590 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 if test "$GCC" = "yes" ; then
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared'
7594 else
7595 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007596 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007597 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007598 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED='$(CC) -bundle'
7600 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007601 if test "$enable_framework" ; then
7602 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007603 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7604 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007605 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007606 else
7607 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007608 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007610 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007611 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007612 LDSHARED='$(CC) -bundle'
7613 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007614 if test "$enable_framework" ; then
7615 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007616 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7617 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007618 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007619 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007620 # No framework, use the Python app as bundle-loader
7621 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007622 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007623 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007624 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007625 Darwin/*)
7626 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7627 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007628
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007629 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007630 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007631 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007632 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007633 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007634 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7635 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007636 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007637 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007638 LDSHARED='$(CC) -bundle'
7639 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007640 if test "$enable_framework" ; then
7641 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007642 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7643 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007644 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007645 else
7646 # No framework, use the Python app as bundle-loader
7647 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7648 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007649 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007650 fi
7651 fi
7652 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007653 Linux*|GNU*|QNX*)
7654 LDSHARED='$(CC) -shared'
7655 LDCXXSHARED='$(CXX) -shared';;
7656 BSD/OS*/4*)
7657 LDSHARED="gcc -shared"
7658 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007659 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007660 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007661 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007662 LDSHARED='$(CC) -shared'
7663 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007664 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007665 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007666 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007667 OpenBSD*)
7668 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7669 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007670 LDSHARED='$(CC) -shared $(CCSHARED)'
7671 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007672 else
7673 case `uname -r` in
7674 [01].* | 2.[0-7] | 2.[0-7].*)
7675 LDSHARED="ld -Bshareable ${LDFLAGS}"
7676 ;;
7677 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007678 LDSHARED='$(CC) -shared $(CCSHARED)'
7679 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007680 ;;
7681 esac
7682 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007683 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007684 LDSHARED='$(CC) -shared'
7685 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007686 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007687 if test "$GCC" = "yes" ; then
7688 LDSHARED='$(CC) -shared'
7689 LDCXXSHARED='$(CXX) -shared'
7690 else
7691 LDSHARED='$(CC) -G'
7692 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007693 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007694 SCO_SV*)
7695 LDSHARED='$(CC) -Wl,-G,-Bexport'
7696 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7697 CYGWIN*)
7698 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7699 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007700 *) LDSHARED="ld";;
7701 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7704$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007705LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007706BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007707# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007708# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7710$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711if test -z "$CCSHARED"
7712then
Guido van Rossum07397971997-04-29 21:49:50 +00007713 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007714 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007715 then CCSHARED="-fPIC";
7716 elif test `uname -p` = sparc;
7717 then CCSHARED="-xcode=pic32";
7718 else CCSHARED="-Kpic";
7719 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007720 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007721 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007722 else CCSHARED="+z";
7723 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007724 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007725 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007726 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007727 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007728 if test "$GCC" = "yes"
7729 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007730 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007731 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007732 SCO_SV*)
7733 if test "$GCC" = "yes"
7734 then CCSHARED="-fPIC"
7735 else CCSHARED="-Kpic -belf"
7736 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007737 IRIX*/6*) case $CC in
7738 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007739 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007740 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007741 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7744$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007745# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007746# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7748$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007749if test -z "$LINKFORSHARED"
7750then
Guido van Rossum07397971997-04-29 21:49:50 +00007751 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007752 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007753 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007754 LINKFORSHARED="-Wl,-E -Wl,+s";;
7755# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007756 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007757 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007758 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007760 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007761 if test "$enable_framework"
7762 then
Jack Jansenda49e192005-01-07 13:08:22 +00007763 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007764 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007765 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007766 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007767 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007768 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007769 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007770 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7771 then
7772 LINKFORSHARED="-Wl,--export-dynamic"
7773 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007774 SunOS/5*) case $CC in
7775 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007776 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007777 then
7778 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007779 fi;;
7780 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007781 CYGWIN*)
7782 if test $enable_shared = "no"
7783 then
7784 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7785 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007786 QNX*)
7787 # -Wl,-E causes the symbols to be added to the dynamic
7788 # symbol table so that they can be found when a module
7789 # is loaded. -N 2048K causes the stack size to be set
7790 # to 2048 kilobytes so that the stack doesn't overflow
7791 # when running test_compile.py.
7792 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007793 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7796$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007797
Michael W. Hudson54241132001-12-07 15:38:26 +00007798
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007799
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7801$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007802if test ! "$LIBRARY" = "$LDLIBRARY"
7803then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007804 case $ac_sys_system in
7805 CYGWIN*)
7806 # Cygwin needs CCSHARED when building extension DLLs
7807 # but not when building the interpreter DLL.
7808 CFLAGSFORSHARED='';;
7809 *)
7810 CFLAGSFORSHARED='$(CCSHARED)'
7811 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7814$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007815
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007816# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7817# library (with --enable-shared).
7818# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007819# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7820# if it is not required, since it creates a dependency of the shared library
7821# to LIBS. This, in turn, means that applications linking the shared libpython
7822# don't need to link LIBS explicitly. The default should be only changed
7823# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7826$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007827case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007828 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007829 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7832$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007833
7834
Guido van Rossum627b2d71993-12-24 10:39:16 +00007835# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7837$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007838if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007840else
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007842LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846/* Override any GCC internal prototype to avoid an error.
7847 Use char because int might match the return type of a GCC
7848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849#ifdef __cplusplus
7850extern "C"
7851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007852char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007853int
7854main ()
7855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866rm -f core conftest.err conftest.$ac_objext \
7867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007868LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7871$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007872if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 cat >>confdefs.h <<_ACEOF
7874#define HAVE_LIBDL 1
7875_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007877 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879fi
7880 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7882$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007883if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007885else
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007887LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891/* Override any GCC internal prototype to avoid an error.
7892 Use char because int might match the return type of a GCC
7893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894#ifdef __cplusplus
7895extern "C"
7896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007897char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
7905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007908else
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007913LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7916$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007917if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 cat >>confdefs.h <<_ACEOF
7919#define HAVE_LIBDLD 1
7920_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007922 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924fi
7925 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007926
Georg Brandlb1441c72009-01-03 22:33:39 +00007927# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007928if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7930$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007931if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007933else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007934 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938/* Override any GCC internal prototype to avoid an error.
7939 Use char because int might match the return type of a GCC
7940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007941#ifdef __cplusplus
7942extern "C"
7943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007944char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ;
7950 return 0;
7951}
7952_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953for ac_lib in '' pthread rt posix4; do
7954 if test -z "$ac_lib"; then
7955 ac_res="none required"
7956 else
7957 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007965 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007969if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971else
7972 ac_cv_search_sem_init=no
7973fi
7974rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007975LIBS=$ac_func_search_save_LIBS
7976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7978$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007980if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007982
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007983fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007984 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007985 # posix4 on Solaris 2.6
7986 # pthread (first!) on Linux
7987fi
7988
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7991$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007992if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994else
7995 ac_check_lib_save_LIBS=$LIBS
7996LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000/* Override any GCC internal prototype to avoid an error.
8001 Use char because int might match the return type of a GCC
8002 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008003#ifdef __cplusplus
8004extern "C"
8005#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008006char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008007int
8008main ()
8009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008011 ;
8012 return 0;
8013}
8014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008015if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008016 ac_cv_lib_intl_textdomain=yes
8017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008020rm -f core conftest.err conftest.$ac_objext \
8021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008022LIBS=$ac_check_lib_save_LIBS
8023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8025$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008026if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008029
Brett Cannonc6d936e2009-06-07 20:09:53 +00008030 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031fi
8032
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008033
8034# checks for system dependent C++ extensions support
8035case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8037$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008040
Georg Brandl59e87bd2011-02-15 19:48:59 +00008041 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008045loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
Matthias Kloseb159a552010-04-25 21:00:44 +00008049
Martin v. Löwis11437992002-04-12 09:54:03 +00008050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008052
Matthias Kloseb159a552010-04-25 21:00:44 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Matthias Kloseb159a552010-04-25 21:00:44 +00008056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008057$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008058
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008059else
Matthias Kloseb159a552010-04-25 21:00:44 +00008060
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008062$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008063
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065rm -f core conftest.err conftest.$ac_objext \
8066 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008067 *) ;;
8068esac
8069
Guido van Rossum70c7f481998-03-26 18:44:10 +00008070# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8072$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008073if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008075else
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008077LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081/* Override any GCC internal prototype to avoid an error.
8082 Use char because int might match the return type of a GCC
8083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008084#ifdef __cplusplus
8085extern "C"
8086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008087char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008088int
8089main ()
8090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8106$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008107if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008108 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008109fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008110 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8112$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008113if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008115else
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008117LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121/* Override any GCC internal prototype to avoid an error.
8122 Use char because int might match the return type of a GCC
8123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008124#ifdef __cplusplus
8125extern "C"
8126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008127char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ;
8133 return 0;
8134}
8135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008143LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8146$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008147if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008148 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008149fi
8150 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8153$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8159$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008160LIBS="$withval $LIBS"
8161
8162else
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8164$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165fi
8166
Guido van Rossum7f43da71994-08-01 12:15:30 +00008167
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008168if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8170set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008173if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008175else
8176 case $PKG_CONFIG in
8177 [\\/]* | ?:[\\/]*)
8178 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8179 ;;
8180 *)
8181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182for as_dir in $PATH
8183do
8184 IFS=$as_save_IFS
8185 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008187 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8188 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008190 break 2
8191 fi
8192done
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008194IFS=$as_save_IFS
8195
8196 ;;
8197esac
8198fi
8199PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8200if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8202$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206fi
8207
8208
8209fi
8210if test -z "$ac_cv_path_PKG_CONFIG"; then
8211 ac_pt_PKG_CONFIG=$PKG_CONFIG
8212 # Extract the first word of "pkg-config", so it can be a program name with args.
8213set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008216if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008218else
8219 case $ac_pt_PKG_CONFIG in
8220 [\\/]* | ?:[\\/]*)
8221 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8222 ;;
8223 *)
8224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225for as_dir in $PATH
8226do
8227 IFS=$as_save_IFS
8228 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8231 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008233 break 2
8234 fi
8235done
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008237IFS=$as_save_IFS
8238
8239 ;;
8240esac
8241fi
8242ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8243if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8245$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008249fi
8250
8251 if test "x$ac_pt_PKG_CONFIG" = x; then
8252 PKG_CONFIG=""
8253 else
8254 case $cross_compiling:$ac_tool_warned in
8255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008258ac_tool_warned=yes ;;
8259esac
8260 PKG_CONFIG=$ac_pt_PKG_CONFIG
8261 fi
8262else
8263 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8264fi
8265
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008266
8267# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8269$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008270
8271# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008273 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008274else
8275 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008276fi
8277
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8280$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008281
8282# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8284$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008285
8286# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008287if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008288 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008289else
8290 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008291fi
8292
8293
8294if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008295 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8296else
8297 LIBFFI_INCLUDEDIR=""
8298fi
8299
8300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8302$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008303
Benjamin Peterson076ed002010-10-31 17:11:02 +00008304# Check for support for loadable sqlite extensions
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8306$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8307# Check whether --enable-loadable-sqlite-extensions was given.
8308if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8309 enableval=$enable_loadable_sqlite_extensions;
8310else
8311 enable_loadable_sqlite_extensions="no"
8312fi
8313
8314
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8316$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8317
Matthias Klose55708cc2009-04-30 08:06:49 +00008318# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8320$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008321
8322# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008323if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008324 withval=$with_dbmliborder;
8325if test x$with_dbmliborder = xyes
8326then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008327as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008328else
8329 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8330 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8331 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008332 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008333 fi
8334 done
8335fi
8336fi
8337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8339$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008340
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008341# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008342
8343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8345$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349 withval=$with_signal_module;
8350fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008351
8352
8353if test -z "$with_signal_module"
8354then with_signal_module="yes"
8355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8357$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008358
8359if test "${with_signal_module}" = "yes"; then
8360 USE_SIGNAL_MODULE=""
8361 SIGNAL_OBJS=""
8362else
8363 USE_SIGNAL_MODULE="#"
8364 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8365fi
8366
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008367# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008369USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8372$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
Guido van Rossumec2f0731997-01-22 20:54:01 +00008374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8379$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008380LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008381if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008382 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008383fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387fi
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389
8390# Templates for things AC_DEFINEd more than once.
8391# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008392
8393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8397$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 withval=$with_threads;
8402fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008403
8404
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008405# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008408if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409 withval=$with_thread; with_threads=$with_thread
8410fi
8411
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008412
8413if test -z "$with_threads"
8414then with_threads="yes"
8415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8417$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008418
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008419
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008420if test "$with_threads" = "no"
8421then
8422 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008423elif test "$ac_cv_pthread_is_default" = yes
8424then
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008426
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008427 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008429
8430 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008432elif test "$ac_cv_kpthread" = "yes"
8433then
8434 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008435 if test "$ac_cv_cxx_thread" = "yes"; then
8436 CXX="$CXX -Kpthread"
8437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008440 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008441 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008442elif test "$ac_cv_kthread" = "yes"
8443then
8444 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008445 if test "$ac_cv_cxx_thread" = "yes"; then
8446 CXX="$CXX -Kthread"
8447 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008449
8450 posix_threads=yes
8451 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008452elif test "$ac_cv_pthread" = "yes"
8453then
8454 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008455 if test "$ac_cv_cxx_thread" = "yes"; then
8456 CXX="$CXX -pthread"
8457 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008459
8460 posix_threads=yes
8461 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008462else
8463 if test ! -z "$with_threads" -a -d "$with_threads"
8464 then LDFLAGS="$LDFLAGS -L$with_threads"
8465 fi
8466 if test ! -z "$withval" -a -d "$withval"
8467 then LDFLAGS="$LDFLAGS -L$withval"
8468 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008469
8470 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008471 # define _POSIX_THREADS in unistd.h. Some apparently don't
8472 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8474$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008477
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008478#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008479#ifdef _POSIX_THREADS
8480yes
8481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008486 unistd_defines_pthreads=yes
8487else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008488 unistd_defines_pthreads=no
8489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008490rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8493$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008494
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008496
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008498if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008505
8506 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008507 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008508else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008509
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008511if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516
Matthias Kloseb9621712010-04-24 17:59:49 +00008517$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008518
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008519 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008520else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008521
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008522 # Just looking for pthread_create in libpthread is not enough:
8523 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8524 # So we really have to include pthread.h, and then link.
8525 _libs=$LIBS
8526 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8528$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008531#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008532
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008533void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008534int
8535main ()
8536{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008537
8538pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ;
8540 return 0;
8541}
8542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Matthias Kloseb9621712010-04-24 17:59:49 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8546$as_echo "yes" >&6; }
8547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008548
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008549 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008550 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008553 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008555if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008557
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008558 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008559 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008560else
Guido van Rossumad678af1998-10-02 14:42:15 +00008561
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8563$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008564if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008568LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572/* Override any GCC internal prototype to avoid an error.
8573 Use char because int might match the return type of a GCC
8574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008575#ifdef __cplusplus
8576extern "C"
8577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008578char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008579int
8580main ()
8581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ;
8584 return 0;
8585}
8586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592rm -f core conftest.err conftest.$ac_objext \
8593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008594LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8597$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008598if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008602 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008603 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008604else
Greg Steinadf63d62000-07-05 10:38:09 +00008605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8607$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008608if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008610else
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008612LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616/* Override any GCC internal prototype to avoid an error.
8617 Use char because int might match the return type of a GCC
8618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619#ifdef __cplusplus
8620extern "C"
8621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008622char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
8625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 ;
8628 return 0;
8629}
8630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636rm -f core conftest.err conftest.$ac_objext \
8637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8641$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008642if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008644
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008645 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008646 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008647 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008648else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008649
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8651$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008652if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008654else
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008656LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660/* Override any GCC internal prototype to avoid an error.
8661 Use char because int might match the return type of a GCC
8662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663#ifdef __cplusplus
8664extern "C"
8665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008666char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008667int
8668main ()
8669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ;
8672 return 0;
8673}
8674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680rm -f core conftest.err conftest.$ac_objext \
8681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8685$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008686if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008688
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008689 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008690 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008691 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008692else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8695$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008696if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008698else
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008700LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704/* Override any GCC internal prototype to avoid an error.
8705 Use char because int might match the return type of a GCC
8706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707#ifdef __cplusplus
8708extern "C"
8709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008710char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ;
8716 return 0;
8717}
8718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724rm -f core conftest.err conftest.$ac_objext \
8725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008726LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8729$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008730if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008733 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008734 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008735 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008736else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008737
Martin v. Löwis130fb172001-07-19 11:00:41 +00008738 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008739fi
8740
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008742fi
8743
Guido van Rossum0be3e491997-05-22 20:33:33 +00008744fi
8745
Guido van Rossum49545951997-12-02 19:28:29 +00008746fi
8747
Guido van Rossumb93a8621998-05-07 13:27:32 +00008748fi
8749
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751rm -f core conftest.err conftest.$ac_objext \
8752 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753fi
8754
Martin v. Löwis11437992002-04-12 09:54:03 +00008755
8756fi
8757
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008758
Michael W. Hudson54241132001-12-07 15:38:26 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8761$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008762if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008766LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770/* Override any GCC internal prototype to avoid an error.
8771 Use char because int might match the return type of a GCC
8772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773#ifdef __cplusplus
8774extern "C"
8775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008776char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 ;
8782 return 0;
8783}
8784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8795$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008796if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008798
Martin v. Löwis130fb172001-07-19 11:00:41 +00008799 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008800 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008802fi
8803
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008804
Neal Norwitza978ab02002-11-02 16:58:05 +00008805 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8807$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008808if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008810else
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008812LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816/* Override any GCC internal prototype to avoid an error.
8817 Use char because int might match the return type of a GCC
8818 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008819#ifdef __cplusplus
8820extern "C"
8821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008822char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ;
8828 return 0;
8829}
8830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836rm -f core conftest.err conftest.$ac_objext \
8837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8841$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008842if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008844
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008845 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008846 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008847 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008848fi
8849
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008850 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008851
Martin v. Löwis130fb172001-07-19 11:00:41 +00008852 if test "$USE_THREAD_MODULE" != "#"
8853 then
8854 # If the above checks didn't disable threads, (at least) OSF1
8855 # needs this '-threads' argument during linking.
8856 case $ac_sys_system in
8857 OSF1) LDLAST=-threads;;
8858 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008859 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008860fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008861
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862if test "$posix_threads" = "yes"; then
8863 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008866
8867 fi
8868
8869 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8870 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008871 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008873
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008874 ;;
8875 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008876$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008877
8878 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008879 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008881
8882 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 esac
8884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8886$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008887 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008891 ac_cv_pthread_system_supported=no
8892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008895#include <pthread.h>
8896 void *foo(void *parm) {
8897 return NULL;
8898 }
8899 main() {
8900 pthread_attr_t attr;
8901 pthread_t id;
8902 if (pthread_attr_init(&attr)) exit(-1);
8903 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8904 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8905 exit(0);
8906 }
8907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008909 ac_cv_pthread_system_supported=yes
8910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008915fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
Guido van Rossum627b2d71993-12-24 10:39:16 +00008918fi
8919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8921$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008922 if test "$ac_cv_pthread_system_supported" = "yes"; then
8923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008925
8926 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 for ac_func in pthread_sigmask
8928do :
8929 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008930if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008931 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008932#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008933_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008934 case $ac_sys_system in
8935 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008936
Matthias Kloseb9621712010-04-24 17:59:49 +00008937$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008938
8939 ;;
8940 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008941fi
8942done
8943
8944fi
8945
8946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008947# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008948
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8950$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008952if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8956$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957 ipv6=no
8958 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8960$as_echo "yes" >&6; }
8961 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962
8963 ipv6=yes
8964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966else
Martin v. Löwis11437992002-04-12 09:54:03 +00008967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 ipv6=no
8973
8974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977 /* AF_INET6 available check */
8978#include <sys/types.h>
8979#include <sys/socket.h>
8980main()
8981{
8982 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8983 exit(1);
8984 else
8985 exit(0);
8986}
8987
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008989if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8992$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995else
Matthias Kloseb159a552010-04-25 21:00:44 +00008996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004fi
9005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009007if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9009$as_echo_n "checking if RFC2553 API is available... " >&6; }
9010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009012
9013 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009014#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009018struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009019 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ;
9021 return 0;
9022}
Matthias Kloseb159a552010-04-25 21:00:44 +00009023
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009025if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009028$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009029 ipv6=yes
9030
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009031else
Matthias Kloseb159a552010-04-25 21:00:44 +00009032
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009034$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009035 ipv6=no
9036
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009039fi
9040
9041if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009043
9044fi
9045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046fi
9047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009048
9049ipv6type=unknown
9050ipv6lib=none
9051ipv6trylibc=no
9052
9053if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9055$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009056 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9057 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058 case $i in
9059 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009061/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063#include <netinet/in.h>
9064#ifdef IPV6_INRIA_VERSION
9065yes
9066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009069 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009070 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009072rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073
9074 ;;
9075 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079#include <netinet/in.h>
9080#ifdef __KAME__
9081yes
9082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009083_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009086 ipv6type=$i;
9087 ipv6lib=inet6
9088 ipv6libdir=/usr/local/v6/lib
9089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009091rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092
9093 ;;
9094 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009096/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009097
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098#include <features.h>
9099#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9100yes
9101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009102_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105 ipv6type=$i;
9106 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009108rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109
9110 ;;
9111 linux-inet6)
9112 if test -d /usr/inet6; then
9113 ipv6type=$i
9114 ipv6lib=inet6
9115 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009116 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 fi
9118 ;;
9119 solaris)
9120 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009121 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122 ipv6type=$i
9123 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124 fi
9125 fi
9126 ;;
9127 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009131#include <sys/param.h>
9132#ifdef _TOSHIBA_INET6
9133yes
9134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009138 ipv6type=$i;
9139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009143
9144 ;;
9145 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009149#include </usr/local/v6/include/sys/v6config.h>
9150#ifdef __V6D__
9151yes
9152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009156 ipv6type=$i;
9157 ipv6lib=v6;
9158 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009159 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009161rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009162
9163 ;;
9164 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168#include <sys/param.h>
9169#ifdef _ZETA_MINAMI_INET6
9170yes
9171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175 ipv6type=$i;
9176 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009177 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180
9181 ;;
9182 esac
9183 if test "$ipv6type" != "unknown"; then
9184 break
9185 fi
9186 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9188$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189fi
9190
9191if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9192 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9193 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9194 echo "using lib$ipv6lib"
9195 else
9196 if test $ipv6trylibc = "yes"; then
9197 echo "using libc"
9198 else
9199 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9200 echo "You need to fetch lib$ipv6lib.a from appropriate"
9201 echo 'ipv6 kit and compile beforehand.'
9202 exit 1
9203 fi
9204 fi
9205fi
9206
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9208$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009210/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009211
9212 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009213int
9214main ()
9215{
9216FSIORefNum fRef = 0
9217 ;
9218 return 0;
9219}
Matthias Kloseb159a552010-04-25 21:00:44 +00009220
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009222if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009223
Matthias Kloseb159a552010-04-25 21:00:44 +00009224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9228$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009229
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009230else
Matthias Kloseb159a552010-04-25 21:00:44 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009234
9235fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9237
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009238# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9240$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009242# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244 withval=$with_doc_strings;
9245fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009246
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009247
9248if test -z "$with_doc_strings"
9249then with_doc_strings="yes"
9250fi
9251if test "$with_doc_strings" != "no"
9252then
9253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009255
9256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9258$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009259
Antoine Pitrou042b1282010-08-13 21:15:58 +00009260# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9262$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009265if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009267if test "$withval" != no
9268then
9269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9273$as_echo "yes" >&6; }
9274else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009276fi
9277else
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280fi
9281
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009282
9283# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9285$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009288if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289 withval=$with_pymalloc;
9290fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009291
Neil Schemenauera35c6882001-02-27 04:45:05 +00009292
Neil Schemenauer16c22972002-03-22 15:34:49 +00009293if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009294then
9295 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009296 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009297fi
9298if test "$with_pymalloc" != "no"
9299then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009302
9303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9305$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009306
Benjamin Peterson05159c42009-12-03 03:01:27 +00009307# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9309$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009310
9311# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009312if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009313 withval=$with_valgrind;
9314else
9315 with_valgrind=no
9316fi
9317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9319$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009320if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009322if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009325
9326else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009327 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009328
9329fi
9330
9331
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009332 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009333fi
9334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009335# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009336
Guido van Rossum98935bf2001-09-05 19:13:16 +00009337DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009338
Guido van Rossume97ee181999-12-20 21:27:22 +00009339# the dlopen() function means we might want to use dynload_shlib.o. some
9340# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009341for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009342do :
9343 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009344if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009346#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009347_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009348
Guido van Rossume97ee181999-12-20 21:27:22 +00009349fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009350done
Guido van Rossume97ee181999-12-20 21:27:22 +00009351
Michael W. Hudson54241132001-12-07 15:38:26 +00009352
Guido van Rossume97ee181999-12-20 21:27:22 +00009353# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9354# loading of modules.
9355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9357$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009358if test -z "$DYNLOADFILE"
9359then
9360 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009361 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9362 if test "$ac_cv_func_dlopen" = yes
9363 then DYNLOADFILE="dynload_shlib.o"
9364 else DYNLOADFILE="dynload_aix.o"
9365 fi
9366 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009367 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009368 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9369 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009370 *)
9371 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9372 # out any dynamic loading
9373 if test "$ac_cv_func_dlopen" = yes
9374 then DYNLOADFILE="dynload_shlib.o"
9375 else DYNLOADFILE="dynload_stub.o"
9376 fi
9377 ;;
9378 esac
9379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9381$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009382if test "$DYNLOADFILE" != "dynload_stub.o"
9383then
Martin v. Löwis11437992002-04-12 09:54:03 +00009384
Matthias Kloseb9621712010-04-24 17:59:49 +00009385$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009386
9387fi
9388
Neil Schemenauer4e425612001-06-19 15:44:15 +00009389# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9390
Michael W. Hudson54241132001-12-07 15:38:26 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9393$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009394if test -z "$MACHDEP_OBJS"
9395then
Jack Jansene578a632001-08-15 01:27:14 +00009396 MACHDEP_OBJS=$extra_machdep_objs
9397else
9398 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9401$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009402
Guido van Rossum627b2d71993-12-24 10:39:16 +00009403# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009404for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009405 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009406 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009407 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009408 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009409 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009410 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009411 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9412 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009413 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009414 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009415 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009416 truncate uname unsetenv utimes waitpid wait3 wait4 \
9417 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009418do :
9419 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9420ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009421if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009423#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009426fi
9427done
9428
Michael W. Hudson54241132001-12-07 15:38:26 +00009429
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009430# For some functions, having a definition is not sufficient, since
9431# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9433$as_echo_n "checking for chroot... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009436#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009437int
9438main ()
9439{
9440void *x=chroot
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9458$as_echo_n "checking for link... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009461#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009462int
9463main ()
9464{
9465void *x=link
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009479
9480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9483$as_echo_n "checking for symlink... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009485/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009486#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009487int
9488main ()
9489{
9490void *x=symlink
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009504
9505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9508$as_echo_n "checking for fchdir... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009511#include <unistd.h>
9512int
9513main ()
9514{
9515void *x=fchdir
9516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009523
Matthias Kloseb159a552010-04-25 21:00:44 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009529
9530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9533$as_echo_n "checking for fsync... " >&6; }
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009536#include <unistd.h>
9537int
9538main ()
9539{
9540void *x=fsync
9541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009548
Matthias Kloseb159a552010-04-25 21:00:44 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009551else
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009554
9555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9558$as_echo_n "checking for fdatasync... " >&6; }
9559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009561#include <unistd.h>
9562int
9563main ()
9564{
9565void *x=fdatasync
9566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009573
Matthias Kloseb159a552010-04-25 21:00:44 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009576else
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9578$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009579
9580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9583$as_echo_n "checking for epoll... " >&6; }
9584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009585/* end confdefs.h. */
9586#include <sys/epoll.h>
9587int
9588main ()
9589{
9590void *x=epoll_create
9591 ;
9592 return 0;
9593}
9594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009598
Matthias Kloseb159a552010-04-25 21:00:44 +00009599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009600$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601else
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009604
9605fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9608$as_echo_n "checking for kqueue... " >&6; }
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009610/* end confdefs.h. */
9611
9612#include <sys/types.h>
9613#include <sys/event.h>
9614
9615int
9616main ()
9617{
9618int x=kqueue()
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009632
9633fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009635# On some systems (eg. FreeBSD 5), we would find a definition of the
9636# functions ctermid_r, setgroups in the library, but no prototype
9637# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9638# address to avoid compiler warnings and potential miscompilations
9639# because of the missing prototypes.
9640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9642$as_echo_n "checking for ctermid_r... " >&6; }
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009645
Martin v. Löwisd5843682002-11-21 20:41:28 +00009646#include <stdio.h>
9647
Martin v. Löwisd5843682002-11-21 20:41:28 +00009648int
9649main ()
9650{
9651void* p = ctermid_r
9652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009657
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009659
Matthias Kloseb159a552010-04-25 21:00:44 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009661$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009662else
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009665
9666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9668
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9670$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009671if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672 $as_echo_n "(cached) " >&6
9673else
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009675/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009677int
9678main ()
9679{
9680void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009681
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009687 ac_cv_flock_decl=yes
9688else
9689 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009690
9691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009693
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009694fi
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9696$as_echo "$ac_cv_flock_decl" >&6; }
9697if test "x${ac_cv_flock_decl}" = xyes; then
9698 for ac_func in flock
9699do :
9700 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009701if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009702 cat >>confdefs.h <<_ACEOF
9703#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009704_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009705
Antoine Pitroua3000072010-09-07 14:52:42 +00009706else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009708$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009709if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009710 $as_echo_n "(cached) " >&6
9711else
9712 ac_check_lib_save_LIBS=$LIBS
9713LIBS="-lbsd $LIBS"
9714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9715/* end confdefs.h. */
9716
9717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
9720#ifdef __cplusplus
9721extern "C"
9722#endif
9723char flock ();
9724int
9725main ()
9726{
9727return flock ();
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732if ac_fn_c_try_link "$LINENO"; then :
9733 ac_cv_lib_bsd_flock=yes
9734else
9735 ac_cv_lib_bsd_flock=no
9736fi
9737rm -f core conftest.err conftest.$ac_objext \
9738 conftest$ac_exeext conftest.$ac_ext
9739LIBS=$ac_check_lib_save_LIBS
9740fi
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9742$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009743if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009744 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009745
9746
9747$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9748
9749
9750fi
9751
9752
9753fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009754done
9755
Antoine Pitroua3000072010-09-07 14:52:42 +00009756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757
Matthias Kloseb9621712010-04-24 17:59:49 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9759$as_echo_n "checking for getpagesize... " >&6; }
9760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009763#include <unistd.h>
9764
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009765int
9766main ()
9767{
9768void* p = getpagesize
9769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009774
Matthias Kloseb9621712010-04-24 17:59:49 +00009775$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009776
Matthias Kloseb159a552010-04-25 21:00:44 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009778$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009782
9783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786for ac_prog in true
9787do
9788 # Extract the first word of "$ac_prog", so it can be a program name with args.
9789set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9791$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009792if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009794else
9795 if test -n "$TRUE"; then
9796 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9797else
9798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9799for as_dir in $PATH
9800do
9801 IFS=$as_save_IFS
9802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804 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 +00009805 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 $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 +00009807 break 2
9808 fi
9809done
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009812
9813fi
9814fi
9815TRUE=$ac_cv_prog_TRUE
9816if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9818$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009819else
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009822fi
9823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009825 test -n "$TRUE" && break
9826done
9827test -n "$TRUE" || TRUE="/bin/true"
9828
9829
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9831$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009832if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834else
9835 ac_check_lib_save_LIBS=$LIBS
9836LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840/* Override any GCC internal prototype to avoid an error.
9841 Use char because int might match the return type of a GCC
9842 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843#ifdef __cplusplus
9844extern "C"
9845#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009846char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847int
9848main ()
9849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851 ;
9852 return 0;
9853}
9854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009856 ac_cv_lib_c_inet_aton=yes
9857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860rm -f core conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009862LIBS=$ac_check_lib_save_LIBS
9863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9865$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009866if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009867 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009868else
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9870$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009871if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009873else
9874 ac_check_lib_save_LIBS=$LIBS
9875LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879/* Override any GCC internal prototype to avoid an error.
9880 Use char because int might match the return type of a GCC
9881 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882#ifdef __cplusplus
9883extern "C"
9884#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009885char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886int
9887main ()
9888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890 ;
9891 return 0;
9892}
9893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009895 ac_cv_lib_resolv_inet_aton=yes
9896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009899rm -f core conftest.err conftest.$ac_objext \
9900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901LIBS=$ac_check_lib_save_LIBS
9902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9904$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009905if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009906 cat >>confdefs.h <<_ACEOF
9907#define HAVE_LIBRESOLV 1
9908_ACEOF
9909
9910 LIBS="-lresolv $LIBS"
9911
9912fi
9913
9914
9915fi
9916
9917
Christian Heimesd0764e22007-12-04 15:00:33 +00009918# On Tru64, chflags seems to be present, but calling it will
9919# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9921$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009922if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009926 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009927else
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009929/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009930
Christian Heimesd0764e22007-12-04 15:00:33 +00009931#include <sys/stat.h>
9932#include <unistd.h>
9933int main(int argc, char*argv[])
9934{
9935 if(chflags(argv[0], 0) != 0)
9936 return 1;
9937 return 0;
9938}
Ned Deily3eb67d52011-06-28 00:00:28 -07009939
Christian Heimesd0764e22007-12-04 15:00:33 +00009940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009942 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009943else
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009948fi
9949
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009950
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9953$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009954if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009956if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009957 ac_cv_have_chflags="yes"
9958else
9959 ac_cv_have_chflags="no"
9960fi
9961
9962fi
9963if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009964
Matthias Kloseb9621712010-04-24 17:59:49 +00009965$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009966
9967fi
9968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9970$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009971if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009975 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009976else
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009978/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009979
Christian Heimesd0764e22007-12-04 15:00:33 +00009980#include <sys/stat.h>
9981#include <unistd.h>
9982int main(int argc, char*argv[])
9983{
9984 if(lchflags(argv[0], 0) != 0)
9985 return 1;
9986 return 0;
9987}
Ned Deily3eb67d52011-06-28 00:00:28 -07009988
Christian Heimesd0764e22007-12-04 15:00:33 +00009989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009990if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009991 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009992else
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009997fi
9998
9999
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10002$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010003if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010005if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010006 ac_cv_have_lchflags="yes"
10007else
10008 ac_cv_have_lchflags="no"
10009fi
10010
10011fi
10012if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010015
10016fi
10017
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010018case $ac_sys_system/$ac_sys_release in
10019Darwin/*)
10020 _CUR_CFLAGS="${CFLAGS}"
10021 _CUR_LDFLAGS="${LDFLAGS}"
10022 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10023 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10024 ;;
10025esac
10026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10028$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010029if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010031else
10032 ac_check_lib_save_LIBS=$LIBS
10033LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010035/* end confdefs.h. */
10036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037/* Override any GCC internal prototype to avoid an error.
10038 Use char because int might match the return type of a GCC
10039 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010040#ifdef __cplusplus
10041extern "C"
10042#endif
10043char inflateCopy ();
10044int
10045main ()
10046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010048 ;
10049 return 0;
10050}
10051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010053 ac_cv_lib_z_inflateCopy=yes
10054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057rm -f core conftest.err conftest.$ac_objext \
10058 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010059LIBS=$ac_check_lib_save_LIBS
10060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10062$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010063if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010064
Matthias Kloseb9621712010-04-24 17:59:49 +000010065$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010066
10067fi
10068
10069
10070case $ac_sys_system/$ac_sys_release in
10071Darwin/*)
10072 CFLAGS="${_CUR_CFLAGS}"
10073 LDFLAGS="${_CUR_LDFLAGS}"
10074 ;;
10075esac
10076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10078$as_echo_n "checking for hstrerror... " >&6; }
10079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010080/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010081
Martin v. Löwise9416172003-05-03 10:12:45 +000010082#include <netdb.h>
10083
Martin v. Löwise9416172003-05-03 10:12:45 +000010084int
10085main ()
10086{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010087void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010088 ;
10089 return 0;
10090}
10091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010092if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010093
Matthias Kloseb9621712010-04-24 17:59:49 +000010094$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010095
Matthias Kloseb159a552010-04-25 21:00:44 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010097$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010098else
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010101
10102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103rm -f core conftest.err conftest.$ac_objext \
10104 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10107$as_echo_n "checking for inet_aton... " >&6; }
10108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010110
Martin v. Löwis86d66262006-02-17 08:40:11 +000010111#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010112#include <sys/socket.h>
10113#include <netinet/in.h>
10114#include <arpa/inet.h>
10115
Martin v. Löwise9416172003-05-03 10:12:45 +000010116int
10117main ()
10118{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010119void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010120 ;
10121 return 0;
10122}
10123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010125
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010127
Matthias Kloseb159a552010-04-25 21:00:44 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010129$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010133
10134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135rm -f core conftest.err conftest.$ac_objext \
10136 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10139$as_echo_n "checking for inet_pton... " >&6; }
10140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010142
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010143#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010144#include <sys/socket.h>
10145#include <netinet/in.h>
10146#include <arpa/inet.h>
10147
Martin v. Löwise9416172003-05-03 10:12:45 +000010148int
10149main ()
10150{
10151void* p = inet_pton
10152 ;
10153 return 0;
10154}
10155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010157
Matthias Kloseb9621712010-04-24 17:59:49 +000010158$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010159
Matthias Kloseb159a552010-04-25 21:00:44 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010161$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010162else
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010165
10166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010168
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010169# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10171$as_echo_n "checking for setgroups... " >&6; }
10172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010174
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010175#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010176#ifdef HAVE_GRP_H
10177#include <grp.h>
10178#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010179
Martin v. Löwisd5843682002-11-21 20:41:28 +000010180int
10181main ()
10182{
10183void* p = setgroups
10184 ;
10185 return 0;
10186}
10187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010189
Matthias Kloseb9621712010-04-24 17:59:49 +000010190$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010191
Matthias Kloseb159a552010-04-25 21:00:44 +000010192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010193$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010194else
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10196$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010197
10198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010201# check for openpty and forkpty
10202
10203for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010204do :
10205 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010206if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010208#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010210
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10213$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010214if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010215 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216else
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222/* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225#ifdef __cplusplus
10226extern "C"
10227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010228char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010229int
10230main ()
10231{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ;
10234 return 0;
10235}
10236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242rm -f core conftest.err conftest.$ac_objext \
10243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010244LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10247$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010248if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010250 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010251else
Matthias Kloseb9621712010-04-24 17:59:49 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10253$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010254if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010256else
10257 ac_check_lib_save_LIBS=$LIBS
10258LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260/* end confdefs.h. */
10261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262/* Override any GCC internal prototype to avoid an error.
10263 Use char because int might match the return type of a GCC
10264 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265#ifdef __cplusplus
10266extern "C"
10267#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268char openpty ();
10269int
10270main ()
10271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273 ;
10274 return 0;
10275}
10276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010278 ac_cv_lib_bsd_openpty=yes
10279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010282rm -f core conftest.err conftest.$ac_objext \
10283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284LIBS=$ac_check_lib_save_LIBS
10285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10287$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010288if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010290 LIBS="$LIBS -lbsd"
10291fi
10292
10293
10294fi
10295
Fred Drake8cef4cf2000-06-28 16:40:38 +000010296
10297fi
10298done
10299
10300for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010301do :
10302 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010303if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010306_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010307
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308else
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10310$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010311if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010313else
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010315LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319/* Override any GCC internal prototype to avoid an error.
10320 Use char because int might match the return type of a GCC
10321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322#ifdef __cplusplus
10323extern "C"
10324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010325char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326int
10327main ()
10328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ;
10331 return 0;
10332}
10333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010336else
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339rm -f core conftest.err conftest.$ac_objext \
10340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010341LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10344$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010345if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010347 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348else
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10350$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010351if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010353else
10354 ac_check_lib_save_LIBS=$LIBS
10355LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357/* end confdefs.h. */
10358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010362#ifdef __cplusplus
10363extern "C"
10364#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010365char forkpty ();
10366int
10367main ()
10368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010370 ;
10371 return 0;
10372}
10373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010375 ac_cv_lib_bsd_forkpty=yes
10376else
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010381LIBS=$ac_check_lib_save_LIBS
10382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10384$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010385if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010387 LIBS="$LIBS -lbsd"
10388fi
10389
10390
10391fi
10392
Fred Drake8cef4cf2000-06-28 16:40:38 +000010393
10394fi
10395done
10396
Jack Jansendd19cf82001-12-06 22:36:17 +000010397
Christian Heimesb186d002008-03-18 15:15:01 +000010398# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010399for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010400do :
10401 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010402if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010404#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010405_ACEOF
10406
10407fi
10408done
10409
10410
Michael W. Hudson54241132001-12-07 15:38:26 +000010411# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010412for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010413do :
10414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10415ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010416if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010418#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010419_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010421fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010422done
10423
Michael W. Hudson54241132001-12-07 15:38:26 +000010424
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010425ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10426if test "x$ac_cv_func_dup2" = xyes; then :
10427 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010428
Martin v. Löwis1142de32002-03-29 16:28:31 +000010429else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010431 *" dup2.$ac_objext "* ) ;;
10432 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010434esac
10435
Martin v. Löwis1142de32002-03-29 16:28:31 +000010436fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010437
10438ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10439if test "x$ac_cv_func_getcwd" = xyes; then :
10440 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10441
10442else
10443 case " $LIBOBJS " in
10444 *" getcwd.$ac_objext "* ) ;;
10445 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10446 ;;
10447esac
10448
10449fi
10450
10451ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10452if test "x$ac_cv_func_strdup" = xyes; then :
10453 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10454
10455else
10456 case " $LIBOBJS " in
10457 *" strdup.$ac_objext "* ) ;;
10458 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10459 ;;
10460esac
10461
10462fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010463
10464
10465for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010466do :
10467 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010468if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010473/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010474#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010475int
10476main ()
10477{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010478getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010479 ;
10480 return 0;
10481}
10482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010484
Matthias Kloseb9621712010-04-24 17:59:49 +000010485$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010486
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010489
Guido van Rossum627b2d71993-12-24 10:39:16 +000010490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010491done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010492
Jack Jansen150753c2003-03-29 22:07:47 +000010493for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010494do :
10495 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010496if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010497 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010498#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010502#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010503int
10504main ()
10505{
10506setpgrp(0,0);
10507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010514
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010517
10518fi
10519done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010520
Thomas Wouters3a584202000-08-05 23:28:51 +000010521for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010522do :
10523 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010524if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010531int
10532main ()
10533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_compile "$LINENO"; then :
10540
Guido van Rossum627b2d71993-12-24 10:39:16 +000010541else
Skip Montanaro6dead952003-09-25 14:50:04 +000010542
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010544
Martin v. Löwis11437992002-04-12 09:54:03 +000010545
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010549fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010550done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551
Michael W. Hudson54241132001-12-07 15:38:26 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10554$as_echo_n "checking for major... " >&6; }
10555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010557
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010558#if defined(MAJOR_IN_MKDEV)
10559#include <sys/mkdev.h>
10560#elif defined(MAJOR_IN_SYSMACROS)
10561#include <sys/sysmacros.h>
10562#else
10563#include <sys/types.h>
10564#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010565
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010566int
10567main ()
10568{
10569
10570 makedev(major(0),minor(0));
10571
10572 ;
10573 return 0;
10574}
10575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010577
10578
Matthias Kloseb9621712010-04-24 17:59:49 +000010579$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10582$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010583
10584else
Skip Montanaro6dead952003-09-25 14:50:04 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010588
10589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010590rm -f core conftest.err conftest.$ac_objext \
10591 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010592
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010593# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010594# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10596$as_echo_n "checking for getaddrinfo... " >&6; }
10597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010598/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010599
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010600#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010601#include <sys/socket.h>
10602#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010603#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010604
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010608getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010614 have_getaddrinfo=yes
10615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10621$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010622if test $have_getaddrinfo = yes
10623then
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10625$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010626 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010628else
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010630 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010634
10635#include <sys/types.h>
10636#include <netdb.h>
10637#include <string.h>
10638#include <sys/socket.h>
10639#include <netinet/in.h>
10640
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010641int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010642{
10643 int passive, gaierr, inet4 = 0, inet6 = 0;
10644 struct addrinfo hints, *ai, *aitop;
10645 char straddr[INET6_ADDRSTRLEN], strport[16];
10646
10647 for (passive = 0; passive <= 1; passive++) {
10648 memset(&hints, 0, sizeof(hints));
10649 hints.ai_family = AF_UNSPEC;
10650 hints.ai_flags = passive ? AI_PASSIVE : 0;
10651 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010652 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010653 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10654 (void)gai_strerror(gaierr);
10655 goto bad;
10656 }
10657 for (ai = aitop; ai; ai = ai->ai_next) {
10658 if (ai->ai_addr == NULL ||
10659 ai->ai_addrlen == 0 ||
10660 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10661 straddr, sizeof(straddr), strport, sizeof(strport),
10662 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10663 goto bad;
10664 }
10665 switch (ai->ai_family) {
10666 case AF_INET:
10667 if (strcmp(strport, "54321") != 0) {
10668 goto bad;
10669 }
10670 if (passive) {
10671 if (strcmp(straddr, "0.0.0.0") != 0) {
10672 goto bad;
10673 }
10674 } else {
10675 if (strcmp(straddr, "127.0.0.1") != 0) {
10676 goto bad;
10677 }
10678 }
10679 inet4++;
10680 break;
10681 case AF_INET6:
10682 if (strcmp(strport, "54321") != 0) {
10683 goto bad;
10684 }
10685 if (passive) {
10686 if (strcmp(straddr, "::") != 0) {
10687 goto bad;
10688 }
10689 } else {
10690 if (strcmp(straddr, "::1") != 0) {
10691 goto bad;
10692 }
10693 }
10694 inet6++;
10695 break;
10696 case AF_UNSPEC:
10697 goto bad;
10698 break;
10699 default:
10700 /* another family support? */
10701 break;
10702 }
10703 }
10704 }
10705
10706 if (!(inet4 == 0 || inet4 == 2))
10707 goto bad;
10708 if (!(inet6 == 0 || inet6 == 2))
10709 goto bad;
10710
10711 if (aitop)
10712 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010713 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010714
10715 bad:
10716 if (aitop)
10717 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010718 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010719}
10720
Martin v. Löwis11437992002-04-12 09:54:03 +000010721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010723 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010731fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010732
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10736$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10737
Mark Dickinson2df5d282009-12-31 21:22:50 +000010738if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010739then
10740 if test $ipv6 = yes
10741 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010742 echo 'Fatal: You must get working getaddrinfo() function.'
10743 echo ' or you can specify "--disable-ipv6"'.
10744 exit 1
10745 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010749
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010750fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010751
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010752for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010753do :
10754 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010755if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010759
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010760fi
10761done
10762
Michael W. Hudson54241132001-12-07 15:38:26 +000010763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10766$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010767if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010772#include <sys/types.h>
10773#include <sys/time.h>
10774#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010775
Martin v. Löwis11437992002-04-12 09:54:03 +000010776int
10777main ()
10778{
10779if ((struct tm *) 0)
10780return 0;
10781 ;
10782 return 0;
10783}
10784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010785if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010786 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010787else
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10793$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010794if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010797
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10801$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010802if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804else
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807#include <sys/types.h>
10808#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010809
Martin v. Löwis11437992002-04-12 09:54:03 +000010810int
10811main ()
10812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813struct tm tm;
10814 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010816 ;
10817 return 0;
10818}
10819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010821 ac_cv_struct_tm=time.h
10822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10828$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010829if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010832
10833fi
10834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835ac_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 +000010836#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010839if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010840
10841cat >>confdefs.h <<_ACEOF
10842#define HAVE_STRUCT_TM_TM_ZONE 1
10843_ACEOF
10844
10845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010846fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010847
Martin v. Löwis11437992002-04-12 09:54:03 +000010848if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851
10852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10854"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010855if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857else
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859fi
10860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863_ACEOF
10864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10866$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010867if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869else
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010871/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010872#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873#if !HAVE_DECL_TZNAME
10874extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Martin v. Löwis11437992002-04-12 09:54:03 +000010877int
10878main ()
10879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 ;
10882 return 0;
10883}
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010886 ac_cv_var_tzname=yes
10887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890rm -f core conftest.err conftest.$ac_objext \
10891 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10894$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010895 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010899 fi
10900fi
10901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010903if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
10905cat >>confdefs.h <<_ACEOF
10906#define HAVE_STRUCT_STAT_ST_RDEV 1
10907_ACEOF
10908
10909
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010910fi
10911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010913if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010914
Martin v. Löwis11437992002-04-12 09:54:03 +000010915cat >>confdefs.h <<_ACEOF
10916#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10917_ACEOF
10918
10919
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010920fi
10921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010923if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010924
10925cat >>confdefs.h <<_ACEOF
10926#define HAVE_STRUCT_STAT_ST_FLAGS 1
10927_ACEOF
10928
10929
10930fi
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010933if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010934
10935cat >>confdefs.h <<_ACEOF
10936#define HAVE_STRUCT_STAT_ST_GEN 1
10937_ACEOF
10938
10939
10940fi
10941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010943if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010944
10945cat >>confdefs.h <<_ACEOF
10946#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10947_ACEOF
10948
10949
10950fi
10951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010953if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010954
Martin v. Löwis11437992002-04-12 09:54:03 +000010955cat >>confdefs.h <<_ACEOF
10956#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10957_ACEOF
10958
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010961
10962else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010964 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10966 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010967esac
10968
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010969fi
10970
Michael W. Hudson54241132001-12-07 15:38:26 +000010971
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10974$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010975if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977else
Matthias Kloseb159a552010-04-25 21:00:44 +000010978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010981#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010982int
10983main ()
10984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991 ac_cv_header_time_altzone=yes
10992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997fi
10998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11000$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011001if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004
11005fi
11006
Guido van Rossumda88dad1995-01-26 00:46:29 +000011007was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11009$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011011/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011012
11013#include <sys/types.h>
11014#include <sys/select.h>
11015#include <sys/time.h>
11016
Martin v. Löwis11437992002-04-12 09:54:03 +000011017int
11018main ()
11019{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020;
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
11027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011030 was_it_defined=yes
11031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11035$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11038$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011039if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011041else
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011044#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011045int
11046main ()
11047{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011048struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011054 ac_cv_struct_addrinfo=yes
11055else
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11059fi
11060
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11062$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011063if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011066
11067fi
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11070$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011071if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011073else
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011075/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011076
11077# include <sys/types.h>
11078# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
11081{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011082struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 ;
11084 return 0;
11085}
11086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011088 ac_cv_struct_sockaddr_storage=yes
11089else
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11093fi
11094
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11096$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011097if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011098
Matthias Kloseb9621712010-04-24 17:59:49 +000011099$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011100
11101fi
11102
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011104
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11106$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011107if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011109else
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011112$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011113int
11114main ()
11115{
11116static int test_array [1 - 2 * !(((char) -1) < 0)];
11117test_array [0] = 0
11118
11119 ;
11120 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011121}
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011123if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011124 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011125else
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11131$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011132if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134
11135fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011136
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11138$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011139if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011141else
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011144
Martin v. Löwis11437992002-04-12 09:54:03 +000011145int
11146main ()
11147{
11148/* FIXME: Include the comments suggested by Paul. */
11149#ifndef __cplusplus
11150 /* Ultrix mips cc rejects this. */
11151 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154 char const *const *pcpcc;
11155 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 /* NEC SVR4.0.2 mips cc rejects this. */
11157 struct point {int x, y;};
11158 static struct point const zero = {0,0};
11159 /* AIX XL C 1.02.0.0 rejects this.
11160 It does not let you subtract one const X* pointer from another in
11161 an arm of an if-expression whose if-part is not a constant
11162 expression */
11163 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166 ++pcpcc;
11167 ppc = (char**) pcpcc;
11168 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 { /* SCO 3.2v4 cc rejects this. */
11170 char *t;
11171 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 }
11176 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11177 int x[] = {25, 17};
11178 const int *foo = &x[0];
11179 ++foo;
11180 }
11181 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11182 typedef const int *iptr;
11183 iptr p = 0;
11184 ++p;
11185 }
11186 { /* AIX XL C 1.02.0.0 rejects this saying
11187 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11188 struct s { int j; const int *ap[3]; };
11189 struct s *b; b->j = 5;
11190 }
11191 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11192 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011196#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011197
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ;
11199 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200}
Martin v. Löwis11437992002-04-12 09:54:03 +000011201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203 ac_cv_c_const=yes
11204else
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11210$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011211if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011214
11215fi
11216
Michael W. Hudson54241132001-12-07 15:38:26 +000011217
Guido van Rossumda88dad1995-01-26 00:46:29 +000011218works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11220$as_echo_n "checking for working volatile... " >&6; }
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011223
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011233 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011234else
Skip Montanaro6dead952003-09-25 14:50:04 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011238
Guido van Rossum627b2d71993-12-24 10:39:16 +000011239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11242$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011243
Guido van Rossumda88dad1995-01-26 00:46:29 +000011244works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11246$as_echo_n "checking for working signed char... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250int
11251main ()
11252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011259 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011260else
Skip Montanaro6dead952003-09-25 14:50:04 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011263
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011264
Guido van Rossum7f43da71994-08-01 12:15:30 +000011265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11268$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011269
Guido van Rossumda88dad1995-01-26 00:46:29 +000011270have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11272$as_echo_n "checking for prototypes... " >&6; }
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011275int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011276int
11277main ()
11278{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011279return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011287
Matthias Kloseb159a552010-04-25 21:00:44 +000011288 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11292$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011293
Guido van Rossumda88dad1995-01-26 00:46:29 +000011294works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11296$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011299
11300#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011301int foo(int x, ...) {
11302 va_list va;
11303 va_start(va, x);
11304 va_arg(va, int);
11305 va_arg(va, char *);
11306 va_arg(va, double);
11307 return 0;
11308}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310int
11311main ()
11312{
Guido van Rossum90eea071996-08-30 20:58:57 +000011313return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011319
11320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011322
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011323 works=yes
11324
Guido van Rossum627b2d71993-12-24 10:39:16 +000011325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11328$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011329
Martin v. Löwisd6320502004-08-12 13:45:08 +000011330# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11332$as_echo_n "checking for socketpair... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011334/* end confdefs.h. */
11335
11336#include <sys/types.h>
11337#include <sys/socket.h>
11338
11339int
11340main ()
11341{
11342void *x=socketpair
11343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011350
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011359
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011360# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11362$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011365#include <sys/types.h>
11366#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011367int
11368main ()
11369{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011370struct sockaddr x;
11371x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 ;
11373 return 0;
11374}
11375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011376if ac_fn_c_try_compile "$LINENO"; then :
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11378$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011381
11382else
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011385
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011388
Guido van Rossumda88dad1995-01-26 00:46:29 +000011389va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11391$as_echo_n "checking whether va_list is an array... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011394
11395#ifdef HAVE_STDARG_PROTOTYPES
11396#include <stdarg.h>
11397#else
11398#include <varargs.h>
11399#endif
11400
Martin v. Löwis11437992002-04-12 09:54:03 +000011401int
11402main ()
11403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011404va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
11410
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011411else
Skip Montanaro6dead952003-09-25 14:50:04 +000011412
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Guido van Rossumda88dad1995-01-26 00:46:29 +000011416 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11421$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011424
11425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011427if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11432$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011433 OLD_CFLAGS=$CFLAGS
11434 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011437
11438# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Martin v. Löwis11437992002-04-12 09:54:03 +000011440int
11441main ()
11442{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443
11444 char *name;
11445 struct hostent *he, *res;
11446 char buffer[2048];
11447 int buflen = 2048;
11448 int h_errnop;
11449
11450 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
11452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011459
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11464$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011466else
Skip Montanaro6dead952003-09-25 14:50:04 +000011467
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11471$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011475# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477int
11478main ()
11479{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011480
11481 char *name;
11482 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011483 char buffer[2048];
11484 int buflen = 2048;
11485 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011486
Matthias Kloseb159a552010-04-25 21:00:44 +000011487 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
11489 ;
11490 return 0;
11491}
11492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011496
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
Matthias Kloseb159a552010-04-25 21:00:44 +000011498$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011499
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11501$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503else
Skip Montanaro6dead952003-09-25 14:50:04 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11506$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11508$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11510/* end confdefs.h. */
11511
11512# include <netdb.h>
11513
11514int
11515main ()
11516{
11517
11518 char *name;
11519 struct hostent *he;
11520 struct hostent_data data;
11521
11522 (void) gethostbyname_r(name, he, &data);
11523
11524 ;
11525 return 0;
11526}
11527_ACEOF
11528if ac_fn_c_try_compile "$LINENO"; then :
11529
11530 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11531
11532
11533$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11534
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11536$as_echo "yes" >&6; }
11537
11538else
11539
11540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011542
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011551 CFLAGS=$OLD_CFLAGS
11552
11553else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011554
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 for ac_func in gethostbyname
11556do :
11557 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011558if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011561_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011563fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011564done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011565
Michael W. Hudson54241132001-12-07 15:38:26 +000011566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011567fi
11568
Michael W. Hudson54241132001-12-07 15:38:26 +000011569
11570
11571
11572
11573
11574
Guido van Rossum627b2d71993-12-24 10:39:16 +000011575# checks for system services
11576# (none yet)
11577
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011578# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011579ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011580if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011581
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011582else
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11584$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011585if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011587else
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011589LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593/* Override any GCC internal prototype to avoid an error.
11594 Use char because int might match the return type of a GCC
11595 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011596#ifdef __cplusplus
11597extern "C"
11598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011599char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011600int
11601main ()
11602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011613rm -f core conftest.err conftest.$ac_objext \
11614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011615LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11618$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011619if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 cat >>confdefs.h <<_ACEOF
11621#define HAVE_LIBIEEE 1
11622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011623
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011624 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011625
Guido van Rossum627b2d71993-12-24 10:39:16 +000011626fi
11627
Michael W. Hudson54241132001-12-07 15:38:26 +000011628
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011629fi
11630
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossum7f253911997-05-09 02:42:48 +000011632# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11634$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011637if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011639if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011640then
11641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11645$as_echo "yes" >&6; }
11646else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011648fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652fi
11653
Guido van Rossum7f253911997-05-09 02:42:48 +000011654
Guido van Rossum7f43da71994-08-01 12:15:30 +000011655# check for --with-libm=...
11656
Guido van Rossum563e7081996-09-10 18:20:48 +000011657case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011658Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011659*) LIBM=-lm
11660esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11662$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011665if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011667if test "$withval" = no
11668then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11670$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011671elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011672then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11674$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011675else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011676fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11679$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680fi
11681
Guido van Rossum7f43da71994-08-01 12:15:30 +000011682
11683# check for --with-libc=...
11684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11686$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011689if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011691if test "$withval" = no
11692then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11694$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011695elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011696then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11698$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011699else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011700fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11703$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011704fi
11705
Guido van Rossum7f43da71994-08-01 12:15:30 +000011706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707# **************************************************
11708# * Check for various properties of floating point *
11709# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11712$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011713if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715else
11716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718 ac_cv_little_endian_double=no
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721/* end confdefs.h. */
11722
11723#include <string.h>
11724int main() {
11725 double x = 9006104071832581.0;
11726 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11727 return 0;
11728 else
11729 return 1;
11730}
11731
11732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011733if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734 ac_cv_little_endian_double=yes
11735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740fi
11741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011742fi
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11745$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746if test "$ac_cv_little_endian_double" = yes
11747then
11748
Matthias Kloseb9621712010-04-24 17:59:49 +000011749$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750
11751fi
11752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11754$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011755if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757else
11758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011760 ac_cv_big_endian_double=no
11761else
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011763/* end confdefs.h. */
11764
11765#include <string.h>
11766int main() {
11767 double x = 9006104071832581.0;
11768 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11769 return 0;
11770 else
11771 return 1;
11772}
11773
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776 ac_cv_big_endian_double=yes
11777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782fi
11783
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011784fi
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11787$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788if test "$ac_cv_big_endian_double" = yes
11789then
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792
11793fi
11794
11795# Some ARM platforms use a mixed-endian representation for doubles.
11796# While Python doesn't currently have full support for these platforms
11797# (see e.g., issue 1762561), we can at least make sure that float <-> string
11798# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11800$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011801if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803else
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011806 ac_cv_mixed_endian_double=no
11807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809/* end confdefs.h. */
11810
11811#include <string.h>
11812int main() {
11813 double x = 9006104071832581.0;
11814 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11815 return 0;
11816 else
11817 return 1;
11818}
11819
11820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011822 ac_cv_mixed_endian_double=yes
11823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011828fi
11829
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011830fi
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11833$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834if test "$ac_cv_mixed_endian_double" = yes
11835then
11836
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838
11839fi
11840
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011841# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011842# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011843# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011844# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011845# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011846# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011847
11848# This inline assembler syntax may also work for suncc and icc,
11849# so we try it on all platforms.
11850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11852$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011854/* end confdefs.h. */
11855
11856int
11857main ()
11858{
11859
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011860 unsigned short cw;
11861 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11862 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011863
11864 ;
11865 return 0;
11866}
11867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011869 have_gcc_asm_for_x87=yes
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011872fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11875$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011876if test "$have_gcc_asm_for_x87" = yes
11877then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011883# Detect whether system arithmetic is subject to x87-style double
11884# rounding issues. The result of this test has little meaning on non
11885# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11886# mode is round-to-nearest and double rounding issues are present, and
11887# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11889$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011890# $BASECFLAGS may affect the result
11891ac_save_cc="$CC"
11892CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011894 ac_cv_x87_double_rounding=no
11895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011897/* end confdefs.h. */
11898
11899#include <stdlib.h>
11900#include <math.h>
11901int main() {
11902 volatile double x, y, z;
11903 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11904 x = 0.99999999999999989; /* 1-2**-53 */
11905 y = 1./x;
11906 if (y != 1.)
11907 exit(0);
11908 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11909 x = 1e16;
11910 y = 2.99999;
11911 z = x + y;
11912 if (z != 1e16+4.)
11913 exit(0);
11914 /* both tests show evidence of double rounding */
11915 exit(1);
11916}
11917
11918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011920 ac_cv_x87_double_rounding=no
11921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926fi
11927
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011928CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11930$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011931if test "$ac_cv_x87_double_rounding" = yes
11932then
11933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935
11936fi
11937
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011938# ************************************
11939# * Check for mathematical functions *
11940# ************************************
11941
11942LIBS_SAVE=$LIBS
11943LIBS="$LIBS $LIBM"
11944
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011945for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11946do :
11947 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11948ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011949if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011950 cat >>confdefs.h <<_ACEOF
11951#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11952_ACEOF
11953
11954fi
11955done
11956
11957for ac_func in hypot lgamma log1p round tgamma
11958do :
11959 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11960ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011961if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011962 cat >>confdefs.h <<_ACEOF
11963#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11964_ACEOF
11965
11966fi
11967done
11968
11969ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11970"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011971if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011972 ac_have_decl=1
11973else
11974 ac_have_decl=0
11975fi
11976
11977cat >>confdefs.h <<_ACEOF
11978#define HAVE_DECL_ISINF $ac_have_decl
11979_ACEOF
11980ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11981"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011982if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011983 ac_have_decl=1
11984else
11985 ac_have_decl=0
11986fi
11987
11988cat >>confdefs.h <<_ACEOF
11989#define HAVE_DECL_ISNAN $ac_have_decl
11990_ACEOF
11991ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11992"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011993if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011994 ac_have_decl=1
11995else
11996 ac_have_decl=0
11997fi
11998
11999cat >>confdefs.h <<_ACEOF
12000#define HAVE_DECL_ISFINITE $ac_have_decl
12001_ACEOF
12002
12003
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012004# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12005# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12007$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012008if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012010else
12011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012013 ac_cv_tanh_preserves_zero_sign=no
12014else
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012016/* end confdefs.h. */
12017
12018#include <math.h>
12019#include <stdlib.h>
12020int main() {
12021 /* return 0 if either negative zeros don't exist
12022 on this platform or if negative zeros exist
12023 and tanh(-0.) == -0. */
12024 if (atan2(0., -1.) == atan2(-0., -1.) ||
12025 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12026 else exit(1);
12027}
12028
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012031 ac_cv_tanh_preserves_zero_sign=yes
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012037fi
12038
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012039fi
12040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12042$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012043if test "$ac_cv_tanh_preserves_zero_sign" = yes
12044then
12045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012047
12048fi
12049
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012050if test "$ac_cv_func_log1p" = yes
12051then
12052 # On some versions of AIX, log1p(-0.) returns 0. instead of
12053 # -0. See issue #9920.
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12055$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012056 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012057 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012058else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012059
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012060 if test "$cross_compiling" = yes; then :
12061 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012062else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12064/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012065
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012066 #include <math.h>
12067 #include <stdlib.h>
12068 int main() {
12069 /* Fail if the signs of log1p(-0.) and -0. can be
12070 distinguished. */
12071 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12072 return 0;
12073 else
12074 return 1;
12075 }
12076
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012077_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012078if ac_fn_c_try_run "$LINENO"; then :
12079 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012080else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012081 ac_cv_log1p_drops_zero_sign=yes
12082fi
12083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12084 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012085fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012086
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012087fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012088
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12090$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12091fi
12092if test "$ac_cv_log1p_drops_zero_sign" = yes
12093then
12094
12095$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12096
12097fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012098
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012099LIBS=$LIBS_SAVE
12100
Mark Dickinsona614f042009-11-28 12:48:43 +000012101# For multiprocessing module, check that sem_open
12102# actually works. For FreeBSD versions <= 7.2,
12103# the kernel module that provides POSIX semaphores
12104# isn't loaded by default, so an attempt to call
12105# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12107$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012108if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012112 ac_cv_posix_semaphores_enabled=yes
12113else
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012115/* end confdefs.h. */
12116
12117#include <unistd.h>
12118#include <fcntl.h>
12119#include <stdio.h>
12120#include <semaphore.h>
12121#include <sys/stat.h>
12122
12123int main(void) {
12124 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12125 if (a == SEM_FAILED) {
12126 perror("sem_open");
12127 return 1;
12128 }
12129 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012130 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012131 return 0;
12132}
12133
12134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012136 ac_cv_posix_semaphores_enabled=yes
12137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012142fi
12143
12144
Mark Dickinsona614f042009-11-28 12:48:43 +000012145fi
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12148$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012149if test $ac_cv_posix_semaphores_enabled = no
12150then
12151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012153
12154fi
12155
Mark Dickinson10683072009-04-18 21:18:19 +000012156# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12158$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012159if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012163 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012166/* end confdefs.h. */
12167
12168#include <unistd.h>
12169#include <fcntl.h>
12170#include <stdio.h>
12171#include <semaphore.h>
12172#include <sys/stat.h>
12173
12174int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012175 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012176 int count;
12177 int res;
12178 if(a==SEM_FAILED){
12179 perror("sem_open");
12180 return 1;
12181
12182 }
12183 res = sem_getvalue(a, &count);
12184 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012185 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012186 return res==-1 ? 1 : 0;
12187}
12188
Mark Dickinson10683072009-04-18 21:18:19 +000012189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012190if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012191 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012197fi
12198
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012199
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012200fi
12201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12203$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012204if test $ac_cv_broken_sem_getvalue = yes
12205then
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012208
12209fi
12210
Mark Dickinsonbd792642009-03-18 20:06:12 +000012211# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12213$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012214# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012215if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012216 enableval=$enable_big_digits; case $enable_big_digits in
12217yes)
12218 enable_big_digits=30 ;;
12219no)
12220 enable_big_digits=15 ;;
1222115|30)
12222 ;;
12223*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012224 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 +000012225esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12227$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012228
12229cat >>confdefs.h <<_ACEOF
12230#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12231_ACEOF
12232
12233
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12236$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012237fi
12238
12239
Guido van Rossumef2255b2000-03-10 22:30:29 +000012240# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012241ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012242if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012246
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012247 wchar_h="yes"
12248
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249else
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012251
12252fi
12253
Michael W. Hudson54241132001-12-07 15:38:26 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256# determine wchar_t size
12257if test "$wchar_h" = yes
12258then
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12262# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12264$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012265if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012267else
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12269"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 if test "$ac_cv_type_wchar_t" = yes; then
12273 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012275as_fn_error 77 "cannot compute sizeof (wchar_t)
12276See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277 else
12278 ac_cv_sizeof_wchar_t=0
12279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12284$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285
12286
12287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012289#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012290_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012291
Michael W. Hudson54241132001-12-07 15:38:26 +000012292
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012293fi
12294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12296$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012297have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012300
12301#include <tcl.h>
12302#if TCL_UTF_MAX != 6
12303# error "NOT UCS4_TCL"
12304#endif
12305int
12306main ()
12307{
12308
12309 ;
12310 return 0;
12311}
12312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012314
12315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012317
12318 have_ucs4_tcl=yes
12319
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12323$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012324
Skip Montanaro6dead952003-09-25 14:50:04 +000012325# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012326if test "$wchar_h" = yes
12327then
12328 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12330$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012331 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012333else
12334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012336 ac_cv_wchar_t_signed=yes
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012339/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012340
12341 #include <wchar.h>
12342 int main()
12343 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012344 /* Success: exit code 0 */
12345 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012346 }
12347
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012350 ac_cv_wchar_t_signed=yes
12351else
Matthias Kloseb9621712010-04-24 17:59:49 +000012352 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012356fi
12357
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012358fi
12359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12361$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362fi
12363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12365$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012366
12367# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012369 withval=$with_wide_unicode;
12370if test "$withval" != no
12371then unicode_size="4"
12372else unicode_size="2"
12373fi
12374
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012375else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376
Georg Brandl52d168a2008-01-07 18:10:24 +000012377case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012378 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012379 *) unicode_size="2" ;;
12380esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012381
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012382fi
12383
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012384
12385
Georg Brandl52d168a2008-01-07 18:10:24 +000012386case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012387 4)
12388 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12389
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012390 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012391 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012393 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012394esac
12395
Michael W. Hudson54241132001-12-07 15:38:26 +000012396
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Georg Brandl52d168a2008-01-07 18:10:24 +000012398# wchar_t is only usable if it maps to an unsigned type
12399if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012400 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012401then
12402 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012407
Georg Brandl52d168a2008-01-07 18:10:24 +000012408elif test "$ac_cv_sizeof_short" = "$unicode_size"
12409then
12410 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012412
Georg Brandl52d168a2008-01-07 18:10:24 +000012413elif test "$ac_cv_sizeof_long" = "$unicode_size"
12414then
12415 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012417
Georg Brandl52d168a2008-01-07 18:10:24 +000012418else
12419 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12422$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012423
12424# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12426$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012427if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 ac_cv_c_bigendian=unknown
12431 # See if we're dealing with a universal compiler.
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433/* end confdefs.h. */
12434#ifndef __APPLE_CC__
12435 not a universal capable compiler
12436 #endif
12437 typedef int dummy;
12438
Skip Montanaro6dead952003-09-25 14:50:04 +000012439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_compile "$LINENO"; then :
12441
12442 # Check for potential -arch flags. It is not universal unless
12443 # there are at least two -arch flags with different values.
12444 ac_arch=
12445 ac_prev=
12446 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12447 if test -n "$ac_prev"; then
12448 case $ac_word in
12449 i?86 | x86_64 | ppc | ppc64)
12450 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12451 ac_arch=$ac_word
12452 else
12453 ac_cv_c_bigendian=universal
12454 break
12455 fi
12456 ;;
12457 esac
12458 ac_prev=
12459 elif test "x$ac_word" = "x-arch"; then
12460 ac_prev=arch
12461 fi
12462 done
12463fi
12464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12465 if test $ac_cv_c_bigendian = unknown; then
12466 # See if sys/param.h defines the BYTE_ORDER macro.
12467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Matthias Kloseb9621712010-04-24 17:59:49 +000012475#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12476 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12477 && LITTLE_ENDIAN)
12478 bogus endian macros
12479 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
12481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012486 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012489#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492int
12493main ()
12494{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 not big endian
12497 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
12499 ;
12500 return 0;
12501}
12502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012504 ac_cv_c_bigendian=yes
12505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012509fi
12510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12511 fi
12512 if test $ac_cv_c_bigendian = unknown; then
12513 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012515/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012516#include <limits.h>
12517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518int
12519main ()
12520{
Matthias Kloseb9621712010-04-24 17:59:49 +000012521#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12522 bogus endian macros
12523 #endif
12524
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_compile "$LINENO"; then :
12530 # It does; now see whether it defined to _BIG_ENDIAN or not.
12531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12532/* end confdefs.h. */
12533#include <limits.h>
12534
12535int
12536main ()
12537{
12538#ifndef _BIG_ENDIAN
12539 not big endian
12540 #endif
12541
12542 ;
12543 return 0;
12544}
12545_ACEOF
12546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012548else
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12552fi
12553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12554 fi
12555 if test $ac_cv_c_bigendian = unknown; then
12556 # Compile a test program.
12557 if test "$cross_compiling" = yes; then :
12558 # Try to guess by grepping values from an object file.
12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560/* end confdefs.h. */
12561short int ascii_mm[] =
12562 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12563 short int ascii_ii[] =
12564 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12565 int use_ascii (int i) {
12566 return ascii_mm[i] + ascii_ii[i];
12567 }
12568 short int ebcdic_ii[] =
12569 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12570 short int ebcdic_mm[] =
12571 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12572 int use_ebcdic (int i) {
12573 return ebcdic_mm[i] + ebcdic_ii[i];
12574 }
12575 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577int
12578main ()
12579{
12580return use_ascii (foo) == use_ebcdic (foo);
12581 ;
12582 return 0;
12583}
12584_ACEOF
12585if ac_fn_c_try_compile "$LINENO"; then :
12586 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12587 ac_cv_c_bigendian=yes
12588 fi
12589 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12590 if test "$ac_cv_c_bigendian" = unknown; then
12591 ac_cv_c_bigendian=no
12592 else
12593 # finding both strings is unlikely to happen, but who knows?
12594 ac_cv_c_bigendian=unknown
12595 fi
12596 fi
12597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012603int
12604main ()
12605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 /* Are we little or big endian? From Harbison&Steele. */
12608 union
12609 {
12610 long int l;
12611 char c[sizeof (long int)];
12612 } u;
12613 u.l = 1;
12614 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615
12616 ;
12617 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012618}
Martin v. Löwis11437992002-04-12 09:54:03 +000012619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012620if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012621 ac_cv_c_bigendian=no
12622else
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12632$as_echo "$ac_cv_c_bigendian" >&6; }
12633 case $ac_cv_c_bigendian in #(
12634 yes)
12635 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12636;; #(
12637 no)
12638 ;; #(
12639 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012642
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 ;; #(
12644 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012645 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012646 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012650# ABI version string for Python extension modules. This appears between the
12651# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12652# from the following attributes which affect the ABI of this Python build (in
12653# this order):
12654#
12655# * The Python implementation (always 'cpython-' for us)
12656# * The major and minor version numbers
12657# * --with-pydebug (adds a 'd')
12658# * --with-pymalloc (adds a 'm')
12659# * --with-wide-unicode (adds a 'u')
12660#
12661# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012662# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12663# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012664
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12666$as_echo_n "checking ABIFLAGS... " >&6; }
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12668$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12670$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012671SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12673$as_echo "$SOABI" >&6; }
12674
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12676$as_echo_n "checking LDVERSION... " >&6; }
12677LDVERSION='$(VERSION)$(ABIFLAGS)'
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12679$as_echo "$LDVERSION" >&6; }
12680
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012681# SO is the extension of shared libraries `(including the dot!)
12682# -- usually .so, .sl on HP-UX, .dll on Cygwin
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12684$as_echo_n "checking SO... " >&6; }
12685if test -z "$SO"
12686then
12687 case $ac_sys_system in
12688 hp*|HP*)
12689 case `uname -m` in
12690 ia64) SO=.so;;
12691 *) SO=.sl;;
12692 esac
12693 ;;
12694 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012695 Linux*|GNU*)
12696 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012697 *) SO=.so;;
12698 esac
12699else
12700 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012701 echo
12702 echo '====================================================================='
12703 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012704 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012705 echo '+ Do you really mean to change the extension for shared libraries? +'
12706 echo '+ Continuing in 10 seconds to let you to ponder. +'
12707 echo '+ +'
12708 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012709 sleep 10
12710fi
12711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12712$as_echo "$SO" >&6; }
12713
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012714# Check whether right shifting a negative integer extends the sign bit
12715# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12717$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012718if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012720else
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012723 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012727
12728int main()
12729{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012730 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012731}
12732
Martin v. Löwis11437992002-04-12 09:54:03 +000012733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012735 ac_cv_rshift_extends_sign=yes
12736else
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012741fi
12742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743fi
12744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12746$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012747if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012748then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012751
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752fi
12753
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012754# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12756$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012757if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012759else
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012762/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012763#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012764int
12765main ()
12766{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012767
12768 FILE *f = fopen("/dev/null", "r");
12769 flockfile(f);
12770 getc_unlocked(f);
12771 funlockfile(f);
12772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ;
12774 return 0;
12775}
12776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012778 ac_cv_have_getc_unlocked=yes
12779else
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 ac_cv_have_getc_unlocked=no
12781fi
12782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12787$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012788if test "$ac_cv_have_getc_unlocked" = yes
12789then
Martin v. Löwis11437992002-04-12 09:54:03 +000012790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012792
12793fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012794
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012795# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012796# save the value of LIBS so we don't actually link Python with readline
12797LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798
Gregory P. Smith18820942008-09-07 06:24:49 +000012799# On some systems we need to link readline to a termcap compatible
12800# library. NOTE: Keep the precedence of listed libraries synchronised
12801# with setup.py.
12802py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12804$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012805for py_libtermcap in "" ncursesw ncurses curses termcap; do
12806 if test -z "$py_libtermcap"; then
12807 READLINE_LIBS="-lreadline"
12808 else
12809 READLINE_LIBS="-lreadline -l$py_libtermcap"
12810 fi
12811 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012813/* end confdefs.h. */
12814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815/* Override any GCC internal prototype to avoid an error.
12816 Use char because int might match the return type of a GCC
12817 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012818#ifdef __cplusplus
12819extern "C"
12820#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012821char readline ();
12822int
12823main ()
12824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012826 ;
12827 return 0;
12828}
12829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012831 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012833rm -f core conftest.err conftest.$ac_objext \
12834 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012835 if test $py_cv_lib_readline = yes; then
12836 break
12837 fi
12838done
12839# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12840#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012841if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12843$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012844else
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12846$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012849
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012850fi
12851
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12854$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012855if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012857else
12858 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012859LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861/* end confdefs.h. */
12862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863/* Override any GCC internal prototype to avoid an error.
12864 Use char because int might match the return type of a GCC
12865 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012866#ifdef __cplusplus
12867extern "C"
12868#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012869char rl_callback_handler_install ();
12870int
12871main ()
12872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012874 ;
12875 return 0;
12876}
12877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012879 ac_cv_lib_readline_rl_callback_handler_install=yes
12880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883rm -f core conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012885LIBS=$ac_check_lib_save_LIBS
12886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12888$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012889if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012892
12893fi
12894
12895
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012896# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012899#include <readline/readline.h>
12900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012901if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012902 have_readline=yes
12903else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012904 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012905
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012906fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012907rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012908if test $have_readline = yes
12909then
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012911/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012912#include <readline/readline.h>
12913
12914_ACEOF
12915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012919
12920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012921rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012924/* end confdefs.h. */
12925#include <readline/readline.h>
12926
12927_ACEOF
12928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012932
12933fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012934rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012935
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012936fi
12937
Martin v. Löwis0daad592001-09-30 21:09:59 +000012938# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12940$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012941if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012943else
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012945LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949/* Override any GCC internal prototype to avoid an error.
12950 Use char because int might match the return type of a GCC
12951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012952#ifdef __cplusplus
12953extern "C"
12954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012955char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012956int
12957main ()
12958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ;
12961 return 0;
12962}
12963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012969rm -f core conftest.err conftest.$ac_objext \
12970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012971LIBS=$ac_check_lib_save_LIBS
12972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12974$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012975if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012978
Martin v. Löwis0daad592001-09-30 21:09:59 +000012979fi
12980
Michael W. Hudson54241132001-12-07 15:38:26 +000012981
Thomas Wouters89d996e2007-09-08 17:39:28 +000012982# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12984$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012985if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012987else
12988 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012989LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012991/* end confdefs.h. */
12992
12993/* Override any GCC internal prototype to avoid an error.
12994 Use char because int might match the return type of a GCC
12995 builtin and then its argument prototype would still apply. */
12996#ifdef __cplusplus
12997extern "C"
12998#endif
12999char rl_completion_display_matches_hook ();
13000int
13001main ()
13002{
13003return rl_completion_display_matches_hook ();
13004 ;
13005 return 0;
13006}
13007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013008if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013009 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013013rm -f core conftest.err conftest.$ac_objext \
13014 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013015LIBS=$ac_check_lib_save_LIBS
13016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13018$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013019if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013022
13023fi
13024
13025
Martin v. Löwis0daad592001-09-30 21:09:59 +000013026# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13028$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013029if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013031else
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013033LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037/* Override any GCC internal prototype to avoid an error.
13038 Use char because int might match the return type of a GCC
13039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013040#ifdef __cplusplus
13041extern "C"
13042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013043char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013044int
13045main ()
13046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 ;
13049 return 0;
13050}
13051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013059LIBS=$ac_check_lib_save_LIBS
13060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13062$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013063if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013066
Guido van Rossum353ae582001-07-10 16:45:32 +000013067fi
13068
Jack Jansendd19cf82001-12-06 22:36:17 +000013069
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013070# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013072/* end confdefs.h. */
13073#include <readline/readline.h>
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076 have_readline=yes
13077else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013078 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013079
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013080fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013081rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013082if test $have_readline = yes
13083then
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013085/* end confdefs.h. */
13086#include <readline/readline.h>
13087
13088_ACEOF
13089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013093
13094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013095rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013096
13097fi
13098
Martin v. Löwis82bca632006-02-10 20:49:30 +000013099# End of readline checks: restore LIBS
13100LIBS=$LIBS_no_readline
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13103$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013104if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013106else
Martin v. Löwis11437992002-04-12 09:54:03 +000013107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013109 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013110else
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013112/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013113
13114int main()
13115{
13116 int val1 = nice(1);
13117 if (val1 != -1 && val1 == nice(2))
13118 exit(0);
13119 exit(1);
13120}
13121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013124 ac_cv_broken_nice=yes
13125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013130fi
13131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13135$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013136if test "$ac_cv_broken_nice" = yes
13137then
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013140
13141fi
13142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13144$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013145if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013149 ac_cv_broken_poll=no
13150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013152/* end confdefs.h. */
13153
13154#include <poll.h>
13155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156int main()
13157{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013158 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160
13161 close (42);
13162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013164 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013165 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013168 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169 return 1;
13170}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013171
13172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013174 ac_cv_broken_poll=yes
13175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13179 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013182fi
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13185$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013186if test "$ac_cv_broken_poll" = yes
13187then
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013190
13191fi
13192
Brett Cannon43802422005-02-10 20:48:03 +000013193# 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 +000013194# (which is not required by ISO C or UNIX spec) and/or if we support
13195# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013196ac_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 +000013197#include <$ac_cv_struct_tm>
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013200if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013201
13202cat >>confdefs.h <<_ACEOF
13203#define HAVE_STRUCT_TM_TM_ZONE 1
13204_ACEOF
13205
13206
13207fi
13208
13209if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013212
13213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13215"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013216if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218else
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013220fi
13221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224_ACEOF
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13227$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013228if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013232/* end confdefs.h. */
13233#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234#if !HAVE_DECL_TZNAME
13235extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013236#endif
13237
13238int
13239main ()
13240{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013242 ;
13243 return 0;
13244}
13245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013247 ac_cv_var_tzname=yes
13248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013251rm -f core conftest.err conftest.$ac_objext \
13252 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13255$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013256 if test $ac_cv_var_tzname = yes; then
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013259
13260 fi
13261fi
13262
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013263
Martin v. Löwis1d459062005-03-14 21:23:33 +000013264# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13266$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013267if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013269else
13270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013272 ac_cv_working_tzset=no
13273else
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013275/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013276
13277#include <stdlib.h>
13278#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013279#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013280
13281#if HAVE_TZNAME
13282extern char *tzname[];
13283#endif
13284
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013285int main()
13286{
Brett Cannon18367812003-09-19 00:59:16 +000013287 /* Note that we need to ensure that not only does tzset(3)
13288 do 'something' with localtime, but it works as documented
13289 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013290 This includes making sure that tzname is set properly if
13291 tm->tm_zone does not exist since it is the alternative way
13292 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013293
13294 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013295 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013296 */
13297
Martin v. Löwis1d459062005-03-14 21:23:33 +000013298 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013299 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13300
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013301 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013302 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013303 if (localtime(&groundhogday)->tm_hour != 0)
13304 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013305#if HAVE_TZNAME
13306 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13307 if (strcmp(tzname[0], "UTC") ||
13308 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13309 exit(1);
13310#endif
Brett Cannon18367812003-09-19 00:59:16 +000013311
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013312 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013313 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013314 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013315 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013316#if HAVE_TZNAME
13317 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13318 exit(1);
13319#endif
Brett Cannon18367812003-09-19 00:59:16 +000013320
13321 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13322 tzset();
13323 if (localtime(&groundhogday)->tm_hour != 11)
13324 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013325#if HAVE_TZNAME
13326 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13327 exit(1);
13328#endif
13329
13330#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013331 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13332 exit(1);
13333 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13334 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013335#endif
Brett Cannon18367812003-09-19 00:59:16 +000013336
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013337 exit(0);
13338}
13339
13340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013342 ac_cv_working_tzset=yes
13343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013348fi
13349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350fi
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13353$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013354if test "$ac_cv_working_tzset" = yes
13355then
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013358
13359fi
13360
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013361# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13363$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013364if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013368/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013369#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013370int
13371main ()
13372{
13373
13374struct stat st;
13375st.st_mtim.tv_nsec = 1;
13376
13377 ;
13378 return 0;
13379}
13380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013382 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13387fi
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13390$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013391if test "$ac_cv_stat_tv_nsec" = yes
13392then
13393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013395
13396fi
13397
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013398# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13400$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013401if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013405/* end confdefs.h. */
13406#include <sys/stat.h>
13407int
13408main ()
13409{
13410
13411struct stat st;
13412st.st_mtimespec.tv_nsec = 1;
13413
13414 ;
13415 return 0;
13416}
13417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013419 ac_cv_stat_tv_nsec2=yes
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13427$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013428if test "$ac_cv_stat_tv_nsec2" = yes
13429then
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013432
13433fi
13434
Jack Jansen666b1e72001-10-31 12:11:48 +000013435# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13437$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013438if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013442/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013443#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013444int
13445main ()
13446{
Jack Jansen666b1e72001-10-31 12:11:48 +000013447
13448 int rtn;
13449 rtn = mvwdelch(0,0,0);
13450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013456 ac_cv_mvwdelch_is_expression=yes
13457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13461fi
13462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13464$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013465
13466if test "$ac_cv_mvwdelch_is_expression" = yes
13467then
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013470
13471fi
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13474$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013475if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013480#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Jack Jansen666b1e72001-10-31 12:11:48 +000013484
13485 WINDOW *w;
13486 w->_flags = 0;
13487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013493 ac_cv_window_has_flags=yes
13494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13501$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013502
Jack Jansen666b1e72001-10-31 12:11:48 +000013503
13504if test "$ac_cv_window_has_flags" = yes
13505then
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013508
13509fi
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13512$as_echo_n "checking for is_term_resized... " >&6; }
13513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013514/* end confdefs.h. */
13515#include <curses.h>
13516int
13517main ()
13518{
13519void *x=is_term_resized
13520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013527
Matthias Kloseb159a552010-04-25 21:00:44 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013529$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013530else
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13532$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013533
13534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13538$as_echo_n "checking for resize_term... " >&6; }
13539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013540/* end confdefs.h. */
13541#include <curses.h>
13542int
13543main ()
13544{
13545void *x=resize_term
13546 ;
13547 return 0;
13548}
13549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013550if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013553
Matthias Kloseb159a552010-04-25 21:00:44 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013555$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013559
13560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13564$as_echo_n "checking for resizeterm... " >&6; }
13565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013566/* end confdefs.h. */
13567#include <curses.h>
13568int
13569main ()
13570{
13571void *x=resizeterm
13572 ;
13573 return 0;
13574}
13575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013576if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013579
Matthias Kloseb159a552010-04-25 21:00:44 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013581$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013582else
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13584$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013585
13586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13590$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013591
13592if test -r /dev/ptmx
13593then
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13595$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013598
Thomas Wouters89f507f2006-12-13 04:49:30 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013602fi
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13605$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013606
13607if test -r /dev/ptc
13608then
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13610$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013613
Thomas Wouters89f507f2006-12-13 04:49:30 +000013614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13616$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013617fi
13618
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013619if test "$have_long_long" = yes
13620then
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13622$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013623 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013627 ac_cv_have_long_long_format=no
13628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013630/* end confdefs.h. */
13631
13632 #include <stdio.h>
13633 #include <stddef.h>
13634 #include <string.h>
13635
13636 #ifdef HAVE_SYS_TYPES_H
13637 #include <sys/types.h>
13638 #endif
13639
13640 int main()
13641 {
13642 char buffer[256];
13643
13644 if (sprintf(buffer, "%lld", (long long)123) < 0)
13645 return 1;
13646 if (strcmp(buffer, "123"))
13647 return 1;
13648
13649 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13650 return 1;
13651 if (strcmp(buffer, "-123"))
13652 return 1;
13653
13654 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13655 return 1;
13656 if (strcmp(buffer, "123"))
13657 return 1;
13658
13659 return 0;
13660 }
13661
13662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013664 ac_cv_have_long_long_format=yes
13665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013670fi
13671
13672
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013673fi
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13676$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013677fi
13678
Mark Dickinson89d7d412009-12-31 20:50:59 +000013679if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013680then
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013683
13684fi
13685
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013686if test $ac_sys_system = Darwin
13687then
13688 LIBS="$LIBS -framework CoreFoundation"
13689fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13692$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013693if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013697 ac_cv_have_size_t_format="cross -- assuming yes"
13698
Thomas Wouters477c8d52006-05-27 19:21:47 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013701/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013702
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703#include <stdio.h>
13704#include <stddef.h>
13705#include <string.h>
13706
Christian Heimes2c181612007-12-17 20:04:13 +000013707#ifdef HAVE_SYS_TYPES_H
13708#include <sys/types.h>
13709#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013710
13711#ifdef HAVE_SSIZE_T
13712typedef ssize_t Py_ssize_t;
13713#elif SIZEOF_VOID_P == SIZEOF_LONG
13714typedef long Py_ssize_t;
13715#else
13716typedef int Py_ssize_t;
13717#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013718
Christian Heimes2c181612007-12-17 20:04:13 +000013719int main()
13720{
13721 char buffer[256];
13722
Thomas Wouters477c8d52006-05-27 19:21:47 +000013723 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13724 return 1;
13725
Thomas Wouters89f507f2006-12-13 04:49:30 +000013726 if (strcmp(buffer, "123"))
13727 return 1;
13728
13729 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13730 return 1;
13731
13732 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013733 return 1;
13734
13735 return 0;
13736}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737
Thomas Wouters477c8d52006-05-27 19:21:47 +000013738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013746fi
13747
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13750$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013751if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013754
13755fi
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013758#ifdef HAVE_SYS_TYPES_H
13759#include <sys/types.h>
13760#endif
13761#ifdef HAVE_SYS_SOCKET_H
13762#include <sys/socket.h>
13763#endif
13764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013766if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013767
Martin v. Löwis11437992002-04-12 09:54:03 +000013768else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013771
13772fi
13773
Michael W. Hudson54241132001-12-07 15:38:26 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13776$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013777if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013779else
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013781 ac_cv_broken_mbstowcs=no
13782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013784/* end confdefs.h. */
13785
13786#include<stdlib.h>
13787int main() {
13788 size_t len = -1;
13789 const char *str = "text";
13790 len = mbstowcs(NULL, str, 0);
13791 return (len != 4);
13792}
13793
13794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013795if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013796 ac_cv_broken_mbstowcs=no
13797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013802fi
13803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804fi
13805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13807$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013808if test "$ac_cv_broken_mbstowcs" = yes
13809then
13810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013812
13813fi
13814
Antoine Pitrou042b1282010-08-13 21:15:58 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13816$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013817if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013818 $as_echo_n "(cached) " >&6
13819else
13820 if test "$cross_compiling" = yes; then :
13821 ac_cv_computed_gotos=no
13822else
13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824/* end confdefs.h. */
13825
13826int main(int argc, char **argv)
13827{
13828 static void *targets[1] = { &&LABEL1 };
13829 goto LABEL2;
13830LABEL1:
13831 return 0;
13832LABEL2:
13833 goto *targets[0];
13834 return 1;
13835}
13836
13837_ACEOF
13838if ac_fn_c_try_run "$LINENO"; then :
13839 ac_cv_computed_gotos=yes
13840else
13841 ac_cv_computed_gotos=no
13842fi
13843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13844 conftest.$ac_objext conftest.beam conftest.$ac_ext
13845fi
13846
13847fi
13848
13849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13850$as_echo "$ac_cv_computed_gotos" >&6; }
13851if test "$ac_cv_computed_gotos" = yes
13852then
13853
13854$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13855
13856fi
13857
Antoine Pitroub52ec782009-01-25 16:34:23 +000013858# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13860$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013861
13862# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013864 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013865if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013866then
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13871$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013872fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013873if test "$withval" = no
13874then
13875
13876$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13879$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013880fi
13881
Antoine Pitrou042b1282010-08-13 21:15:58 +000013882else
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13884$as_echo "no value specified" >&6; }
13885fi
13886
Antoine Pitroub52ec782009-01-25 16:34:23 +000013887
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013888case $ac_sys_system in
13889AIX*)
13890
13891$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13892 ;;
13893esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013894
Michael W. Hudson54241132001-12-07 15:38:26 +000013895
Jesus Cea6a792292010-05-03 21:18:48 +000013896case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013897 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 +000013898esac
13899
Gregory P. Smith138fa432010-12-13 08:00:52 +000013900ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013901if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013902
13903$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13904
13905fi
Jesus Cea6a792292010-05-03 21:18:48 +000013906
13907
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013908
13909
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013910for h in `(cd $srcdir;echo Python/thread_*.h)`
13911do
13912 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13913done
13914
Michael W. Hudson54241132001-12-07 15:38:26 +000013915
Neal Norwitzd24499d2005-12-18 21:36:39 +000013916SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13918$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013919for dir in $SRCDIRS; do
13920 if test ! -d $dir; then
13921 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013922 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013923done
Matthias Kloseb9621712010-04-24 17:59:49 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13925$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013926
Guido van Rossum627b2d71993-12-24 10:39:16 +000013927# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013928ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013929
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013930ac_config_files="$ac_config_files Modules/ld_so_aix"
13931
Martin v. Löwis11437992002-04-12 09:54:03 +000013932cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933# This file is a shell script that caches the results of configure
13934# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013935# scripts and configure runs, see configure's option --config-cache.
13936# It is not useful on other systems. If it contains results you don't
13937# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938#
Martin v. Löwis11437992002-04-12 09:54:03 +000013939# config.status only pays attention to the cache file if you give it
13940# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013941#
Skip Montanaro6dead952003-09-25 14:50:04 +000013942# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013943# loading this file, other *unset* `ac_cv_foo' will be assigned the
13944# following values.
13945
13946_ACEOF
13947
Guido van Rossumf78abae1997-01-21 22:02:36 +000013948# The following way of writing the cache mishandles newlines in values,
13949# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013951# Ultrix sh set writes to stderr and can't be redirected directly,
13952# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953(
13954 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13955 eval ac_val=\$$ac_var
13956 case $ac_val in #(
13957 *${as_nl}*)
13958 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13960$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 esac
13962 case $ac_var in #(
13963 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13965 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966 esac ;;
13967 esac
13968 done
13969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13972 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 # `set' does not quote correctly, so add quotes: double-quote
13974 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013976 "s/'/'\\\\''/g;
13977 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 *)
13980 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983 esac |
13984 sort
13985) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13991 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013992 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13993 :end' >>confcache
13994if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13995 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013996 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13998$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013999 if test ! -f "$cache_file" || test -h "$cache_file"; then
14000 cat confcache >"$cache_file"
14001 else
14002 case $cache_file in #(
14003 */* | ?:*)
14004 mv -f confcache "$cache_file"$$ &&
14005 mv -f "$cache_file"$$ "$cache_file" ;; #(
14006 *)
14007 mv -f confcache "$cache_file" ;;
14008 esac
14009 fi
14010 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014011 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14013$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014014 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014016rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018test "x$prefix" = xNONE && prefix=$ac_default_prefix
14019# Let make expand exec_prefix.
14020test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014021
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022DEFS=-DHAVE_CONFIG_H
14023
Skip Montanaro6dead952003-09-25 14:50:04 +000014024ac_libobjs=
14025ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014026U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014027for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14028 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14032 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14034 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014035done
14036LIBOBJS=$ac_libobjs
14037
14038LTLIBOBJS=$ac_ltlibobjs
14039
14040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014043: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014044ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014045ac_clean_files_save=$ac_clean_files
14046ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14048$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14049as_write_fail=0
14050cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014051#! $SHELL
14052# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014053# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014054# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014055# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056
Martin v. Löwis11437992002-04-12 09:54:03 +000014057debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014058ac_cs_recheck=false
14059ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061SHELL=\${CONFIG_SHELL-$SHELL}
14062export SHELL
14063_ASEOF
14064cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14065## -------------------- ##
14066## M4sh Initialization. ##
14067## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069# Be more Bourne compatible
14070DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 emulate sh
14073 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014075 # is contrary to our usage. Disable this feature.
14076 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 case `(set -o) 2>/dev/null` in #(
14080 *posix*) :
14081 set -o posix ;; #(
14082 *) :
14083 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014085fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014086
14087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088as_nl='
14089'
14090export as_nl
14091# Printing a long string crashes Solaris 7 /usr/bin/printf.
14092as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14093as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14094as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14095# Prefer a ksh shell builtin over an external printf program on Solaris,
14096# but without wasting forks for bash or zsh.
14097if test -z "$BASH_VERSION$ZSH_VERSION" \
14098 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14099 as_echo='print -r --'
14100 as_echo_n='print -rn --'
14101elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14102 as_echo='printf %s\n'
14103 as_echo_n='printf %s'
14104else
14105 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14106 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14107 as_echo_n='/usr/ucb/echo -n'
14108 else
14109 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14110 as_echo_n_body='eval
14111 arg=$1;
14112 case $arg in #(
14113 *"$as_nl"*)
14114 expr "X$arg" : "X\\(.*\\)$as_nl";
14115 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14116 esac;
14117 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14118 '
14119 export as_echo_n_body
14120 as_echo_n='sh -c $as_echo_n_body as_echo'
14121 fi
14122 export as_echo_body
14123 as_echo='sh -c $as_echo_body as_echo'
14124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
14126# The user is always right.
14127if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 PATH_SEPARATOR=:
14129 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14130 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14131 PATH_SEPARATOR=';'
14132 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135
14136# IFS
14137# We need space, tab and new line, in precisely that order. Quoting is
14138# there to prevent editors from complaining about space-tab.
14139# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14140# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141IFS=" "" $as_nl"
14142
14143# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014144as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014145case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146 *[\\/]* ) as_myself=$0 ;;
14147 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014148for as_dir in $PATH
14149do
14150 IFS=$as_save_IFS
14151 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14153 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 ;;
14157esac
14158# We did not find ourselves, most probably we were run as `sh COMMAND'
14159# in which case we are not to be found in the path.
14160if test "x$as_myself" = x; then
14161 as_myself=$0
14162fi
14163if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14165 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166fi
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168# Unset variables that we do not need and which cause bugs (e.g. in
14169# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14170# suppresses any "Segmentation fault" message there. '((' could
14171# trigger a bug in pdksh 5.2.14.
14172for as_var in BASH_ENV ENV MAIL MAILPATH
14173do eval test x\${$as_var+set} = xset \
14174 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175done
14176PS1='$ '
14177PS2='> '
14178PS4='+ '
14179
14180# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014181LC_ALL=C
14182export LC_ALL
14183LANGUAGE=C
14184export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186# CDPATH.
14187(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14188
14189
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014190# as_fn_error STATUS ERROR [LINENO LOG_FD]
14191# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014192# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14193# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014194# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014195as_fn_error ()
14196{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014197 as_status=$1; test $as_status -eq 0 && as_status=1
14198 if test "$4"; then
14199 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14200 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014202 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 as_fn_exit $as_status
14204} # as_fn_error
14205
14206
14207# as_fn_set_status STATUS
14208# -----------------------
14209# Set $? to STATUS, without forking.
14210as_fn_set_status ()
14211{
14212 return $1
14213} # as_fn_set_status
14214
14215# as_fn_exit STATUS
14216# -----------------
14217# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14218as_fn_exit ()
14219{
14220 set +e
14221 as_fn_set_status $1
14222 exit $1
14223} # as_fn_exit
14224
14225# as_fn_unset VAR
14226# ---------------
14227# Portably unset VAR.
14228as_fn_unset ()
14229{
14230 { eval $1=; unset $1;}
14231}
14232as_unset=as_fn_unset
14233# as_fn_append VAR VALUE
14234# ----------------------
14235# Append the text in VALUE to the end of the definition contained in VAR. Take
14236# advantage of any shell optimizations that allow amortized linear growth over
14237# repeated appends, instead of the typical quadratic growth present in naive
14238# implementations.
14239if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14240 eval 'as_fn_append ()
14241 {
14242 eval $1+=\$2
14243 }'
14244else
14245 as_fn_append ()
14246 {
14247 eval $1=\$$1\$2
14248 }
14249fi # as_fn_append
14250
14251# as_fn_arith ARG...
14252# ------------------
14253# Perform arithmetic evaluation on the ARGs, and store the result in the
14254# global $as_val. Take advantage of shells that can avoid forks. The arguments
14255# must be portable across $(()) and expr.
14256if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14257 eval 'as_fn_arith ()
14258 {
14259 as_val=$(( $* ))
14260 }'
14261else
14262 as_fn_arith ()
14263 {
14264 as_val=`expr "$@" || test $? -eq 1`
14265 }
14266fi # as_fn_arith
14267
14268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269if expr a : '\(a\)' >/dev/null 2>&1 &&
14270 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14271 as_expr=expr
14272else
14273 as_expr=false
14274fi
14275
14276if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14277 as_basename=basename
14278else
14279 as_basename=false
14280fi
14281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14283 as_dirname=dirname
14284else
14285 as_dirname=false
14286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288as_me=`$as_basename -- "$0" ||
14289$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14290 X"$0" : 'X\(//\)$' \| \
14291 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014292$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293 sed '/^.*\/\([^/][^/]*\)\/*$/{
14294 s//\1/
14295 q
14296 }
14297 /^X\/\(\/\/\)$/{
14298 s//\1/
14299 q
14300 }
14301 /^X\/\(\/\).*/{
14302 s//\1/
14303 q
14304 }
14305 s/.*/./; q'`
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307# Avoid depending upon Character Ranges.
14308as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14309as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14310as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14311as_cr_digits='0123456789'
14312as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313
14314ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014315case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 xy) ECHO_C='\c';;
14320 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14321 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 esac;;
14323*)
14324 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014326
Martin v. Löwis11437992002-04-12 09:54:03 +000014327rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328if test -d conf$$.dir; then
14329 rm -f conf$$.dir/conf$$.file
14330else
14331 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014334if (echo >conf$$.file) 2>/dev/null; then
14335 if ln -s conf$$.file conf$$ 2>/dev/null; then
14336 as_ln_s='ln -s'
14337 # ... but there are two gotchas:
14338 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14339 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14340 # In both cases, we have to default to `cp -p'.
14341 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14342 as_ln_s='cp -p'
14343 elif ln conf$$.file conf$$ 2>/dev/null; then
14344 as_ln_s=ln
14345 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014348else
14349 as_ln_s='cp -p'
14350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14352rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354
14355# as_fn_mkdir_p
14356# -------------
14357# Create "$as_dir" as a directory, including parents if necessary.
14358as_fn_mkdir_p ()
14359{
14360
14361 case $as_dir in #(
14362 -*) as_dir=./$as_dir;;
14363 esac
14364 test -d "$as_dir" || eval $as_mkdir_p || {
14365 as_dirs=
14366 while :; do
14367 case $as_dir in #(
14368 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14369 *) as_qdir=$as_dir;;
14370 esac
14371 as_dirs="'$as_qdir' $as_dirs"
14372 as_dir=`$as_dirname -- "$as_dir" ||
14373$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14374 X"$as_dir" : 'X\(//\)[^/]' \| \
14375 X"$as_dir" : 'X\(//\)$' \| \
14376 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14377$as_echo X"$as_dir" |
14378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14379 s//\1/
14380 q
14381 }
14382 /^X\(\/\/\)[^/].*/{
14383 s//\1/
14384 q
14385 }
14386 /^X\(\/\/\)$/{
14387 s//\1/
14388 q
14389 }
14390 /^X\(\/\).*/{
14391 s//\1/
14392 q
14393 }
14394 s/.*/./; q'`
14395 test -d "$as_dir" && break
14396 done
14397 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014398 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014399
14400
14401} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014402if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014404else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014405 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 as_mkdir_p=false
14407fi
14408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409if test -x / >/dev/null 2>&1; then
14410 as_test_x='test -x'
14411else
14412 if ls -dL / >/dev/null 2>&1; then
14413 as_ls_L_option=L
14414 else
14415 as_ls_L_option=
14416 fi
14417 as_test_x='
14418 eval sh -c '\''
14419 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 case $1 in #(
14423 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426 ???[sx]*):;;*)false;;esac;fi
14427 '\'' sh
14428 '
14429fi
14430as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014431
14432# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014433as_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 +000014434
14435# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014436as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014440## ----------------------------------- ##
14441## Main body of $CONFIG_STATUS script. ##
14442## ----------------------------------- ##
14443_ASEOF
14444test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14447# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014448# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449# values after options handling.
14450ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014451This file was extended by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014452generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454 CONFIG_FILES = $CONFIG_FILES
14455 CONFIG_HEADERS = $CONFIG_HEADERS
14456 CONFIG_LINKS = $CONFIG_LINKS
14457 CONFIG_COMMANDS = $CONFIG_COMMANDS
14458 $ $0 $@
14459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460on `(hostname || uname -n) 2>/dev/null | sed 1q`
14461"
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465case $ac_config_files in *"
14466"*) set x $ac_config_files; shift; ac_config_files=$*;;
14467esac
14468
14469case $ac_config_headers in *"
14470"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14471esac
14472
14473
14474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014475# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014476config_files="$ac_config_files"
14477config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014482ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014483\`$as_me' instantiates files and other configuration actions
14484from templates according to the current configuration. Unless the files
14485and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014488
14489 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 --config print configuration, then exit
14492 -q, --quiet, --silent
14493 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 -d, --debug don't remove temporary files
14495 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 --file=FILE[:TEMPLATE]
14497 instantiate the configuration file FILE
14498 --header=FILE[:TEMPLATE]
14499 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014500
14501Configuration files:
14502$config_files
14503
14504Configuration headers:
14505$config_headers
14506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14511ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014512ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014513python config.status 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014514configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014517Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014518This config.status script is free software; the Free Software Foundation
14519gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520
14521ac_pwd='$ac_pwd'
14522srcdir='$srcdir'
14523INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014524test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014525_ACEOF
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14528# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014529ac_need_defaults=:
14530while test $# != 0
14531do
14532 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014533 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14535 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014536 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014537 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014538 --*=)
14539 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14540 ac_optarg=
14541 ac_shift=:
14542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014544 ac_option=$1
14545 ac_optarg=$2
14546 ac_shift=shift
14547 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014548 esac
14549
Skip Montanaro6dead952003-09-25 14:50:04 +000014550 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014552 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14553 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 $as_echo "$ac_cs_version"; exit ;;
14556 --config | --confi | --conf | --con | --co | --c )
14557 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 debug=: ;;
14560 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014561 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 case $ac_optarg in
14563 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014564 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 esac
14566 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 ac_need_defaults=false;;
14568 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014569 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 case $ac_optarg in
14571 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14572 esac
14573 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575 --he | --h)
14576 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014577 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014578Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014581 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14582 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14583 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
14585 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014586 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014587Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
14592 esac
14593 shift
14594done
14595
Skip Montanaro6dead952003-09-25 14:50:04 +000014596ac_configure_extra_args=
14597
14598if $ac_cs_silent; then
14599 exec 6>/dev/null
14600 ac_configure_extra_args="$ac_configure_extra_args --silent"
14601fi
14602
14603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014605if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14607 shift
14608 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14609 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014612fi
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616exec 5>>config.log
14617{
14618 echo
14619 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14620## Running $as_me. ##
14621_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630
14631# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014632for ac_config_target in $ac_config_targets
14633do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634 case $ac_config_target in
14635 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14636 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14637 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014638 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14639 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14641 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014642 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014643 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014645 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 esac
14647done
14648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649
Martin v. Löwis11437992002-04-12 09:54:03 +000014650# If the user did not use the arguments to specify the items to instantiate,
14651# then the envvar interface is used. Set only those that are not.
14652# We use the long form for the default assignment because of an extremely
14653# bizarre bug on SunOS 4.1.3.
14654if $ac_need_defaults; then
14655 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14656 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14657fi
14658
Skip Montanaro6dead952003-09-25 14:50:04 +000014659# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014661# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662# Hook for its removal unless debugging.
14663# Note that there is a small window in which the directory will not be cleaned:
14664# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014665$debug ||
14666{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014667 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014669 : "${ac_tmp:=$tmp}"
14670 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014673}
Martin v. Löwis11437992002-04-12 09:54:03 +000014674# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014675
Martin v. Löwis11437992002-04-12 09:54:03 +000014676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014678 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014679} ||
14680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681 tmp=./conf$$-$RANDOM
14682 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014683} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14684ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686# Set up the scripts for CONFIG_FILES section.
14687# No need to generate them if there are no CONFIG_FILES.
14688# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691
14692ac_cr=`echo X | tr X '\015'`
14693# On cygwin, bash can eat \r inside `` if the user requested igncr.
14694# But we know of no other shell where ac_cr would be empty at this
14695# point, so we can use a bashism as a fallback.
14696if test "x$ac_cr" = x; then
14697 eval ac_cr=\$\'\\r\'
14698fi
14699ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14700if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014701 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014702else
14703 ac_cs_awk_cr=$ac_cr
14704fi
14705
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014706echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
14708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{
14711 echo "cat >conf$$subs.awk <<_ACEOF" &&
14712 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14713 echo "_ACEOF"
14714} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014715 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14716ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717ac_delim='%!_!# '
14718for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014720 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14723 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724 break
14725 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014726 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014727 else
14728 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730done
Matthias Kloseb9621712010-04-24 17:59:49 +000014731rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014734cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736sed -n '
14737h
14738s/^/S["/; s/!.*/"]=/
14739p
14740g
14741s/^[^!]*!//
14742:repl
14743t repl
14744s/'"$ac_delim"'$//
14745t delim
14746:nl
14747h
14748s/\(.\{148\}\)..*/\1/
14749t more1
14750s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14751p
14752n
14753b repl
14754:more1
14755s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14756p
14757g
14758s/.\{148\}//
14759t nl
14760:delim
14761h
14762s/\(.\{148\}\)..*/\1/
14763t more2
14764s/["\\]/\\&/g; s/^/"/; s/$/"/
14765p
14766b
14767:more2
14768s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14769p
14770g
14771s/.\{148\}//
14772t delim
14773' <conf$$subs.awk | sed '
14774/^[^""]/{
14775 N
14776 s/\n//
14777}
14778' >>$CONFIG_STATUS || ac_write_fail=1
14779rm -f conf$$subs.awk
14780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14781_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014782cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 for (key in S) S_is_set[key] = 1
14784 FS = ""
14785
14786}
14787{
14788 line = $ 0
14789 nfields = split(line, field, "@")
14790 substed = 0
14791 len = length(field[1])
14792 for (i = 2; i < nfields; i++) {
14793 key = field[i]
14794 keylen = length(key)
14795 if (S_is_set[key]) {
14796 value = S[key]
14797 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14798 len += length(value) + length(field[++i])
14799 substed = 1
14800 } else
14801 len += 1 + keylen
14802 }
14803
14804 print line
14805}
14806
14807_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14810if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14811 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14812else
14813 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014814fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14815 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014816_ACEOF
14817
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014818# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14819# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820# trailing colons and then remove the whole line if VPATH becomes empty
14821# (actually we leave an empty line to preserve line numbers).
14822if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014823 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14824h
14825s///
14826s/^/:/
14827s/[ ]*$/:/
14828s/:\$(srcdir):/:/g
14829s/:\${srcdir}:/:/g
14830s/:@srcdir@:/:/g
14831s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014833x
14834s/\(=[ ]*\).*/\1/
14835G
14836s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837s/^[^=]*=[ ]*$//
14838}'
14839fi
14840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014842fi # test -n "$CONFIG_FILES"
14843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844# Set up the scripts for CONFIG_HEADERS section.
14845# No need to generate them if there are no CONFIG_HEADERS.
14846# This happens for instance with `./config.status Makefile'.
14847if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014848cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014849BEGIN {
14850_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852# Transform confdefs.h into an awk script `defines.awk', embedded as
14853# here-document in config.status, that substitutes the proper values into
14854# config.h.in to produce config.h.
14855
14856# Create a delimiter string that does not exist in confdefs.h, to ease
14857# handling of long lines.
14858ac_delim='%!_!# '
14859for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014860 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14861 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 break
14863 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014864 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 else
14866 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14867 fi
14868done
14869
14870# For the awk script, D is an array of macro values keyed by name,
14871# likewise P contains macro parameters if any. Preserve backslash
14872# newline sequences.
14873
14874ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14875sed -n '
14876s/.\{148\}/&'"$ac_delim"'/g
14877t rset
14878:rset
14879s/^[ ]*#[ ]*define[ ][ ]*/ /
14880t def
14881d
14882:def
14883s/\\$//
14884t bsnl
14885s/["\\]/\\&/g
14886s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14887D["\1"]=" \3"/p
14888s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14889d
14890:bsnl
14891s/["\\]/\\&/g
14892s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14893D["\1"]=" \3\\\\\\n"\\/p
14894t cont
14895s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14896t cont
14897d
14898:cont
14899n
14900s/.\{148\}/&'"$ac_delim"'/g
14901t clear
14902:clear
14903s/\\$//
14904t bsnlc
14905s/["\\]/\\&/g; s/^/"/; s/$/"/p
14906d
14907:bsnlc
14908s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14909b cont
14910' <confdefs.h | sed '
14911s/'"$ac_delim"'/"\\\
14912"/g' >>$CONFIG_STATUS || ac_write_fail=1
14913
14914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14915 for (key in D) D_is_set[key] = 1
14916 FS = ""
14917}
14918/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14919 line = \$ 0
14920 split(line, arg, " ")
14921 if (arg[1] == "#") {
14922 defundef = arg[2]
14923 mac1 = arg[3]
14924 } else {
14925 defundef = substr(arg[1], 2)
14926 mac1 = arg[2]
14927 }
14928 split(mac1, mac2, "(") #)
14929 macro = mac2[1]
14930 prefix = substr(line, 1, index(line, defundef) - 1)
14931 if (D_is_set[macro]) {
14932 # Preserve the white space surrounding the "#".
14933 print prefix "define", macro P[macro] D[macro]
14934 next
14935 } else {
14936 # Replace #undef with comments. This is necessary, for example,
14937 # in the case of _POSIX_SOURCE, which is predefined and required
14938 # on some systems where configure will not decide to define it.
14939 if (defundef == "undef") {
14940 print "/*", prefix defundef, macro, "*/"
14941 next
14942 }
14943 }
14944}
14945{ print }
14946_ACAWK
14947_ACEOF
14948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014949 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014950fi # test -n "$CONFIG_HEADERS"
14951
14952
14953eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14954shift
14955for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956do
14957 case $ac_tag in
14958 :[FHLC]) ac_mode=$ac_tag; continue;;
14959 esac
14960 case $ac_mode$ac_tag in
14961 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014962 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963 :[FH]-) ac_tag=-:-;;
14964 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14965 esac
14966 ac_save_IFS=$IFS
14967 IFS=:
14968 set x $ac_tag
14969 IFS=$ac_save_IFS
14970 shift
14971 ac_file=$1
14972 shift
14973
14974 case $ac_mode in
14975 :L) ac_source=$1;;
14976 :[FH])
14977 ac_file_inputs=
14978 for ac_f
14979 do
14980 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014981 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 *) # Look for the file first in the build tree, then in the source tree
14983 # (if the path is not absolute). The absolute path cannot be DOS-style,
14984 # because $ac_f cannot contain `:'.
14985 test -f "$ac_f" ||
14986 case $ac_f in
14987 [\\/$]*) false;;
14988 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14989 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014990 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14993 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994 done
14995
14996 # Let's still pretend it is `configure' which instantiates (i.e., don't
14997 # use $as_me), people would be surprised to read:
14998 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 configure_input='Generated from '`
15000 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15001 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 if test x"$ac_file" != x-; then
15003 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15005$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 # Neutralize special characters interpreted by sed in replacement strings.
15008 case $configure_input in #(
15009 *\&* | *\|* | *\\* )
15010 ac_sed_conf_input=`$as_echo "$configure_input" |
15011 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15012 *) ac_sed_conf_input=$configure_input;;
15013 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014
15015 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015016 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15017 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 esac
15019 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 esac
15021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015023$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024 X"$ac_file" : 'X\(//\)[^/]' \| \
15025 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015027$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15029 s//\1/
15030 q
15031 }
15032 /^X\(\/\/\)[^/].*/{
15033 s//\1/
15034 q
15035 }
15036 /^X\(\/\/\)$/{
15037 s//\1/
15038 q
15039 }
15040 /^X\(\/\).*/{
15041 s//\1/
15042 q
15043 }
15044 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ac_builddir=.
15047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048case "$ac_dir" in
15049.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15050*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054 case $ac_top_builddir_sub in
15055 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15056 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15057 esac ;;
15058esac
15059ac_abs_top_builddir=$ac_pwd
15060ac_abs_builddir=$ac_pwd$ac_dir_suffix
15061# for backward compatibility:
15062ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015063
15064case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067 ac_top_srcdir=$ac_top_builddir_sub
15068 ac_abs_top_srcdir=$ac_pwd ;;
15069 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 ac_top_srcdir=$srcdir
15072 ac_abs_top_srcdir=$srcdir ;;
15073 *) # Relative name.
15074 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15075 ac_top_srcdir=$ac_top_build_prefix$srcdir
15076 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015077esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015079
Martin v. Löwis11437992002-04-12 09:54:03 +000015080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 case $ac_mode in
15082 :F)
15083 #
15084 # CONFIG_FILE
15085 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015086
15087 case $INSTALL in
15088 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015091_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094# If the template does not know about datarootdir, expand it.
15095# FIXME: This hack should be removed a few years after 2.60.
15096ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015097ac_sed_dataroot='
15098/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099 p
15100 q
15101}
15102/@datadir@/p
15103/@docdir@/p
15104/@infodir@/p
15105/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015106/@mandir@/p'
15107case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108*datarootdir*) ac_datarootdir_seen=yes;;
15109*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15111$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 ac_datarootdir_hack='
15115 s&@datadir@&$datadir&g
15116 s&@docdir@&$docdir&g
15117 s&@infodir@&$infodir&g
15118 s&@localedir@&$localedir&g
15119 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121esac
15122_ACEOF
15123
15124# Neutralize VPATH when `$srcdir' = `.'.
15125# Shell code in configure.ac might set extrasub.
15126# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15128ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015129$extrasub
15130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015132:t
15133/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015134s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015136s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137s&@srcdir@&$ac_srcdir&;t t
15138s&@abs_srcdir@&$ac_abs_srcdir&;t t
15139s&@top_srcdir@&$ac_top_srcdir&;t t
15140s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15141s&@builddir@&$ac_builddir&;t t
15142s&@abs_builddir@&$ac_abs_builddir&;t t
15143s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15144s&@INSTALL@&$ac_INSTALL&;t t
15145$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015146"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015147eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15148 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015151 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15152 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15153 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 { $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 +000015155which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015156$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015157which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015158
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015159 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015161 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15162 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015164 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 ;;
15166 :H)
15167 #
15168 # CONFIG_HEADER
15169 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 {
15172 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015173 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15174 } >"$ac_tmp/config.h" \
15175 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15176 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15178$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015181 mv "$ac_tmp/config.h" "$ac_file" \
15182 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 fi
15184 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015186 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15187 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191
15192 esac
15193
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015194
15195 case $ac_file$ac_mode in
15196 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15197
15198 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199done # for ac_tag
15200
Guido van Rossum627b2d71993-12-24 10:39:16 +000015201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015204ac_clean_files=$ac_clean_files_save
15205
Matthias Kloseb9621712010-04-24 17:59:49 +000015206test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015207 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015208
Martin v. Löwis11437992002-04-12 09:54:03 +000015209
15210# configure is writing to config.log, and then calls config.status.
15211# config.status does its own redirection, appending to config.log.
15212# Unfortunately, on DOS this fails, as config.log is still kept open
15213# by configure, so config.status won't be able to write to it; its
15214# output is simply discarded. So we exec the FD to /dev/null,
15215# effectively closing config.log, so it can be properly (re)opened and
15216# appended to by config.status. When coming back to configure, we
15217# need to make the FD available again.
15218if test "$no_create" != yes; then
15219 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015220 ac_config_status_args=
15221 test "$silent" = yes &&
15222 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015224 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 exec 5>>config.log
15226 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15227 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015228 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015229fi
15230if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15232$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015233fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015234
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015235
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015236echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015237if test ! -f Modules/Setup
15238then
15239 cp $srcdir/Modules/Setup.dist Modules/Setup
15240fi
15241
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015242echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015243if test ! -f Modules/Setup.local
15244then
15245 echo "# Edit this file for local setup changes" >Modules/Setup.local
15246fi
15247
15248echo "creating Makefile"
15249$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15250 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015251 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015252mv config.c Modules