blob: 36723f614ad3a7360b6a4a47e994d4253ccb0eee [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
8871 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 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008879 AIX/5)
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 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008883 AIX/6)
8884$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8885
8886 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008887 esac
8888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8890$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008891 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008895 ac_cv_pthread_system_supported=no
8896else
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899#include <pthread.h>
8900 void *foo(void *parm) {
8901 return NULL;
8902 }
8903 main() {
8904 pthread_attr_t attr;
8905 pthread_t id;
8906 if (pthread_attr_init(&attr)) exit(-1);
8907 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8908 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8909 exit(0);
8910 }
8911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008912if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008913 ac_cv_pthread_system_supported=yes
8914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008919fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921
Guido van Rossum627b2d71993-12-24 10:39:16 +00008922fi
8923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8925$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008926 if test "$ac_cv_pthread_system_supported" = "yes"; then
8927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008929
8930 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 for ac_func in pthread_sigmask
8932do :
8933 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008934if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008935 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008936#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008937_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008938 case $ac_sys_system in
8939 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008942
8943 ;;
8944 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008945fi
8946done
8947
8948fi
8949
8950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8954$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008956if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961 ipv6=no
8962 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8964$as_echo "yes" >&6; }
8965 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966
8967 ipv6=yes
8968 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970else
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976 ipv6=no
8977
8978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981 /* AF_INET6 available check */
8982#include <sys/types.h>
8983#include <sys/socket.h>
8984main()
8985{
8986 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8987 exit(1);
8988 else
8989 exit(0);
8990}
8991
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008993if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008994
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8996$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999else
Matthias Kloseb159a552010-04-25 21:00:44 +00009000
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9002$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009004
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
9009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009011if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9013$as_echo_n "checking if RFC2553 API is available... " >&6; }
9014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009016
9017 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009018#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009019int
9020main ()
9021{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009022struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009023 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ;
9025 return 0;
9026}
Matthias Kloseb159a552010-04-25 21:00:44 +00009027
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009029if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009030
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009032$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009033 ipv6=yes
9034
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009035else
Matthias Kloseb159a552010-04-25 21:00:44 +00009036
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009038$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009039 ipv6=no
9040
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009043fi
9044
9045if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009047
9048fi
9049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050fi
9051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052
9053ipv6type=unknown
9054ipv6lib=none
9055ipv6trylibc=no
9056
9057if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9059$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009060 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9061 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062 case $i in
9063 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067#include <netinet/in.h>
9068#ifdef IPV6_INRIA_VERSION
9069yes
9070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009074 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009076rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077
9078 ;;
9079 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009081/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009082
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083#include <netinet/in.h>
9084#ifdef __KAME__
9085yes
9086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090 ipv6type=$i;
9091 ipv6lib=inet6
9092 ipv6libdir=/usr/local/v6/lib
9093 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096
9097 ;;
9098 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102#include <features.h>
9103#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9104yes
9105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009109 ipv6type=$i;
9110 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009112rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113
9114 ;;
9115 linux-inet6)
9116 if test -d /usr/inet6; then
9117 ipv6type=$i
9118 ipv6lib=inet6
9119 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009120 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121 fi
9122 ;;
9123 solaris)
9124 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009125 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009126 ipv6type=$i
9127 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009128 fi
9129 fi
9130 ;;
9131 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135#include <sys/param.h>
9136#ifdef _TOSHIBA_INET6
9137yes
9138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142 ipv6type=$i;
9143 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009144 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009146rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009147
9148 ;;
9149 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009153#include </usr/local/v6/include/sys/v6config.h>
9154#ifdef __V6D__
9155yes
9156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160 ipv6type=$i;
9161 ipv6lib=v6;
9162 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009163 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009164fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009165rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166
9167 ;;
9168 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009170/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009171
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009172#include <sys/param.h>
9173#ifdef _ZETA_MINAMI_INET6
9174yes
9175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009176_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009179 ipv6type=$i;
9180 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009181 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009183rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009184
9185 ;;
9186 esac
9187 if test "$ipv6type" != "unknown"; then
9188 break
9189 fi
9190 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9192$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009193fi
9194
9195if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9196 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9197 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9198 echo "using lib$ipv6lib"
9199 else
9200 if test $ipv6trylibc = "yes"; then
9201 echo "using libc"
9202 else
9203 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9204 echo "You need to fetch lib$ipv6lib.a from appropriate"
9205 echo 'ipv6 kit and compile beforehand.'
9206 exit 1
9207 fi
9208 fi
9209fi
9210
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9212$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009214/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009215
9216 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009217int
9218main ()
9219{
9220FSIORefNum fRef = 0
9221 ;
9222 return 0;
9223}
Matthias Kloseb159a552010-04-25 21:00:44 +00009224
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009227
Matthias Kloseb159a552010-04-25 21:00:44 +00009228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9232$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009233
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009234else
Matthias Kloseb159a552010-04-25 21:00:44 +00009235
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9237$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009238
9239fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009242# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9244$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009247if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248 withval=$with_doc_strings;
9249fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009250
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009251
9252if test -z "$with_doc_strings"
9253then with_doc_strings="yes"
9254fi
9255if test "$with_doc_strings" != "no"
9256then
9257
Matthias Kloseb9621712010-04-24 17:59:49 +00009258$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009259
9260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9262$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009263
Antoine Pitrou042b1282010-08-13 21:15:58 +00009264# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9266$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009269if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009271if test "$withval" != no
9272then
9273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9277$as_echo "yes" >&6; }
9278else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9279$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009280fi
9281else
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9283$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284fi
9285
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009286
9287# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9289$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009292if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293 withval=$with_pymalloc;
9294fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009295
Neil Schemenauera35c6882001-02-27 04:45:05 +00009296
Neil Schemenauer16c22972002-03-22 15:34:49 +00009297if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009298then
9299 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009300 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009301fi
9302if test "$with_pymalloc" != "no"
9303then
Martin v. Löwis11437992002-04-12 09:54:03 +00009304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009306
9307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9309$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009310
Benjamin Peterson05159c42009-12-03 03:01:27 +00009311# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9313$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009314
9315# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009316if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009317 withval=$with_valgrind;
9318else
9319 with_valgrind=no
9320fi
9321
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9323$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009324if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 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 +00009326if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009327
Matthias Kloseb9621712010-04-24 17:59:49 +00009328$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009329
9330else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009331 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009332
9333fi
9334
9335
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009336 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009337fi
9338
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009339# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009340
Guido van Rossum98935bf2001-09-05 19:13:16 +00009341DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009342
Guido van Rossume97ee181999-12-20 21:27:22 +00009343# the dlopen() function means we might want to use dynload_shlib.o. some
9344# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009345for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009346do :
9347 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009348if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009350#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009351_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009352
Guido van Rossume97ee181999-12-20 21:27:22 +00009353fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009354done
Guido van Rossume97ee181999-12-20 21:27:22 +00009355
Michael W. Hudson54241132001-12-07 15:38:26 +00009356
Guido van Rossume97ee181999-12-20 21:27:22 +00009357# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9358# loading of modules.
9359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9361$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009362if test -z "$DYNLOADFILE"
9363then
9364 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009365 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9366 if test "$ac_cv_func_dlopen" = yes
9367 then DYNLOADFILE="dynload_shlib.o"
9368 else DYNLOADFILE="dynload_aix.o"
9369 fi
9370 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009371 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009372 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9373 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009374 *)
9375 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9376 # out any dynamic loading
9377 if test "$ac_cv_func_dlopen" = yes
9378 then DYNLOADFILE="dynload_shlib.o"
9379 else DYNLOADFILE="dynload_stub.o"
9380 fi
9381 ;;
9382 esac
9383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9385$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009386if test "$DYNLOADFILE" != "dynload_stub.o"
9387then
Martin v. Löwis11437992002-04-12 09:54:03 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009390
9391fi
9392
Neil Schemenauer4e425612001-06-19 15:44:15 +00009393# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9394
Michael W. Hudson54241132001-12-07 15:38:26 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9397$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009398if test -z "$MACHDEP_OBJS"
9399then
Jack Jansene578a632001-08-15 01:27:14 +00009400 MACHDEP_OBJS=$extra_machdep_objs
9401else
9402 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9405$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009406
Guido van Rossum627b2d71993-12-24 10:39:16 +00009407# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009408for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009409 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009410 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009411 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009412 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009413 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009414 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009415 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9416 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009417 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009418 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009419 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009420 truncate uname unsetenv utimes waitpid wait3 wait4 \
9421 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009422do :
9423 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9424ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009425if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009427#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009429
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009430fi
9431done
9432
Michael W. Hudson54241132001-12-07 15:38:26 +00009433
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009434# For some functions, having a definition is not sufficient, since
9435# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9437$as_echo_n "checking for chroot... " >&6; }
9438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009440#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009441int
9442main ()
9443{
9444void *x=chroot
9445 ;
9446 return 0;
9447}
9448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009450
Matthias Kloseb9621712010-04-24 17:59:49 +00009451$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009452
Matthias Kloseb159a552010-04-25 21:00:44 +00009453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009454$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009458
9459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9462$as_echo_n "checking for link... " >&6; }
9463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009464/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009465#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009466int
9467main ()
9468{
9469void *x=link
9470 ;
9471 return 0;
9472}
9473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009475
Matthias Kloseb9621712010-04-24 17:59:49 +00009476$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009477
Matthias Kloseb159a552010-04-25 21:00:44 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009479$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009480else
Matthias Kloseb9621712010-04-24 17:59:49 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009483
9484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9487$as_echo_n "checking for symlink... " >&6; }
9488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009489/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009490#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009491int
9492main ()
9493{
9494void *x=symlink
9495 ;
9496 return 0;
9497}
9498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009500
Matthias Kloseb9621712010-04-24 17:59:49 +00009501$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009502
Matthias Kloseb159a552010-04-25 21:00:44 +00009503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009504$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009505else
Matthias Kloseb9621712010-04-24 17:59:49 +00009506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9507$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009508
9509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9512$as_echo_n "checking for fchdir... " >&6; }
9513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009514/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009515#include <unistd.h>
9516int
9517main ()
9518{
9519void *x=fchdir
9520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009525
Matthias Kloseb9621712010-04-24 17:59:49 +00009526$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009527
Matthias Kloseb159a552010-04-25 21:00:44 +00009528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009529$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009530else
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9532$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009533
9534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9537$as_echo_n "checking for fsync... " >&6; }
9538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009539/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009540#include <unistd.h>
9541int
9542main ()
9543{
9544void *x=fsync
9545 ;
9546 return 0;
9547}
9548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009550
Matthias Kloseb9621712010-04-24 17:59:49 +00009551$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009552
Matthias Kloseb159a552010-04-25 21:00:44 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009554$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009555else
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009558
9559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9562$as_echo_n "checking for fdatasync... " >&6; }
9563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009564/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009565#include <unistd.h>
9566int
9567main ()
9568{
9569void *x=fdatasync
9570 ;
9571 return 0;
9572}
9573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009575
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009577
Matthias Kloseb159a552010-04-25 21:00:44 +00009578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009579$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009580else
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9582$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009583
9584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9587$as_echo_n "checking for epoll... " >&6; }
9588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009589/* end confdefs.h. */
9590#include <sys/epoll.h>
9591int
9592main ()
9593{
9594void *x=epoll_create
9595 ;
9596 return 0;
9597}
9598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009602
Matthias Kloseb159a552010-04-25 21:00:44 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009605else
Matthias Kloseb9621712010-04-24 17:59:49 +00009606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009608
9609fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9612$as_echo_n "checking for kqueue... " >&6; }
9613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009614/* end confdefs.h. */
9615
9616#include <sys/types.h>
9617#include <sys/event.h>
9618
9619int
9620main ()
9621{
9622int x=kqueue()
9623 ;
9624 return 0;
9625}
9626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009627if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009628
Matthias Kloseb9621712010-04-24 17:59:49 +00009629$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009630
Matthias Kloseb159a552010-04-25 21:00:44 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009632$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009633else
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009636
9637fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009639# On some systems (eg. FreeBSD 5), we would find a definition of the
9640# functions ctermid_r, setgroups in the library, but no prototype
9641# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9642# address to avoid compiler warnings and potential miscompilations
9643# because of the missing prototypes.
9644
Matthias Kloseb9621712010-04-24 17:59:49 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9646$as_echo_n "checking for ctermid_r... " >&6; }
9647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009648/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009649
Martin v. Löwisd5843682002-11-21 20:41:28 +00009650#include <stdio.h>
9651
Martin v. Löwisd5843682002-11-21 20:41:28 +00009652int
9653main ()
9654{
9655void* p = ctermid_r
9656 ;
9657 return 0;
9658}
9659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009663
Matthias Kloseb159a552010-04-25 21:00:44 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009665$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009666else
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009669
9670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9672
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9674$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009675if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009676 $as_echo_n "(cached) " >&6
9677else
9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009680#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681int
9682main ()
9683{
9684void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009685
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009686 ;
9687 return 0;
9688}
9689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009690if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009691 ac_cv_flock_decl=yes
9692else
9693 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694
9695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009697
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009698fi
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9700$as_echo "$ac_cv_flock_decl" >&6; }
9701if test "x${ac_cv_flock_decl}" = xyes; then
9702 for ac_func in flock
9703do :
9704 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009705if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009706 cat >>confdefs.h <<_ACEOF
9707#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009708_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009709
Antoine Pitroua3000072010-09-07 14:52:42 +00009710else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009712$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009713if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009714 $as_echo_n "(cached) " >&6
9715else
9716 ac_check_lib_save_LIBS=$LIBS
9717LIBS="-lbsd $LIBS"
9718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9719/* end confdefs.h. */
9720
9721/* Override any GCC internal prototype to avoid an error.
9722 Use char because int might match the return type of a GCC
9723 builtin and then its argument prototype would still apply. */
9724#ifdef __cplusplus
9725extern "C"
9726#endif
9727char flock ();
9728int
9729main ()
9730{
9731return flock ();
9732 ;
9733 return 0;
9734}
9735_ACEOF
9736if ac_fn_c_try_link "$LINENO"; then :
9737 ac_cv_lib_bsd_flock=yes
9738else
9739 ac_cv_lib_bsd_flock=no
9740fi
9741rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
9743LIBS=$ac_check_lib_save_LIBS
9744fi
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9746$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009747if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009748 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009749
9750
9751$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9752
9753
9754fi
9755
9756
9757fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009758done
9759
Antoine Pitroua3000072010-09-07 14:52:42 +00009760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761
Matthias Kloseb9621712010-04-24 17:59:49 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9763$as_echo_n "checking for getpagesize... " >&6; }
9764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009766
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009767#include <unistd.h>
9768
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009769int
9770main ()
9771{
9772void* p = getpagesize
9773 ;
9774 return 0;
9775}
9776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009778
Matthias Kloseb9621712010-04-24 17:59:49 +00009779$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009780
Matthias Kloseb159a552010-04-25 21:00:44 +00009781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009782$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009783else
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009786
9787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009789
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009790for ac_prog in true
9791do
9792 # Extract the first word of "$ac_prog", so it can be a program name with args.
9793set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009796if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009798else
9799 if test -n "$TRUE"; then
9800 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9801else
9802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9803for as_dir in $PATH
9804do
9805 IFS=$as_save_IFS
9806 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808 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 +00009809 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009810 $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 +00009811 break 2
9812 fi
9813done
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009816
9817fi
9818fi
9819TRUE=$ac_cv_prog_TRUE
9820if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9822$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826fi
9827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009829 test -n "$TRUE" && break
9830done
9831test -n "$TRUE" || TRUE="/bin/true"
9832
9833
Matthias Kloseb9621712010-04-24 17:59:49 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9835$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009836if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838else
9839 ac_check_lib_save_LIBS=$LIBS
9840LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009842/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844/* Override any GCC internal prototype to avoid an error.
9845 Use char because int might match the return type of a GCC
9846 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009847#ifdef __cplusplus
9848extern "C"
9849#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009850char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851int
9852main ()
9853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009855 ;
9856 return 0;
9857}
9858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009860 ac_cv_lib_c_inet_aton=yes
9861else
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864rm -f core conftest.err conftest.$ac_objext \
9865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009866LIBS=$ac_check_lib_save_LIBS
9867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9869$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009870if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009871 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009872else
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9874$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009875if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009877else
9878 ac_check_lib_save_LIBS=$LIBS
9879LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883/* Override any GCC internal prototype to avoid an error.
9884 Use char because int might match the return type of a GCC
9885 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009886#ifdef __cplusplus
9887extern "C"
9888#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009889char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890int
9891main ()
9892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009894 ;
9895 return 0;
9896}
9897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009899 ac_cv_lib_resolv_inet_aton=yes
9900else
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903rm -f core conftest.err conftest.$ac_objext \
9904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009905LIBS=$ac_check_lib_save_LIBS
9906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9908$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009909if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009910 cat >>confdefs.h <<_ACEOF
9911#define HAVE_LIBRESOLV 1
9912_ACEOF
9913
9914 LIBS="-lresolv $LIBS"
9915
9916fi
9917
9918
9919fi
9920
9921
Christian Heimesd0764e22007-12-04 15:00:33 +00009922# On Tru64, chflags seems to be present, but calling it will
9923# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9925$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009926if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009928else
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009930 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009931else
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009933/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009934
Christian Heimesd0764e22007-12-04 15:00:33 +00009935#include <sys/stat.h>
9936#include <unistd.h>
9937int main(int argc, char*argv[])
9938{
9939 if(chflags(argv[0], 0) != 0)
9940 return 1;
9941 return 0;
9942}
Ned Deily3eb67d52011-06-28 00:00:28 -07009943
Christian Heimesd0764e22007-12-04 15:00:33 +00009944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009946 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009947else
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009952fi
9953
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9957$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009958if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009960if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009961 ac_cv_have_chflags="yes"
9962else
9963 ac_cv_have_chflags="no"
9964fi
9965
9966fi
9967if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009970
9971fi
9972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9974$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009975if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009979 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009980else
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009982/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -07009983
Christian Heimesd0764e22007-12-04 15:00:33 +00009984#include <sys/stat.h>
9985#include <unistd.h>
9986int main(int argc, char*argv[])
9987{
9988 if(lchflags(argv[0], 0) != 0)
9989 return 1;
9990 return 0;
9991}
Ned Deily3eb67d52011-06-28 00:00:28 -07009992
Christian Heimesd0764e22007-12-04 15:00:33 +00009993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009995 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009996else
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010001fi
10002
10003
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10006$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010007if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010009if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010010 ac_cv_have_lchflags="yes"
10011else
10012 ac_cv_have_lchflags="no"
10013fi
10014
10015fi
10016if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010019
10020fi
10021
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010022case $ac_sys_system/$ac_sys_release in
10023Darwin/*)
10024 _CUR_CFLAGS="${CFLAGS}"
10025 _CUR_LDFLAGS="${LDFLAGS}"
10026 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10027 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10028 ;;
10029esac
10030
Matthias Kloseb9621712010-04-24 17:59:49 +000010031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10032$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010033if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010034 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010035else
10036 ac_check_lib_save_LIBS=$LIBS
10037LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010039/* end confdefs.h. */
10040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041/* Override any GCC internal prototype to avoid an error.
10042 Use char because int might match the return type of a GCC
10043 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010044#ifdef __cplusplus
10045extern "C"
10046#endif
10047char inflateCopy ();
10048int
10049main ()
10050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010052 ;
10053 return 0;
10054}
10055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010056if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010057 ac_cv_lib_z_inflateCopy=yes
10058else
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061rm -f core conftest.err conftest.$ac_objext \
10062 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010063LIBS=$ac_check_lib_save_LIBS
10064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10066$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010067if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010070
10071fi
10072
10073
10074case $ac_sys_system/$ac_sys_release in
10075Darwin/*)
10076 CFLAGS="${_CUR_CFLAGS}"
10077 LDFLAGS="${_CUR_LDFLAGS}"
10078 ;;
10079esac
10080
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10082$as_echo_n "checking for hstrerror... " >&6; }
10083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010084/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
Martin v. Löwise9416172003-05-03 10:12:45 +000010086#include <netdb.h>
10087
Martin v. Löwise9416172003-05-03 10:12:45 +000010088int
10089main ()
10090{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010091void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010092 ;
10093 return 0;
10094}
10095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010099
Matthias Kloseb159a552010-04-25 21:00:44 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010101$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010102else
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010105
10106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010107rm -f core conftest.err conftest.$ac_objext \
10108 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10111$as_echo_n "checking for inet_aton... " >&6; }
10112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010113/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010114
Martin v. Löwis86d66262006-02-17 08:40:11 +000010115#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010116#include <sys/socket.h>
10117#include <netinet/in.h>
10118#include <arpa/inet.h>
10119
Martin v. Löwise9416172003-05-03 10:12:45 +000010120int
10121main ()
10122{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010123void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010124 ;
10125 return 0;
10126}
10127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010131
Matthias Kloseb159a552010-04-25 21:00:44 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010133$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010134else
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010137
10138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010139rm -f core conftest.err conftest.$ac_objext \
10140 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10143$as_echo_n "checking for inet_pton... " >&6; }
10144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010145/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010146
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010147#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010148#include <sys/socket.h>
10149#include <netinet/in.h>
10150#include <arpa/inet.h>
10151
Martin v. Löwise9416172003-05-03 10:12:45 +000010152int
10153main ()
10154{
10155void* p = inet_pton
10156 ;
10157 return 0;
10158}
10159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010163
Matthias Kloseb159a552010-04-25 21:00:44 +000010164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010165$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010166else
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010169
10170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010172
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010173# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10175$as_echo_n "checking for setgroups... " >&6; }
10176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010177/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010178
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010179#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010180#ifdef HAVE_GRP_H
10181#include <grp.h>
10182#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010183
Martin v. Löwisd5843682002-11-21 20:41:28 +000010184int
10185main ()
10186{
10187void* p = setgroups
10188 ;
10189 return 0;
10190}
10191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010193
Matthias Kloseb9621712010-04-24 17:59:49 +000010194$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010195
Matthias Kloseb159a552010-04-25 21:00:44 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010197$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010201
10202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010204
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010205# check for openpty and forkpty
10206
10207for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010208do :
10209 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010210if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010212#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010213_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010215else
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10217$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010218if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010220else
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010222LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226/* Override any GCC internal prototype to avoid an error.
10227 Use char because int might match the return type of a GCC
10228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229#ifdef __cplusplus
10230extern "C"
10231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010232char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010233int
10234main ()
10235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ;
10238 return 0;
10239}
10240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010243else
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010246rm -f core conftest.err conftest.$ac_objext \
10247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010248LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10251$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010252if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010254 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255else
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10257$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010258if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260else
10261 ac_check_lib_save_LIBS=$LIBS
10262LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010264/* end confdefs.h. */
10265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266/* Override any GCC internal prototype to avoid an error.
10267 Use char because int might match the return type of a GCC
10268 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269#ifdef __cplusplus
10270extern "C"
10271#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010272char openpty ();
10273int
10274main ()
10275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010277 ;
10278 return 0;
10279}
10280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010282 ac_cv_lib_bsd_openpty=yes
10283else
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010286rm -f core conftest.err conftest.$ac_objext \
10287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010288LIBS=$ac_check_lib_save_LIBS
10289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10291$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010292if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010294 LIBS="$LIBS -lbsd"
10295fi
10296
10297
10298fi
10299
Fred Drake8cef4cf2000-06-28 16:40:38 +000010300
10301fi
10302done
10303
10304for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010305do :
10306 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010307if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010309#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010311
Fred Drake8cef4cf2000-06-28 16:40:38 +000010312else
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10314$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010315if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010317else
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010319LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323/* Override any GCC internal prototype to avoid an error.
10324 Use char because int might match the return type of a GCC
10325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010326#ifdef __cplusplus
10327extern "C"
10328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010329char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010330int
10331main ()
10332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 ;
10335 return 0;
10336}
10337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010340else
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343rm -f core conftest.err conftest.$ac_objext \
10344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010345LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10348$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010349if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010351 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10354$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010355if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357else
10358 ac_check_lib_save_LIBS=$LIBS
10359LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010361/* end confdefs.h. */
10362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010363/* Override any GCC internal prototype to avoid an error.
10364 Use char because int might match the return type of a GCC
10365 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010366#ifdef __cplusplus
10367extern "C"
10368#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010369char forkpty ();
10370int
10371main ()
10372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010374 ;
10375 return 0;
10376}
10377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010379 ac_cv_lib_bsd_forkpty=yes
10380else
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010383rm -f core conftest.err conftest.$ac_objext \
10384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010385LIBS=$ac_check_lib_save_LIBS
10386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10388$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010389if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010391 LIBS="$LIBS -lbsd"
10392fi
10393
10394
10395fi
10396
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397
10398fi
10399done
10400
Jack Jansendd19cf82001-12-06 22:36:17 +000010401
Christian Heimesb186d002008-03-18 15:15:01 +000010402# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010403for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010404do :
10405 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010406if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010407 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010408#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010409_ACEOF
10410
10411fi
10412done
10413
10414
Michael W. Hudson54241132001-12-07 15:38:26 +000010415# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010416for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010417do :
10418 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10419ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010420if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010422#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010423_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010425fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426done
10427
Michael W. Hudson54241132001-12-07 15:38:26 +000010428
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010429ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10430if test "x$ac_cv_func_dup2" = xyes; then :
10431 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010432
Martin v. Löwis1142de32002-03-29 16:28:31 +000010433else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010435 *" dup2.$ac_objext "* ) ;;
10436 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010438esac
10439
Martin v. Löwis1142de32002-03-29 16:28:31 +000010440fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010441
10442ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10443if test "x$ac_cv_func_getcwd" = xyes; then :
10444 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10445
10446else
10447 case " $LIBOBJS " in
10448 *" getcwd.$ac_objext "* ) ;;
10449 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10450 ;;
10451esac
10452
10453fi
10454
10455ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10456if test "x$ac_cv_func_strdup" = xyes; then :
10457 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10458
10459else
10460 case " $LIBOBJS " in
10461 *" strdup.$ac_objext "* ) ;;
10462 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10463 ;;
10464esac
10465
10466fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010467
10468
10469for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010470do :
10471 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010472if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010474#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010478#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010479int
10480main ()
10481{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ;
10484 return 0;
10485}
10486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010493
Guido van Rossum627b2d71993-12-24 10:39:16 +000010494fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010495done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496
Jack Jansen150753c2003-03-29 22:07:47 +000010497for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010498do :
10499 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010500if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010501 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010505/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010506#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010507int
10508main ()
10509{
10510setpgrp(0,0);
10511 ;
10512 return 0;
10513}
10514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010518
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010521
10522fi
10523done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010524
Thomas Wouters3a584202000-08-05 23:28:51 +000010525for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010526do :
10527 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010528if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010530#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010534#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010535int
10536main ()
10537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010538gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 ;
10540 return 0;
10541}
10542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010543if ac_fn_c_try_compile "$LINENO"; then :
10544
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545else
Skip Montanaro6dead952003-09-25 14:50:04 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010548
Martin v. Löwis11437992002-04-12 09:54:03 +000010549
Guido van Rossum627b2d71993-12-24 10:39:16 +000010550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010554done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010555
Michael W. Hudson54241132001-12-07 15:38:26 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10558$as_echo_n "checking for major... " >&6; }
10559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010560/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010561
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010562#if defined(MAJOR_IN_MKDEV)
10563#include <sys/mkdev.h>
10564#elif defined(MAJOR_IN_SYSMACROS)
10565#include <sys/sysmacros.h>
10566#else
10567#include <sys/types.h>
10568#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010569
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010570int
10571main ()
10572{
10573
10574 makedev(major(0),minor(0));
10575
10576 ;
10577 return 0;
10578}
10579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010581
10582
Matthias Kloseb9621712010-04-24 17:59:49 +000010583$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10586$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010587
10588else
Skip Montanaro6dead952003-09-25 14:50:04 +000010589
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010592
10593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010594rm -f core conftest.err conftest.$ac_objext \
10595 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010596
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010597# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010598# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10600$as_echo_n "checking for getaddrinfo... " >&6; }
10601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010603
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010604#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010605#include <sys/socket.h>
10606#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010607#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608
Martin v. Löwis11437992002-04-12 09:54:03 +000010609int
10610main ()
10611{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010612getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618 have_getaddrinfo=yes
10619else
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622rm -f core conftest.err conftest.$ac_objext \
10623 conftest$ac_exeext conftest.$ac_ext
10624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10625$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010626if test $have_getaddrinfo = yes
10627then
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10629$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010630 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010634 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010638
10639#include <sys/types.h>
10640#include <netdb.h>
10641#include <string.h>
10642#include <sys/socket.h>
10643#include <netinet/in.h>
10644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010645int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010646{
10647 int passive, gaierr, inet4 = 0, inet6 = 0;
10648 struct addrinfo hints, *ai, *aitop;
10649 char straddr[INET6_ADDRSTRLEN], strport[16];
10650
10651 for (passive = 0; passive <= 1; passive++) {
10652 memset(&hints, 0, sizeof(hints));
10653 hints.ai_family = AF_UNSPEC;
10654 hints.ai_flags = passive ? AI_PASSIVE : 0;
10655 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010656 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010657 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10658 (void)gai_strerror(gaierr);
10659 goto bad;
10660 }
10661 for (ai = aitop; ai; ai = ai->ai_next) {
10662 if (ai->ai_addr == NULL ||
10663 ai->ai_addrlen == 0 ||
10664 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10665 straddr, sizeof(straddr), strport, sizeof(strport),
10666 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10667 goto bad;
10668 }
10669 switch (ai->ai_family) {
10670 case AF_INET:
10671 if (strcmp(strport, "54321") != 0) {
10672 goto bad;
10673 }
10674 if (passive) {
10675 if (strcmp(straddr, "0.0.0.0") != 0) {
10676 goto bad;
10677 }
10678 } else {
10679 if (strcmp(straddr, "127.0.0.1") != 0) {
10680 goto bad;
10681 }
10682 }
10683 inet4++;
10684 break;
10685 case AF_INET6:
10686 if (strcmp(strport, "54321") != 0) {
10687 goto bad;
10688 }
10689 if (passive) {
10690 if (strcmp(straddr, "::") != 0) {
10691 goto bad;
10692 }
10693 } else {
10694 if (strcmp(straddr, "::1") != 0) {
10695 goto bad;
10696 }
10697 }
10698 inet6++;
10699 break;
10700 case AF_UNSPEC:
10701 goto bad;
10702 break;
10703 default:
10704 /* another family support? */
10705 break;
10706 }
10707 }
10708 }
10709
10710 if (!(inet4 == 0 || inet4 == 2))
10711 goto bad;
10712 if (!(inet6 == 0 || inet6 == 2))
10713 goto bad;
10714
10715 if (aitop)
10716 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010717 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010718
10719 bad:
10720 if (aitop)
10721 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010722 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010723}
10724
Martin v. Löwis11437992002-04-12 09:54:03 +000010725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010727 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010735fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010736
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10740$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10741
Mark Dickinson2df5d282009-12-31 21:22:50 +000010742if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010743then
10744 if test $ipv6 = yes
10745 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010746 echo 'Fatal: You must get working getaddrinfo() function.'
10747 echo ' or you can specify "--disable-ipv6"'.
10748 exit 1
10749 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010753
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010754fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010755
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010756for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010757do :
10758 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010759if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010761#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010762_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010763
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010764fi
10765done
10766
Michael W. Hudson54241132001-12-07 15:38:26 +000010767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010768# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10770$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 +000010771if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773else
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776#include <sys/types.h>
10777#include <sys/time.h>
10778#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010779
Martin v. Löwis11437992002-04-12 09:54:03 +000010780int
10781main ()
10782{
10783if ((struct tm *) 0)
10784return 0;
10785 ;
10786 return 0;
10787}
10788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010789if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010791else
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10797$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010798if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801
10802fi
10803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10805$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 +000010806if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808else
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811#include <sys/types.h>
10812#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010813
Martin v. Löwis11437992002-04-12 09:54:03 +000010814int
10815main ()
10816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817struct tm tm;
10818 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 ;
10821 return 0;
10822}
10823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010824if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825 ac_cv_struct_tm=time.h
10826else
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10832$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010833if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836
10837fi
10838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839ac_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 +000010840#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010843if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010844
10845cat >>confdefs.h <<_ACEOF
10846#define HAVE_STRUCT_TM_TM_ZONE 1
10847_ACEOF
10848
10849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010851
Martin v. Löwis11437992002-04-12 09:54:03 +000010852if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855
10856else
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10858"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010859if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861else
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863fi
10864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010865cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867_ACEOF
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10870$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010871if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010876#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877#if !HAVE_DECL_TZNAME
10878extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
Martin v. Löwis11437992002-04-12 09:54:03 +000010881int
10882main ()
10883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 ;
10886 return 0;
10887}
10888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010890 ac_cv_var_tzname=yes
10891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010894rm -f core conftest.err conftest.$ac_objext \
10895 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10898$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010899 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010902
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010903 fi
10904fi
10905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906ac_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 +000010907if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010908
10909cat >>confdefs.h <<_ACEOF
10910#define HAVE_STRUCT_STAT_ST_RDEV 1
10911_ACEOF
10912
10913
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010914fi
10915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916ac_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 +000010917if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010918
Martin v. Löwis11437992002-04-12 09:54:03 +000010919cat >>confdefs.h <<_ACEOF
10920#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10921_ACEOF
10922
10923
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010924fi
10925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926ac_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 +000010927if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010928
10929cat >>confdefs.h <<_ACEOF
10930#define HAVE_STRUCT_STAT_ST_FLAGS 1
10931_ACEOF
10932
10933
10934fi
10935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936ac_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 +000010937if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010938
10939cat >>confdefs.h <<_ACEOF
10940#define HAVE_STRUCT_STAT_ST_GEN 1
10941_ACEOF
10942
10943
10944fi
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946ac_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 +000010947if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010948
10949cat >>confdefs.h <<_ACEOF
10950#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10951_ACEOF
10952
10953
10954fi
10955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956ac_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 +000010957if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010958
Martin v. Löwis11437992002-04-12 09:54:03 +000010959cat >>confdefs.h <<_ACEOF
10960#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10961_ACEOF
10962
10963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010965
10966else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010968 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10970 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010971esac
10972
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010973fi
10974
Michael W. Hudson54241132001-12-07 15:38:26 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10978$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010979if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981else
Matthias Kloseb159a552010-04-25 21:00:44 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010985#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010986int
10987main ()
10988{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010989return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 ;
10991 return 0;
10992}
10993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995 ac_cv_header_time_altzone=yes
10996else
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001fi
11002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11004$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008
11009fi
11010
Guido van Rossumda88dad1995-01-26 00:46:29 +000011011was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11013$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011016
11017#include <sys/types.h>
11018#include <sys/select.h>
11019#include <sys/time.h>
11020
Martin v. Löwis11437992002-04-12 09:54:03 +000011021int
11022main ()
11023{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024;
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 ;
11026 return 0;
11027}
11028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
11031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011033
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011034 was_it_defined=yes
11035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11039$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11042$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011043if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011048#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011049int
11050main ()
11051{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011052struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 ;
11054 return 0;
11055}
11056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011058 ac_cv_struct_addrinfo=yes
11059else
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063fi
11064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11066$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011067if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011070
11071fi
11072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11074$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011075if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011077else
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011080
11081# include <sys/types.h>
11082# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011083int
11084main ()
11085{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011086struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 ;
11088 return 0;
11089}
11090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011092 ac_cv_struct_sockaddr_storage=yes
11093else
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11097fi
11098
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11100$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011101if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011104
11105fi
11106
Guido van Rossum627b2d71993-12-24 10:39:16 +000011107# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11110$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011111if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011113else
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
11120static int test_array [1 - 2 * !(((char) -1) < 0)];
11121test_array [0] = 0
11122
11123 ;
11124 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011125}
Martin v. Löwis11437992002-04-12 09:54:03 +000011126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011127if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011128 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11135$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011136if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011138
11139fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11142$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011143if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011145else
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011148
Martin v. Löwis11437992002-04-12 09:54:03 +000011149int
11150main ()
11151{
11152/* FIXME: Include the comments suggested by Paul. */
11153#ifndef __cplusplus
11154 /* Ultrix mips cc rejects this. */
11155 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011156 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158 char const *const *pcpcc;
11159 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 /* NEC SVR4.0.2 mips cc rejects this. */
11161 struct point {int x, y;};
11162 static struct point const zero = {0,0};
11163 /* AIX XL C 1.02.0.0 rejects this.
11164 It does not let you subtract one const X* pointer from another in
11165 an arm of an if-expression whose if-part is not a constant
11166 expression */
11167 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011169 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 ++pcpcc;
11171 ppc = (char**) pcpcc;
11172 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 { /* SCO 3.2v4 cc rejects this. */
11174 char *t;
11175 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 }
11180 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11181 int x[] = {25, 17};
11182 const int *foo = &x[0];
11183 ++foo;
11184 }
11185 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11186 typedef const int *iptr;
11187 iptr p = 0;
11188 ++p;
11189 }
11190 { /* AIX XL C 1.02.0.0 rejects this saying
11191 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11192 struct s { int j; const int *ap[3]; };
11193 struct s *b; b->j = 5;
11194 }
11195 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11196 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011200#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011201
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 ;
11203 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011204}
Martin v. Löwis11437992002-04-12 09:54:03 +000011205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207 ac_cv_c_const=yes
11208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11214$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218
11219fi
11220
Michael W. Hudson54241132001-12-07 15:38:26 +000011221
Guido van Rossumda88dad1995-01-26 00:46:29 +000011222works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11224$as_echo_n "checking for working volatile... " >&6; }
11225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011237 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011238else
Skip Montanaro6dead952003-09-25 14:50:04 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011242
Guido van Rossum627b2d71993-12-24 10:39:16 +000011243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11246$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011247
Guido van Rossumda88dad1995-01-26 00:46:29 +000011248works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11250$as_echo_n "checking for working signed char... " >&6; }
11251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011253
Martin v. Löwis11437992002-04-12 09:54:03 +000011254int
11255main ()
11256{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011257signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 ;
11259 return 0;
11260}
11261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011262if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011263 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011264else
Skip Montanaro6dead952003-09-25 14:50:04 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011267
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011268
Guido van Rossum7f43da71994-08-01 12:15:30 +000011269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11272$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011273
Guido van Rossumda88dad1995-01-26 00:46:29 +000011274have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11276$as_echo_n "checking for prototypes... " >&6; }
11277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011278/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011279int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011280int
11281main ()
11282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011283return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 ;
11285 return 0;
11286}
11287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Matthias Kloseb159a552010-04-25 21:00:44 +000011292 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11296$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297
Guido van Rossumda88dad1995-01-26 00:46:29 +000011298works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11300$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011303
11304#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011305int foo(int x, ...) {
11306 va_list va;
11307 va_start(va, x);
11308 va_arg(va, int);
11309 va_arg(va, char *);
11310 va_arg(va, double);
11311 return 0;
11312}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314int
11315main ()
11316{
Guido van Rossum90eea071996-08-30 20:58:57 +000011317return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
11324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011327 works=yes
11328
Guido van Rossum627b2d71993-12-24 10:39:16 +000011329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11332$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333
Martin v. Löwisd6320502004-08-12 13:45:08 +000011334# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11336$as_echo_n "checking for socketpair... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011338/* end confdefs.h. */
11339
11340#include <sys/types.h>
11341#include <sys/socket.h>
11342
11343int
11344main ()
11345{
11346void *x=socketpair
11347 ;
11348 return 0;
11349}
11350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011352
Matthias Kloseb9621712010-04-24 17:59:49 +000011353$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011354
Matthias Kloseb159a552010-04-25 21:00:44 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011356$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011357else
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011360
11361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011363
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011364# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11366$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011369#include <sys/types.h>
11370#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011374struct sockaddr x;
11375x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11382$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011385
11386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011389
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011392
Guido van Rossumda88dad1995-01-26 00:46:29 +000011393va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11395$as_echo_n "checking whether va_list is an array... " >&6; }
11396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011398
11399#ifdef HAVE_STDARG_PROTOTYPES
11400#include <stdarg.h>
11401#else
11402#include <varargs.h>
11403#endif
11404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405int
11406main ()
11407{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011408va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
11414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011415else
Skip Montanaro6dead952003-09-25 14:50:04 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Guido van Rossumda88dad1995-01-26 00:46:29 +000011420 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11425$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
11429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011431if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11436$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011437 OLD_CFLAGS=$CFLAGS
11438 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441
11442# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Martin v. Löwis11437992002-04-12 09:54:03 +000011444int
11445main ()
11446{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447
11448 char *name;
11449 struct hostent *he, *res;
11450 char buffer[2048];
11451 int buflen = 2048;
11452 int h_errnop;
11453
11454 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
11456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011463
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11468$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011470else
Skip Montanaro6dead952003-09-25 14:50:04 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473$as_echo "no" >&6; }
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11475$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011479# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011480
Martin v. Löwis11437992002-04-12 09:54:03 +000011481int
11482main ()
11483{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011484
11485 char *name;
11486 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011487 char buffer[2048];
11488 int buflen = 2048;
11489 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011490
Matthias Kloseb159a552010-04-25 21:00:44 +000011491 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
11493 ;
11494 return 0;
11495}
11496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011500
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Matthias Kloseb159a552010-04-25 21:00:44 +000011502$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11505$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011507else
Skip Montanaro6dead952003-09-25 14:50:04 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11512$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514/* end confdefs.h. */
11515
11516# include <netdb.h>
11517
11518int
11519main ()
11520{
11521
11522 char *name;
11523 struct hostent *he;
11524 struct hostent_data data;
11525
11526 (void) gethostbyname_r(name, he, &data);
11527
11528 ;
11529 return 0;
11530}
11531_ACEOF
11532if ac_fn_c_try_compile "$LINENO"; then :
11533
11534 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11535
11536
11537$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11538
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11540$as_echo "yes" >&6; }
11541
11542else
11543
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011555 CFLAGS=$OLD_CFLAGS
11556
11557else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011558
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 for ac_func in gethostbyname
11560do :
11561 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011562if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011564#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011565_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011567fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011568done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011569
Michael W. Hudson54241132001-12-07 15:38:26 +000011570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011571fi
11572
Michael W. Hudson54241132001-12-07 15:38:26 +000011573
11574
11575
11576
11577
11578
Guido van Rossum627b2d71993-12-24 10:39:16 +000011579# checks for system services
11580# (none yet)
11581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011582# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011583ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011584if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011585
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11588$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011589if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011591else
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011593LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597/* Override any GCC internal prototype to avoid an error.
11598 Use char because int might match the return type of a GCC
11599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011600#ifdef __cplusplus
11601extern "C"
11602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011603char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011604int
11605main ()
11606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ;
11609 return 0;
11610}
11611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011614else
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011617rm -f core conftest.err conftest.$ac_objext \
11618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011619LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11622$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011623if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 cat >>confdefs.h <<_ACEOF
11625#define HAVE_LIBIEEE 1
11626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011628 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011629
Guido van Rossum627b2d71993-12-24 10:39:16 +000011630fi
11631
Michael W. Hudson54241132001-12-07 15:38:26 +000011632
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011633fi
11634
Michael W. Hudson54241132001-12-07 15:38:26 +000011635
Guido van Rossum7f253911997-05-09 02:42:48 +000011636# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11638$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011643if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011644then
11645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11649$as_echo "yes" >&6; }
11650else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011652fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656fi
11657
Guido van Rossum7f253911997-05-09 02:42:48 +000011658
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659# check for --with-libm=...
11660
Guido van Rossum563e7081996-09-10 18:20:48 +000011661case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011662Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011663*) LIBM=-lm
11664esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11666$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011669if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011671if test "$withval" = no
11672then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11674$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011675elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011676then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11678$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011679else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011680fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011681else
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11683$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684fi
11685
Guido van Rossum7f43da71994-08-01 12:15:30 +000011686
11687# check for --with-libc=...
11688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11690$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011694 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011695if test "$withval" = no
11696then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11698$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011699elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011700then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11702$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011703else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011704fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11707$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708fi
11709
Guido van Rossum7f43da71994-08-01 12:15:30 +000011710
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711# **************************************************
11712# * Check for various properties of floating point *
11713# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11716$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011717if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719else
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722 ac_cv_little_endian_double=no
11723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011725/* end confdefs.h. */
11726
11727#include <string.h>
11728int main() {
11729 double x = 9006104071832581.0;
11730 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11731 return 0;
11732 else
11733 return 1;
11734}
11735
11736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738 ac_cv_little_endian_double=yes
11739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744fi
11745
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746fi
11747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11749$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750if test "$ac_cv_little_endian_double" = yes
11751then
11752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011754
11755fi
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11758$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011759if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761else
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764 ac_cv_big_endian_double=no
11765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767/* end confdefs.h. */
11768
11769#include <string.h>
11770int main() {
11771 double x = 9006104071832581.0;
11772 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11773 return 0;
11774 else
11775 return 1;
11776}
11777
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780 ac_cv_big_endian_double=yes
11781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786fi
11787
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11791$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011792if test "$ac_cv_big_endian_double" = yes
11793then
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011796
11797fi
11798
11799# Some ARM platforms use a mixed-endian representation for doubles.
11800# While Python doesn't currently have full support for these platforms
11801# (see e.g., issue 1762561), we can at least make sure that float <-> string
11802# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11804$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011805if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807else
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011810 ac_cv_mixed_endian_double=no
11811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011813/* end confdefs.h. */
11814
11815#include <string.h>
11816int main() {
11817 double x = 9006104071832581.0;
11818 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11819 return 0;
11820 else
11821 return 1;
11822}
11823
11824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011825if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826 ac_cv_mixed_endian_double=yes
11827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011832fi
11833
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834fi
11835
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11837$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838if test "$ac_cv_mixed_endian_double" = yes
11839then
11840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011842
11843fi
11844
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011845# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011846# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011847# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011848# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011849# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011850# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011851
11852# This inline assembler syntax may also work for suncc and icc,
11853# so we try it on all platforms.
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11856$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011858/* end confdefs.h. */
11859
11860int
11861main ()
11862{
11863
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011864 unsigned short cw;
11865 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11866 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011867
11868 ;
11869 return 0;
11870}
11871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011872if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011873 have_gcc_asm_for_x87=yes
11874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011876fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11879$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011880if test "$have_gcc_asm_for_x87" = yes
11881then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011884
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011886
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011887# Detect whether system arithmetic is subject to x87-style double
11888# rounding issues. The result of this test has little meaning on non
11889# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11890# mode is round-to-nearest and double rounding issues are present, and
11891# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11893$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011894# $BASECFLAGS may affect the result
11895ac_save_cc="$CC"
11896CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011898 ac_cv_x87_double_rounding=no
11899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901/* end confdefs.h. */
11902
11903#include <stdlib.h>
11904#include <math.h>
11905int main() {
11906 volatile double x, y, z;
11907 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11908 x = 0.99999999999999989; /* 1-2**-53 */
11909 y = 1./x;
11910 if (y != 1.)
11911 exit(0);
11912 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11913 x = 1e16;
11914 y = 2.99999;
11915 z = x + y;
11916 if (z != 1e16+4.)
11917 exit(0);
11918 /* both tests show evidence of double rounding */
11919 exit(1);
11920}
11921
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924 ac_cv_x87_double_rounding=no
11925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011930fi
11931
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011932CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11934$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935if test "$ac_cv_x87_double_rounding" = yes
11936then
11937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011939
11940fi
11941
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011942# ************************************
11943# * Check for mathematical functions *
11944# ************************************
11945
11946LIBS_SAVE=$LIBS
11947LIBS="$LIBS $LIBM"
11948
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011949for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11950do :
11951 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11952ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011953if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011954 cat >>confdefs.h <<_ACEOF
11955#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11956_ACEOF
11957
11958fi
11959done
11960
11961for ac_func in hypot lgamma log1p round tgamma
11962do :
11963 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11964ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011965if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011966 cat >>confdefs.h <<_ACEOF
11967#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11968_ACEOF
11969
11970fi
11971done
11972
11973ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11974"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011975if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011976 ac_have_decl=1
11977else
11978 ac_have_decl=0
11979fi
11980
11981cat >>confdefs.h <<_ACEOF
11982#define HAVE_DECL_ISINF $ac_have_decl
11983_ACEOF
11984ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11985"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011986if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011987 ac_have_decl=1
11988else
11989 ac_have_decl=0
11990fi
11991
11992cat >>confdefs.h <<_ACEOF
11993#define HAVE_DECL_ISNAN $ac_have_decl
11994_ACEOF
11995ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11996"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011997if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011998 ac_have_decl=1
11999else
12000 ac_have_decl=0
12001fi
12002
12003cat >>confdefs.h <<_ACEOF
12004#define HAVE_DECL_ISFINITE $ac_have_decl
12005_ACEOF
12006
12007
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012008# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12009# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12011$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012012if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012014else
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012017 ac_cv_tanh_preserves_zero_sign=no
12018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012020/* end confdefs.h. */
12021
12022#include <math.h>
12023#include <stdlib.h>
12024int main() {
12025 /* return 0 if either negative zeros don't exist
12026 on this platform or if negative zeros exist
12027 and tanh(-0.) == -0. */
12028 if (atan2(0., -1.) == atan2(-0., -1.) ||
12029 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12030 else exit(1);
12031}
12032
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012035 ac_cv_tanh_preserves_zero_sign=yes
12036else
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012041fi
12042
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012043fi
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12046$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012047if test "$ac_cv_tanh_preserves_zero_sign" = yes
12048then
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012051
12052fi
12053
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012054if test "$ac_cv_func_log1p" = yes
12055then
12056 # On some versions of AIX, log1p(-0.) returns 0. instead of
12057 # -0. See issue #9920.
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12059$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012060 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012061 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012062else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012063
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012064 if test "$cross_compiling" = yes; then :
12065 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012066else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012069
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012070 #include <math.h>
12071 #include <stdlib.h>
12072 int main() {
12073 /* Fail if the signs of log1p(-0.) and -0. can be
12074 distinguished. */
12075 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12076 return 0;
12077 else
12078 return 1;
12079 }
12080
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012081_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012082if ac_fn_c_try_run "$LINENO"; then :
12083 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012084else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012085 ac_cv_log1p_drops_zero_sign=yes
12086fi
12087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012089fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012090
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012091fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012092
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12094$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12095fi
12096if test "$ac_cv_log1p_drops_zero_sign" = yes
12097then
12098
12099$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12100
12101fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012102
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012103LIBS=$LIBS_SAVE
12104
Mark Dickinsona614f042009-11-28 12:48:43 +000012105# For multiprocessing module, check that sem_open
12106# actually works. For FreeBSD versions <= 7.2,
12107# the kernel module that provides POSIX semaphores
12108# isn't loaded by default, so an attempt to call
12109# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12111$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012112if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012116 ac_cv_posix_semaphores_enabled=yes
12117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012119/* end confdefs.h. */
12120
12121#include <unistd.h>
12122#include <fcntl.h>
12123#include <stdio.h>
12124#include <semaphore.h>
12125#include <sys/stat.h>
12126
12127int main(void) {
12128 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12129 if (a == SEM_FAILED) {
12130 perror("sem_open");
12131 return 1;
12132 }
12133 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012134 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012135 return 0;
12136}
12137
12138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012140 ac_cv_posix_semaphores_enabled=yes
12141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012146fi
12147
12148
Mark Dickinsona614f042009-11-28 12:48:43 +000012149fi
12150
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12152$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012153if test $ac_cv_posix_semaphores_enabled = no
12154then
12155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012157
12158fi
12159
Mark Dickinson10683072009-04-18 21:18:19 +000012160# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12162$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012163if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012168else
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012170/* end confdefs.h. */
12171
12172#include <unistd.h>
12173#include <fcntl.h>
12174#include <stdio.h>
12175#include <semaphore.h>
12176#include <sys/stat.h>
12177
12178int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012179 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012180 int count;
12181 int res;
12182 if(a==SEM_FAILED){
12183 perror("sem_open");
12184 return 1;
12185
12186 }
12187 res = sem_getvalue(a, &count);
12188 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012189 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012190 return res==-1 ? 1 : 0;
12191}
12192
Mark Dickinson10683072009-04-18 21:18:19 +000012193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012195 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012196else
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012201fi
12202
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012204fi
12205
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12207$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012208if test $ac_cv_broken_sem_getvalue = yes
12209then
12210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012212
12213fi
12214
Mark Dickinsonbd792642009-03-18 20:06:12 +000012215# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12217$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012218# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012219if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012220 enableval=$enable_big_digits; case $enable_big_digits in
12221yes)
12222 enable_big_digits=30 ;;
12223no)
12224 enable_big_digits=15 ;;
1222515|30)
12226 ;;
12227*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012228 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 +000012229esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12231$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012232
12233cat >>confdefs.h <<_ACEOF
12234#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12235_ACEOF
12236
12237
12238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12240$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012241fi
12242
12243
Guido van Rossumef2255b2000-03-10 22:30:29 +000012244# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012245ac_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 +000012246if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
12248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012250
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012251 wchar_h="yes"
12252
Guido van Rossumef2255b2000-03-10 22:30:29 +000012253else
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012255
12256fi
12257
Michael W. Hudson54241132001-12-07 15:38:26 +000012258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012260# determine wchar_t size
12261if test "$wchar_h" = yes
12262then
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12266# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12268$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012269if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12273"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 if test "$ac_cv_type_wchar_t" = yes; then
12277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012279as_fn_error 77 "cannot compute sizeof (wchar_t)
12280See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281 else
12282 ac_cv_sizeof_wchar_t=0
12283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285
Martin v. Löwis11437992002-04-12 09:54:03 +000012286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12288$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289
12290
12291
Martin v. Löwis11437992002-04-12 09:54:03 +000012292cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012293#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012294_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012295
Michael W. Hudson54241132001-12-07 15:38:26 +000012296
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012297fi
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12300$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012301have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012304
12305#include <tcl.h>
12306#if TCL_UTF_MAX != 6
12307# error "NOT UCS4_TCL"
12308#endif
12309int
12310main ()
12311{
12312
12313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012318
12319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012321
12322 have_ucs4_tcl=yes
12323
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12327$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012328
Skip Montanaro6dead952003-09-25 14:50:04 +000012329# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012330if test "$wchar_h" = yes
12331then
12332 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12334$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012335 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012337else
12338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012340 ac_cv_wchar_t_signed=yes
12341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012344
12345 #include <wchar.h>
12346 int main()
12347 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012348 /* Success: exit code 0 */
12349 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012350 }
12351
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012354 ac_cv_wchar_t_signed=yes
12355else
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12359 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012360fi
12361
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012362fi
12363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12365$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366fi
12367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12369$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012370
12371# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012373 withval=$with_wide_unicode;
12374if test "$withval" != no
12375then unicode_size="4"
12376else unicode_size="2"
12377fi
12378
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012379else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380
Georg Brandl52d168a2008-01-07 18:10:24 +000012381case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012382 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012383 *) unicode_size="2" ;;
12384esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012385
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012386fi
12387
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012388
12389
Georg Brandl52d168a2008-01-07 18:10:24 +000012390case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012391 4)
12392 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12393
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012394 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012395 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012397 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012398esac
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Georg Brandl52d168a2008-01-07 18:10:24 +000012402# wchar_t is only usable if it maps to an unsigned type
12403if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012404 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012405then
12406 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012411
Georg Brandl52d168a2008-01-07 18:10:24 +000012412elif test "$ac_cv_sizeof_short" = "$unicode_size"
12413then
12414 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012416
Georg Brandl52d168a2008-01-07 18:10:24 +000012417elif test "$ac_cv_sizeof_long" = "$unicode_size"
12418then
12419 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012421
Georg Brandl52d168a2008-01-07 18:10:24 +000012422else
12423 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12426$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012427
12428# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12430$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012431if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 ac_cv_c_bigendian=unknown
12435 # See if we're dealing with a universal compiler.
12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437/* end confdefs.h. */
12438#ifndef __APPLE_CC__
12439 not a universal capable compiler
12440 #endif
12441 typedef int dummy;
12442
Skip Montanaro6dead952003-09-25 14:50:04 +000012443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_compile "$LINENO"; then :
12445
12446 # Check for potential -arch flags. It is not universal unless
12447 # there are at least two -arch flags with different values.
12448 ac_arch=
12449 ac_prev=
12450 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12451 if test -n "$ac_prev"; then
12452 case $ac_word in
12453 i?86 | x86_64 | ppc | ppc64)
12454 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12455 ac_arch=$ac_word
12456 else
12457 ac_cv_c_bigendian=universal
12458 break
12459 fi
12460 ;;
12461 esac
12462 ac_prev=
12463 elif test "x$ac_word" = "x-arch"; then
12464 ac_prev=arch
12465 fi
12466 done
12467fi
12468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12469 if test $ac_cv_c_bigendian = unknown; then
12470 # See if sys/param.h defines the BYTE_ORDER macro.
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012475
Martin v. Löwis11437992002-04-12 09:54:03 +000012476int
12477main ()
12478{
Matthias Kloseb9621712010-04-24 17:59:49 +000012479#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12480 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12481 && LITTLE_ENDIAN)
12482 bogus endian macros
12483 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
12485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012490 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012492/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012493#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495
Martin v. Löwis11437992002-04-12 09:54:03 +000012496int
12497main ()
12498{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012499#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 not big endian
12501 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
12503 ;
12504 return 0;
12505}
12506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012507if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012508 ac_cv_c_bigendian=yes
12509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012513fi
12514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12515 fi
12516 if test $ac_cv_c_bigendian = unknown; then
12517 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012519/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012520#include <limits.h>
12521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Matthias Kloseb9621712010-04-24 17:59:49 +000012525#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12526 bogus endian macros
12527 #endif
12528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ;
12530 return 0;
12531}
12532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533if ac_fn_c_try_compile "$LINENO"; then :
12534 # It does; now see whether it defined to _BIG_ENDIAN or not.
12535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536/* end confdefs.h. */
12537#include <limits.h>
12538
12539int
12540main ()
12541{
12542#ifndef _BIG_ENDIAN
12543 not big endian
12544 #endif
12545
12546 ;
12547 return 0;
12548}
12549_ACEOF
12550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12556fi
12557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12558 fi
12559 if test $ac_cv_c_bigendian = unknown; then
12560 # Compile a test program.
12561 if test "$cross_compiling" = yes; then :
12562 # Try to guess by grepping values from an object file.
12563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564/* end confdefs.h. */
12565short int ascii_mm[] =
12566 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12567 short int ascii_ii[] =
12568 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12569 int use_ascii (int i) {
12570 return ascii_mm[i] + ascii_ii[i];
12571 }
12572 short int ebcdic_ii[] =
12573 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12574 short int ebcdic_mm[] =
12575 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12576 int use_ebcdic (int i) {
12577 return ebcdic_mm[i] + ebcdic_ii[i];
12578 }
12579 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581int
12582main ()
12583{
12584return use_ascii (foo) == use_ebcdic (foo);
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589if ac_fn_c_try_compile "$LINENO"; then :
12590 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12591 ac_cv_c_bigendian=yes
12592 fi
12593 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12594 if test "$ac_cv_c_bigendian" = unknown; then
12595 ac_cv_c_bigendian=no
12596 else
12597 # finding both strings is unlikely to happen, but who knows?
12598 ac_cv_c_bigendian=unknown
12599 fi
12600 fi
12601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012603else
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 /* Are we little or big endian? From Harbison&Steele. */
12612 union
12613 {
12614 long int l;
12615 char c[sizeof (long int)];
12616 } u;
12617 u.l = 1;
12618 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619
12620 ;
12621 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012622}
Martin v. Löwis11437992002-04-12 09:54:03 +000012623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012625 ac_cv_c_bigendian=no
12626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12636$as_echo "$ac_cv_c_bigendian" >&6; }
12637 case $ac_cv_c_bigendian in #(
12638 yes)
12639 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12640;; #(
12641 no)
12642 ;; #(
12643 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012644
Matthias Kloseb9621712010-04-24 17:59:49 +000012645$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 ;; #(
12648 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012649 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012650 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012652
Michael W. Hudson54241132001-12-07 15:38:26 +000012653
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012654# ABI version string for Python extension modules. This appears between the
12655# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12656# from the following attributes which affect the ABI of this Python build (in
12657# this order):
12658#
12659# * The Python implementation (always 'cpython-' for us)
12660# * The major and minor version numbers
12661# * --with-pydebug (adds a 'd')
12662# * --with-pymalloc (adds a 'm')
12663# * --with-wide-unicode (adds a 'u')
12664#
12665# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012666# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12667# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012668
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12670$as_echo_n "checking ABIFLAGS... " >&6; }
12671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12672$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12674$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012675SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12677$as_echo "$SOABI" >&6; }
12678
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12680$as_echo_n "checking LDVERSION... " >&6; }
12681LDVERSION='$(VERSION)$(ABIFLAGS)'
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12683$as_echo "$LDVERSION" >&6; }
12684
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012685# SO is the extension of shared libraries `(including the dot!)
12686# -- usually .so, .sl on HP-UX, .dll on Cygwin
12687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12688$as_echo_n "checking SO... " >&6; }
12689if test -z "$SO"
12690then
12691 case $ac_sys_system in
12692 hp*|HP*)
12693 case `uname -m` in
12694 ia64) SO=.so;;
12695 *) SO=.sl;;
12696 esac
12697 ;;
12698 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012699 Linux*|GNU*)
12700 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012701 *) SO=.so;;
12702 esac
12703else
12704 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012705 echo
12706 echo '====================================================================='
12707 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012708 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012709 echo '+ Do you really mean to change the extension for shared libraries? +'
12710 echo '+ Continuing in 10 seconds to let you to ponder. +'
12711 echo '+ +'
12712 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012713 sleep 10
12714fi
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12716$as_echo "$SO" >&6; }
12717
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012718# Check whether right shifting a negative integer extends the sign bit
12719# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12721$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012722if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012724else
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012727 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012731
12732int main()
12733{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012734 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012735}
12736
Martin v. Löwis11437992002-04-12 09:54:03 +000012737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012738if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012739 ac_cv_rshift_extends_sign=yes
12740else
Matthias Kloseb9621712010-04-24 17:59:49 +000012741 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012745fi
12746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747fi
12748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12750$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012751if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012752then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012755
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012756fi
12757
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012758# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12760$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012761if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012763else
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012766/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012767#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012768int
12769main ()
12770{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012771
12772 FILE *f = fopen("/dev/null", "r");
12773 flockfile(f);
12774 getc_unlocked(f);
12775 funlockfile(f);
12776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ;
12778 return 0;
12779}
12780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012782 ac_cv_have_getc_unlocked=yes
12783else
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 ac_cv_have_getc_unlocked=no
12785fi
12786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12791$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012792if test "$ac_cv_have_getc_unlocked" = yes
12793then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012796
12797fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012798
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012799# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012800# save the value of LIBS so we don't actually link Python with readline
12801LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012802
Gregory P. Smith18820942008-09-07 06:24:49 +000012803# On some systems we need to link readline to a termcap compatible
12804# library. NOTE: Keep the precedence of listed libraries synchronised
12805# with setup.py.
12806py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12808$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012809for py_libtermcap in "" ncursesw ncurses curses termcap; do
12810 if test -z "$py_libtermcap"; then
12811 READLINE_LIBS="-lreadline"
12812 else
12813 READLINE_LIBS="-lreadline -l$py_libtermcap"
12814 fi
12815 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012817/* end confdefs.h. */
12818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819/* Override any GCC internal prototype to avoid an error.
12820 Use char because int might match the return type of a GCC
12821 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012822#ifdef __cplusplus
12823extern "C"
12824#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012825char readline ();
12826int
12827main ()
12828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012830 ;
12831 return 0;
12832}
12833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012834if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012835 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837rm -f core conftest.err conftest.$ac_objext \
12838 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012839 if test $py_cv_lib_readline = yes; then
12840 break
12841 fi
12842done
12843# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12844#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012845if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12847$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12850$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012853
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012854fi
12855
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12858$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012859if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012861else
12862 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012863LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865/* end confdefs.h. */
12866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867/* Override any GCC internal prototype to avoid an error.
12868 Use char because int might match the return type of a GCC
12869 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870#ifdef __cplusplus
12871extern "C"
12872#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012873char rl_callback_handler_install ();
12874int
12875main ()
12876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012878 ;
12879 return 0;
12880}
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012883 ac_cv_lib_readline_rl_callback_handler_install=yes
12884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887rm -f core conftest.err conftest.$ac_objext \
12888 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012889LIBS=$ac_check_lib_save_LIBS
12890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12892$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012893if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012896
12897fi
12898
12899
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012900# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012903#include <readline/readline.h>
12904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012906 have_readline=yes
12907else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012908 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012909
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012910fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012911rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012912if test $have_readline = yes
12913then
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012915/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012916#include <readline/readline.h>
12917
12918_ACEOF
12919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012923
12924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012925rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012928/* end confdefs.h. */
12929#include <readline/readline.h>
12930
12931_ACEOF
12932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012936
12937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012938rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012939
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012940fi
12941
Martin v. Löwis0daad592001-09-30 21:09:59 +000012942# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12944$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012945if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012947else
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012949LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953/* Override any GCC internal prototype to avoid an error.
12954 Use char because int might match the return type of a GCC
12955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012956#ifdef __cplusplus
12957extern "C"
12958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012959char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012960int
12961main ()
12962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ;
12965 return 0;
12966}
12967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973rm -f core conftest.err conftest.$ac_objext \
12974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012975LIBS=$ac_check_lib_save_LIBS
12976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12978$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012979if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012982
Martin v. Löwis0daad592001-09-30 21:09:59 +000012983fi
12984
Michael W. Hudson54241132001-12-07 15:38:26 +000012985
Thomas Wouters89d996e2007-09-08 17:39:28 +000012986# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12988$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012989if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012991else
12992 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012993LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012995/* end confdefs.h. */
12996
12997/* Override any GCC internal prototype to avoid an error.
12998 Use char because int might match the return type of a GCC
12999 builtin and then its argument prototype would still apply. */
13000#ifdef __cplusplus
13001extern "C"
13002#endif
13003char rl_completion_display_matches_hook ();
13004int
13005main ()
13006{
13007return rl_completion_display_matches_hook ();
13008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013013 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017rm -f core conftest.err conftest.$ac_objext \
13018 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013019LIBS=$ac_check_lib_save_LIBS
13020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13022$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013023if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013026
13027fi
13028
13029
Martin v. Löwis0daad592001-09-30 21:09:59 +000013030# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13032$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013033if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013035else
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013037LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041/* Override any GCC internal prototype to avoid an error.
13042 Use char because int might match the return type of a GCC
13043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013044#ifdef __cplusplus
13045extern "C"
13046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013047char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013048int
13049main ()
13050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 ;
13053 return 0;
13054}
13055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013061rm -f core conftest.err conftest.$ac_objext \
13062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013063LIBS=$ac_check_lib_save_LIBS
13064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13066$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013067if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013070
Guido van Rossum353ae582001-07-10 16:45:32 +000013071fi
13072
Jack Jansendd19cf82001-12-06 22:36:17 +000013073
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013074# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076/* end confdefs.h. */
13077#include <readline/readline.h>
13078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013080 have_readline=yes
13081else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013082 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013083
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013084fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013085rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013086if test $have_readline = yes
13087then
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013089/* end confdefs.h. */
13090#include <readline/readline.h>
13091
13092_ACEOF
13093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013097
13098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013099rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013100
13101fi
13102
Martin v. Löwis82bca632006-02-10 20:49:30 +000013103# End of readline checks: restore LIBS
13104LIBS=$LIBS_no_readline
13105
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13107$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013108if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013113 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013117
13118int main()
13119{
13120 int val1 = nice(1);
13121 if (val1 != -1 && val1 == nice(2))
13122 exit(0);
13123 exit(1);
13124}
13125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013127if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013128 ac_cv_broken_nice=yes
13129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013134fi
13135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13139$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013140if test "$ac_cv_broken_nice" = yes
13141then
Martin v. Löwis11437992002-04-12 09:54:03 +000013142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013144
13145fi
13146
Matthias Kloseb9621712010-04-24 17:59:49 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13148$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013149if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013153 ac_cv_broken_poll=no
13154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013156/* end confdefs.h. */
13157
13158#include <poll.h>
13159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160int main()
13161{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013162 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013164
13165 close (42);
13166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013168 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013170 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013171 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013172 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013173 return 1;
13174}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013175
13176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013177if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013178 ac_cv_broken_poll=yes
13179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186fi
13187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13189$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013190if test "$ac_cv_broken_poll" = yes
13191then
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013194
13195fi
13196
Brett Cannon43802422005-02-10 20:48:03 +000013197# 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 +000013198# (which is not required by ISO C or UNIX spec) and/or if we support
13199# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013200ac_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 +000013201#include <$ac_cv_struct_tm>
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013204if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013205
13206cat >>confdefs.h <<_ACEOF
13207#define HAVE_STRUCT_TM_TM_ZONE 1
13208_ACEOF
13209
13210
13211fi
13212
13213if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013216
13217else
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13219"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013220if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224fi
13225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013227#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228_ACEOF
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13231$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013232if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013236/* end confdefs.h. */
13237#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238#if !HAVE_DECL_TZNAME
13239extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013240#endif
13241
13242int
13243main ()
13244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013246 ;
13247 return 0;
13248}
13249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013250if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013251 ac_cv_var_tzname=yes
13252else
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013255rm -f core conftest.err conftest.$ac_objext \
13256 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13259$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013260 if test $ac_cv_var_tzname = yes; then
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013263
13264 fi
13265fi
13266
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013267
Martin v. Löwis1d459062005-03-14 21:23:33 +000013268# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13270$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013271if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273else
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013276 ac_cv_working_tzset=no
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013280
13281#include <stdlib.h>
13282#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013283#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013284
13285#if HAVE_TZNAME
13286extern char *tzname[];
13287#endif
13288
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013289int main()
13290{
Brett Cannon18367812003-09-19 00:59:16 +000013291 /* Note that we need to ensure that not only does tzset(3)
13292 do 'something' with localtime, but it works as documented
13293 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013294 This includes making sure that tzname is set properly if
13295 tm->tm_zone does not exist since it is the alternative way
13296 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013297
13298 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013299 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013300 */
13301
Martin v. Löwis1d459062005-03-14 21:23:33 +000013302 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013303 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13304
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013305 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013306 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013307 if (localtime(&groundhogday)->tm_hour != 0)
13308 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013309#if HAVE_TZNAME
13310 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13311 if (strcmp(tzname[0], "UTC") ||
13312 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13313 exit(1);
13314#endif
Brett Cannon18367812003-09-19 00:59:16 +000013315
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013316 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013318 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013319 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013320#if HAVE_TZNAME
13321 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13322 exit(1);
13323#endif
Brett Cannon18367812003-09-19 00:59:16 +000013324
13325 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13326 tzset();
13327 if (localtime(&groundhogday)->tm_hour != 11)
13328 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013329#if HAVE_TZNAME
13330 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13331 exit(1);
13332#endif
13333
13334#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013335 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13336 exit(1);
13337 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13338 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013339#endif
Brett Cannon18367812003-09-19 00:59:16 +000013340
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013341 exit(0);
13342}
13343
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013346 ac_cv_working_tzset=yes
13347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013352fi
13353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354fi
13355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13357$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013358if test "$ac_cv_working_tzset" = yes
13359then
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013362
13363fi
13364
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013365# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13367$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013368if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013372/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013373#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013374int
13375main ()
13376{
13377
13378struct stat st;
13379st.st_mtim.tv_nsec = 1;
13380
13381 ;
13382 return 0;
13383}
13384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013386 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013387else
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13391fi
13392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13394$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013395if test "$ac_cv_stat_tv_nsec" = yes
13396then
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013399
13400fi
13401
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013402# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13404$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013405if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013409/* end confdefs.h. */
13410#include <sys/stat.h>
13411int
13412main ()
13413{
13414
13415struct stat st;
13416st.st_mtimespec.tv_nsec = 1;
13417
13418 ;
13419 return 0;
13420}
13421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013423 ac_cv_stat_tv_nsec2=yes
13424else
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13431$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013432if test "$ac_cv_stat_tv_nsec2" = yes
13433then
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013436
13437fi
13438
Jack Jansen666b1e72001-10-31 12:11:48 +000013439# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13441$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013442if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013446/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013447#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013448int
13449main ()
13450{
Jack Jansen666b1e72001-10-31 12:11:48 +000013451
13452 int rtn;
13453 rtn = mvwdelch(0,0,0);
13454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ;
13456 return 0;
13457}
13458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013460 ac_cv_mvwdelch_is_expression=yes
13461else
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13465fi
13466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13468$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013469
13470if test "$ac_cv_mvwdelch_is_expression" = yes
13471then
Martin v. Löwis11437992002-04-12 09:54:03 +000013472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013474
13475fi
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13478$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013479if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013481else
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013483/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013484#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013485int
13486main ()
13487{
Jack Jansen666b1e72001-10-31 12:11:48 +000013488
13489 WINDOW *w;
13490 w->_flags = 0;
13491
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013497 ac_cv_window_has_flags=yes
13498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13502fi
13503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13505$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013506
Jack Jansen666b1e72001-10-31 12:11:48 +000013507
13508if test "$ac_cv_window_has_flags" = yes
13509then
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013512
13513fi
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13516$as_echo_n "checking for is_term_resized... " >&6; }
13517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013518/* end confdefs.h. */
13519#include <curses.h>
13520int
13521main ()
13522{
13523void *x=is_term_resized
13524 ;
13525 return 0;
13526}
13527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531
Matthias Kloseb159a552010-04-25 21:00:44 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13536$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013537
13538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13542$as_echo_n "checking for resize_term... " >&6; }
13543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013544/* end confdefs.h. */
13545#include <curses.h>
13546int
13547main ()
13548{
13549void *x=resize_term
13550 ;
13551 return 0;
13552}
13553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013554if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013557
Matthias Kloseb159a552010-04-25 21:00:44 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013559$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13562$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013563
13564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13568$as_echo_n "checking for resizeterm... " >&6; }
13569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013570/* end confdefs.h. */
13571#include <curses.h>
13572int
13573main ()
13574{
13575void *x=resizeterm
13576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013580if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013583
Matthias Kloseb159a552010-04-25 21:00:44 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13588$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013589
13590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13594$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013595
13596if test -r /dev/ptmx
13597then
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13599$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013602
Thomas Wouters89f507f2006-12-13 04:49:30 +000013603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13605$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013606fi
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13609$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013610
13611if test -r /dev/ptc
13612then
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13614$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013617
Thomas Wouters89f507f2006-12-13 04:49:30 +000013618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13620$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013621fi
13622
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013623if test "$have_long_long" = yes
13624then
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13626$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013627 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013631 ac_cv_have_long_long_format=no
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013634/* end confdefs.h. */
13635
13636 #include <stdio.h>
13637 #include <stddef.h>
13638 #include <string.h>
13639
13640 #ifdef HAVE_SYS_TYPES_H
13641 #include <sys/types.h>
13642 #endif
13643
13644 int main()
13645 {
13646 char buffer[256];
13647
13648 if (sprintf(buffer, "%lld", (long long)123) < 0)
13649 return 1;
13650 if (strcmp(buffer, "123"))
13651 return 1;
13652
13653 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13654 return 1;
13655 if (strcmp(buffer, "-123"))
13656 return 1;
13657
13658 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13659 return 1;
13660 if (strcmp(buffer, "123"))
13661 return 1;
13662
13663 return 0;
13664 }
13665
13666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013668 ac_cv_have_long_long_format=yes
13669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013674fi
13675
13676
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013677fi
13678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13680$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013681fi
13682
Mark Dickinson89d7d412009-12-31 20:50:59 +000013683if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013684then
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013687
13688fi
13689
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013690if test $ac_sys_system = Darwin
13691then
13692 LIBS="$LIBS -framework CoreFoundation"
13693fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013694
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13696$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013697if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013701 ac_cv_have_size_t_format="cross -- assuming yes"
13702
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013705/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013706
Thomas Wouters477c8d52006-05-27 19:21:47 +000013707#include <stdio.h>
13708#include <stddef.h>
13709#include <string.h>
13710
Christian Heimes2c181612007-12-17 20:04:13 +000013711#ifdef HAVE_SYS_TYPES_H
13712#include <sys/types.h>
13713#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013714
13715#ifdef HAVE_SSIZE_T
13716typedef ssize_t Py_ssize_t;
13717#elif SIZEOF_VOID_P == SIZEOF_LONG
13718typedef long Py_ssize_t;
13719#else
13720typedef int Py_ssize_t;
13721#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013722
Christian Heimes2c181612007-12-17 20:04:13 +000013723int main()
13724{
13725 char buffer[256];
13726
Thomas Wouters477c8d52006-05-27 19:21:47 +000013727 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13728 return 1;
13729
Thomas Wouters89f507f2006-12-13 04:49:30 +000013730 if (strcmp(buffer, "123"))
13731 return 1;
13732
13733 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13734 return 1;
13735
13736 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013737 return 1;
13738
13739 return 0;
13740}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741
Thomas Wouters477c8d52006-05-27 19:21:47 +000013742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013744 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013750fi
13751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13754$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013755if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013758
13759fi
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013762#ifdef HAVE_SYS_TYPES_H
13763#include <sys/types.h>
13764#endif
13765#ifdef HAVE_SYS_SOCKET_H
13766#include <sys/socket.h>
13767#endif
13768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013770if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013771
Martin v. Löwis11437992002-04-12 09:54:03 +000013772else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013775
13776fi
13777
Michael W. Hudson54241132001-12-07 15:38:26 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13780$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013781if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013785 ac_cv_broken_mbstowcs=no
13786else
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013788/* end confdefs.h. */
13789
13790#include<stdlib.h>
13791int main() {
13792 size_t len = -1;
13793 const char *str = "text";
13794 len = mbstowcs(NULL, str, 0);
13795 return (len != 4);
13796}
13797
13798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013800 ac_cv_broken_mbstowcs=no
13801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013806fi
13807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013808fi
13809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13811$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013812if test "$ac_cv_broken_mbstowcs" = yes
13813then
13814
Matthias Kloseb9621712010-04-24 17:59:49 +000013815$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013816
13817fi
13818
Antoine Pitrou042b1282010-08-13 21:15:58 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13820$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013821if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013822 $as_echo_n "(cached) " >&6
13823else
13824 if test "$cross_compiling" = yes; then :
13825 ac_cv_computed_gotos=no
13826else
13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828/* end confdefs.h. */
13829
13830int main(int argc, char **argv)
13831{
13832 static void *targets[1] = { &&LABEL1 };
13833 goto LABEL2;
13834LABEL1:
13835 return 0;
13836LABEL2:
13837 goto *targets[0];
13838 return 1;
13839}
13840
13841_ACEOF
13842if ac_fn_c_try_run "$LINENO"; then :
13843 ac_cv_computed_gotos=yes
13844else
13845 ac_cv_computed_gotos=no
13846fi
13847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13848 conftest.$ac_objext conftest.beam conftest.$ac_ext
13849fi
13850
13851fi
13852
13853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13854$as_echo "$ac_cv_computed_gotos" >&6; }
13855if test "$ac_cv_computed_gotos" = yes
13856then
13857
13858$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13859
13860fi
13861
Antoine Pitroub52ec782009-01-25 16:34:23 +000013862# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13864$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013865
13866# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013868 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013869if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013870then
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13875$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013876fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013877if test "$withval" = no
13878then
13879
13880$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13883$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013884fi
13885
Antoine Pitrou042b1282010-08-13 21:15:58 +000013886else
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13888$as_echo "no value specified" >&6; }
13889fi
13890
Antoine Pitroub52ec782009-01-25 16:34:23 +000013891
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013892case $ac_sys_system in
13893AIX*)
13894
13895$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13896 ;;
13897esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013898
Michael W. Hudson54241132001-12-07 15:38:26 +000013899
Jesus Cea6a792292010-05-03 21:18:48 +000013900case $ac_sys_system in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013901 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 +000013902esac
13903
Gregory P. Smith138fa432010-12-13 08:00:52 +000013904ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013905if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013906
13907$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13908
13909fi
Jesus Cea6a792292010-05-03 21:18:48 +000013910
13911
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013912
13913
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013914for h in `(cd $srcdir;echo Python/thread_*.h)`
13915do
13916 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13917done
13918
Michael W. Hudson54241132001-12-07 15:38:26 +000013919
Neal Norwitzd24499d2005-12-18 21:36:39 +000013920SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13922$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013923for dir in $SRCDIRS; do
13924 if test ! -d $dir; then
13925 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013926 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013927done
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13929$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013930
Guido van Rossum627b2d71993-12-24 10:39:16 +000013931# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013932ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013933
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013934ac_config_files="$ac_config_files Modules/ld_so_aix"
13935
Martin v. Löwis11437992002-04-12 09:54:03 +000013936cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013937# This file is a shell script that caches the results of configure
13938# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013939# scripts and configure runs, see configure's option --config-cache.
13940# It is not useful on other systems. If it contains results you don't
13941# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942#
Martin v. Löwis11437992002-04-12 09:54:03 +000013943# config.status only pays attention to the cache file if you give it
13944# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013945#
Skip Montanaro6dead952003-09-25 14:50:04 +000013946# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013947# loading this file, other *unset* `ac_cv_foo' will be assigned the
13948# following values.
13949
13950_ACEOF
13951
Guido van Rossumf78abae1997-01-21 22:02:36 +000013952# The following way of writing the cache mishandles newlines in values,
13953# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013955# Ultrix sh set writes to stderr and can't be redirected directly,
13956# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957(
13958 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13959 eval ac_val=\$$ac_var
13960 case $ac_val in #(
13961 *${as_nl}*)
13962 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13964$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965 esac
13966 case $ac_var in #(
13967 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13969 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970 esac ;;
13971 esac
13972 done
13973
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13976 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 # `set' does not quote correctly, so add quotes: double-quote
13978 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013980 "s/'/'\\\\''/g;
13981 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 *)
13984 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 esac |
13988 sort
13989) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13995 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013996 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13997 :end' >>confcache
13998if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13999 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014000 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14002$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014003 if test ! -f "$cache_file" || test -h "$cache_file"; then
14004 cat confcache >"$cache_file"
14005 else
14006 case $cache_file in #(
14007 */* | ?:*)
14008 mv -f confcache "$cache_file"$$ &&
14009 mv -f "$cache_file"$$ "$cache_file" ;; #(
14010 *)
14011 mv -f confcache "$cache_file" ;;
14012 esac
14013 fi
14014 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014015 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14017$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014018 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014020rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014021
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014022test "x$prefix" = xNONE && prefix=$ac_default_prefix
14023# Let make expand exec_prefix.
14024test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014026DEFS=-DHAVE_CONFIG_H
14027
Skip Montanaro6dead952003-09-25 14:50:04 +000014028ac_libobjs=
14029ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014030U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014031for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14032 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14036 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14038 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014039done
14040LIBOBJS=$ac_libobjs
14041
14042LTLIBOBJS=$ac_ltlibobjs
14043
14044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014047: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014048ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014049ac_clean_files_save=$ac_clean_files
14050ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14052$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14053as_write_fail=0
14054cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014055#! $SHELL
14056# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014057# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014058# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014059# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014060
Martin v. Löwis11437992002-04-12 09:54:03 +000014061debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014062ac_cs_recheck=false
14063ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065SHELL=\${CONFIG_SHELL-$SHELL}
14066export SHELL
14067_ASEOF
14068cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14069## -------------------- ##
14070## M4sh Initialization. ##
14071## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073# Be more Bourne compatible
14074DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014075if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014076 emulate sh
14077 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014079 # is contrary to our usage. Disable this feature.
14080 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014082else
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 case `(set -o) 2>/dev/null` in #(
14084 *posix*) :
14085 set -o posix ;; #(
14086 *) :
14087 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014089fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014090
14091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092as_nl='
14093'
14094export as_nl
14095# Printing a long string crashes Solaris 7 /usr/bin/printf.
14096as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14097as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14098as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14099# Prefer a ksh shell builtin over an external printf program on Solaris,
14100# but without wasting forks for bash or zsh.
14101if test -z "$BASH_VERSION$ZSH_VERSION" \
14102 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14103 as_echo='print -r --'
14104 as_echo_n='print -rn --'
14105elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14106 as_echo='printf %s\n'
14107 as_echo_n='printf %s'
14108else
14109 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14110 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14111 as_echo_n='/usr/ucb/echo -n'
14112 else
14113 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14114 as_echo_n_body='eval
14115 arg=$1;
14116 case $arg in #(
14117 *"$as_nl"*)
14118 expr "X$arg" : "X\\(.*\\)$as_nl";
14119 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14120 esac;
14121 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14122 '
14123 export as_echo_n_body
14124 as_echo_n='sh -c $as_echo_n_body as_echo'
14125 fi
14126 export as_echo_body
14127 as_echo='sh -c $as_echo_body as_echo'
14128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014129
14130# The user is always right.
14131if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 PATH_SEPARATOR=:
14133 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14134 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14135 PATH_SEPARATOR=';'
14136 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139
14140# IFS
14141# We need space, tab and new line, in precisely that order. Quoting is
14142# there to prevent editors from complaining about space-tab.
14143# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14144# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145IFS=" "" $as_nl"
14146
14147# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014148as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014149case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 *[\\/]* ) as_myself=$0 ;;
14151 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014152for as_dir in $PATH
14153do
14154 IFS=$as_save_IFS
14155 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14157 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 ;;
14161esac
14162# We did not find ourselves, most probably we were run as `sh COMMAND'
14163# in which case we are not to be found in the path.
14164if test "x$as_myself" = x; then
14165 as_myself=$0
14166fi
14167if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14169 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
14171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172# Unset variables that we do not need and which cause bugs (e.g. in
14173# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14174# suppresses any "Segmentation fault" message there. '((' could
14175# trigger a bug in pdksh 5.2.14.
14176for as_var in BASH_ENV ENV MAIL MAILPATH
14177do eval test x\${$as_var+set} = xset \
14178 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179done
14180PS1='$ '
14181PS2='> '
14182PS4='+ '
14183
14184# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014185LC_ALL=C
14186export LC_ALL
14187LANGUAGE=C
14188export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190# CDPATH.
14191(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14192
14193
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014194# as_fn_error STATUS ERROR [LINENO LOG_FD]
14195# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014196# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14197# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014198# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014199as_fn_error ()
14200{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014201 as_status=$1; test $as_status -eq 0 && as_status=1
14202 if test "$4"; then
14203 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14204 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014206 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 as_fn_exit $as_status
14208} # as_fn_error
14209
14210
14211# as_fn_set_status STATUS
14212# -----------------------
14213# Set $? to STATUS, without forking.
14214as_fn_set_status ()
14215{
14216 return $1
14217} # as_fn_set_status
14218
14219# as_fn_exit STATUS
14220# -----------------
14221# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14222as_fn_exit ()
14223{
14224 set +e
14225 as_fn_set_status $1
14226 exit $1
14227} # as_fn_exit
14228
14229# as_fn_unset VAR
14230# ---------------
14231# Portably unset VAR.
14232as_fn_unset ()
14233{
14234 { eval $1=; unset $1;}
14235}
14236as_unset=as_fn_unset
14237# as_fn_append VAR VALUE
14238# ----------------------
14239# Append the text in VALUE to the end of the definition contained in VAR. Take
14240# advantage of any shell optimizations that allow amortized linear growth over
14241# repeated appends, instead of the typical quadratic growth present in naive
14242# implementations.
14243if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14244 eval 'as_fn_append ()
14245 {
14246 eval $1+=\$2
14247 }'
14248else
14249 as_fn_append ()
14250 {
14251 eval $1=\$$1\$2
14252 }
14253fi # as_fn_append
14254
14255# as_fn_arith ARG...
14256# ------------------
14257# Perform arithmetic evaluation on the ARGs, and store the result in the
14258# global $as_val. Take advantage of shells that can avoid forks. The arguments
14259# must be portable across $(()) and expr.
14260if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14261 eval 'as_fn_arith ()
14262 {
14263 as_val=$(( $* ))
14264 }'
14265else
14266 as_fn_arith ()
14267 {
14268 as_val=`expr "$@" || test $? -eq 1`
14269 }
14270fi # as_fn_arith
14271
14272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273if expr a : '\(a\)' >/dev/null 2>&1 &&
14274 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14275 as_expr=expr
14276else
14277 as_expr=false
14278fi
14279
14280if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14281 as_basename=basename
14282else
14283 as_basename=false
14284fi
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14287 as_dirname=dirname
14288else
14289 as_dirname=false
14290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292as_me=`$as_basename -- "$0" ||
14293$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14294 X"$0" : 'X\(//\)$' \| \
14295 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014296$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297 sed '/^.*\/\([^/][^/]*\)\/*$/{
14298 s//\1/
14299 q
14300 }
14301 /^X\/\(\/\/\)$/{
14302 s//\1/
14303 q
14304 }
14305 /^X\/\(\/\).*/{
14306 s//\1/
14307 q
14308 }
14309 s/.*/./; q'`
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311# Avoid depending upon Character Ranges.
14312as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14313as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14314as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14315as_cr_digits='0123456789'
14316as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014317
14318ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014319case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 xy) ECHO_C='\c';;
14324 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14325 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326 esac;;
14327*)
14328 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330
Martin v. Löwis11437992002-04-12 09:54:03 +000014331rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332if test -d conf$$.dir; then
14333 rm -f conf$$.dir/conf$$.file
14334else
14335 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014338if (echo >conf$$.file) 2>/dev/null; then
14339 if ln -s conf$$.file conf$$ 2>/dev/null; then
14340 as_ln_s='ln -s'
14341 # ... but there are two gotchas:
14342 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14343 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14344 # In both cases, we have to default to `cp -p'.
14345 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14346 as_ln_s='cp -p'
14347 elif ln conf$$.file conf$$ 2>/dev/null; then
14348 as_ln_s=ln
14349 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014352else
14353 as_ln_s='cp -p'
14354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14356rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014357
Matthias Kloseb9621712010-04-24 17:59:49 +000014358
14359# as_fn_mkdir_p
14360# -------------
14361# Create "$as_dir" as a directory, including parents if necessary.
14362as_fn_mkdir_p ()
14363{
14364
14365 case $as_dir in #(
14366 -*) as_dir=./$as_dir;;
14367 esac
14368 test -d "$as_dir" || eval $as_mkdir_p || {
14369 as_dirs=
14370 while :; do
14371 case $as_dir in #(
14372 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14373 *) as_qdir=$as_dir;;
14374 esac
14375 as_dirs="'$as_qdir' $as_dirs"
14376 as_dir=`$as_dirname -- "$as_dir" ||
14377$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14378 X"$as_dir" : 'X\(//\)[^/]' \| \
14379 X"$as_dir" : 'X\(//\)$' \| \
14380 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14381$as_echo X"$as_dir" |
14382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14383 s//\1/
14384 q
14385 }
14386 /^X\(\/\/\)[^/].*/{
14387 s//\1/
14388 q
14389 }
14390 /^X\(\/\/\)$/{
14391 s//\1/
14392 q
14393 }
14394 /^X\(\/\).*/{
14395 s//\1/
14396 q
14397 }
14398 s/.*/./; q'`
14399 test -d "$as_dir" && break
14400 done
14401 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014402 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014403
14404
14405} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014406if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014408else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014409 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014410 as_mkdir_p=false
14411fi
14412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413if test -x / >/dev/null 2>&1; then
14414 as_test_x='test -x'
14415else
14416 if ls -dL / >/dev/null 2>&1; then
14417 as_ls_L_option=L
14418 else
14419 as_ls_L_option=
14420 fi
14421 as_test_x='
14422 eval sh -c '\''
14423 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 case $1 in #(
14427 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 ???[sx]*):;;*)false;;esac;fi
14431 '\'' sh
14432 '
14433fi
14434as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
14436# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437as_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 +000014438
14439# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014440as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
14442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014444## ----------------------------------- ##
14445## Main body of $CONFIG_STATUS script. ##
14446## ----------------------------------- ##
14447_ASEOF
14448test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14451# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014452# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453# values after options handling.
14454ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014455This file was extended by python $as_me 3.2, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014456generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
14458 CONFIG_FILES = $CONFIG_FILES
14459 CONFIG_HEADERS = $CONFIG_HEADERS
14460 CONFIG_LINKS = $CONFIG_LINKS
14461 CONFIG_COMMANDS = $CONFIG_COMMANDS
14462 $ $0 $@
14463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464on `(hostname || uname -n) 2>/dev/null | sed 1q`
14465"
14466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467_ACEOF
14468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469case $ac_config_files in *"
14470"*) set x $ac_config_files; shift; ac_config_files=$*;;
14471esac
14472
14473case $ac_config_headers in *"
14474"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14475esac
14476
14477
14478cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014479# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014480config_files="$ac_config_files"
14481config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014486ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014487\`$as_me' instantiates files and other configuration actions
14488from templates according to the current configuration. Unless the files
14489and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 --config print configuration, then exit
14496 -q, --quiet, --silent
14497 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 -d, --debug don't remove temporary files
14499 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 --file=FILE[:TEMPLATE]
14501 instantiate the configuration file FILE
14502 --header=FILE[:TEMPLATE]
14503 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
14505Configuration files:
14506$config_files
14507
14508Configuration headers:
14509$config_headers
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14515ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014517python config.status 3.2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014518configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014521Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014522This config.status script is free software; the Free Software Foundation
14523gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524
14525ac_pwd='$ac_pwd'
14526srcdir='$srcdir'
14527INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014528test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014529_ACEOF
14530
Matthias Kloseb9621712010-04-24 17:59:49 +000014531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14532# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014533ac_need_defaults=:
14534while test $# != 0
14535do
14536 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014537 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14539 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014540 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014542 --*=)
14543 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14544 ac_optarg=
14545 ac_shift=:
14546 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014548 ac_option=$1
14549 ac_optarg=$2
14550 ac_shift=shift
14551 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 esac
14553
Skip Montanaro6dead952003-09-25 14:50:04 +000014554 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014556 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14557 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 $as_echo "$ac_cs_version"; exit ;;
14560 --config | --confi | --conf | --con | --co | --c )
14561 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 debug=: ;;
14564 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014565 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 case $ac_optarg in
14567 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014568 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 esac
14570 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ac_need_defaults=false;;
14572 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014573 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 case $ac_optarg in
14575 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14576 esac
14577 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014578 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579 --he | --h)
14580 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014581 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014582Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014585 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14586 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14587 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
14589 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014590 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014591Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014594 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
14596 esac
14597 shift
14598done
14599
Skip Montanaro6dead952003-09-25 14:50:04 +000014600ac_configure_extra_args=
14601
14602if $ac_cs_silent; then
14603 exec 6>/dev/null
14604 ac_configure_extra_args="$ac_configure_extra_args --silent"
14605fi
14606
14607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014608cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014609if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14611 shift
14612 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14613 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014616fi
14617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620exec 5>>config.log
14621{
14622 echo
14623 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14624## Running $as_me. ##
14625_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634
14635# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014636for ac_config_target in $ac_config_targets
14637do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638 case $ac_config_target in
14639 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14640 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14641 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014642 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14643 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14645 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014646 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014647 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014649 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 esac
14651done
14652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654# If the user did not use the arguments to specify the items to instantiate,
14655# then the envvar interface is used. Set only those that are not.
14656# We use the long form for the default assignment because of an extremely
14657# bizarre bug on SunOS 4.1.3.
14658if $ac_need_defaults; then
14659 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14660 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14661fi
14662
Skip Montanaro6dead952003-09-25 14:50:04 +000014663# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014665# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666# Hook for its removal unless debugging.
14667# Note that there is a small window in which the directory will not be cleaned:
14668# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014669$debug ||
14670{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014671 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014673 : "${ac_tmp:=$tmp}"
14674 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014675' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014677}
Martin v. Löwis11437992002-04-12 09:54:03 +000014678# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014682 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014683} ||
14684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685 tmp=./conf$$-$RANDOM
14686 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014687} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14688ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690# Set up the scripts for CONFIG_FILES section.
14691# No need to generate them if there are no CONFIG_FILES.
14692# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695
14696ac_cr=`echo X | tr X '\015'`
14697# On cygwin, bash can eat \r inside `` if the user requested igncr.
14698# But we know of no other shell where ac_cr would be empty at this
14699# point, so we can use a bashism as a fallback.
14700if test "x$ac_cr" = x; then
14701 eval ac_cr=\$\'\\r\'
14702fi
14703ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14704if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014705 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014706else
14707 ac_cs_awk_cr=$ac_cr
14708fi
14709
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014710echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014711_ACEOF
14712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713
Matthias Kloseb9621712010-04-24 17:59:49 +000014714{
14715 echo "cat >conf$$subs.awk <<_ACEOF" &&
14716 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14717 echo "_ACEOF"
14718} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014719 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14720ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721ac_delim='%!_!# '
14722for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014724 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14727 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728 break
14729 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014730 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731 else
14732 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734done
Matthias Kloseb9621712010-04-24 17:59:49 +000014735rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014738cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014740sed -n '
14741h
14742s/^/S["/; s/!.*/"]=/
14743p
14744g
14745s/^[^!]*!//
14746:repl
14747t repl
14748s/'"$ac_delim"'$//
14749t delim
14750:nl
14751h
14752s/\(.\{148\}\)..*/\1/
14753t more1
14754s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14755p
14756n
14757b repl
14758:more1
14759s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14760p
14761g
14762s/.\{148\}//
14763t nl
14764:delim
14765h
14766s/\(.\{148\}\)..*/\1/
14767t more2
14768s/["\\]/\\&/g; s/^/"/; s/$/"/
14769p
14770b
14771:more2
14772s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14773p
14774g
14775s/.\{148\}//
14776t delim
14777' <conf$$subs.awk | sed '
14778/^[^""]/{
14779 N
14780 s/\n//
14781}
14782' >>$CONFIG_STATUS || ac_write_fail=1
14783rm -f conf$$subs.awk
14784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14785_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014786cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 for (key in S) S_is_set[key] = 1
14788 FS = ""
14789
14790}
14791{
14792 line = $ 0
14793 nfields = split(line, field, "@")
14794 substed = 0
14795 len = length(field[1])
14796 for (i = 2; i < nfields; i++) {
14797 key = field[i]
14798 keylen = length(key)
14799 if (S_is_set[key]) {
14800 value = S[key]
14801 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14802 len += length(value) + length(field[++i])
14803 substed = 1
14804 } else
14805 len += 1 + keylen
14806 }
14807
14808 print line
14809}
14810
14811_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14814if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14815 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14816else
14817 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014818fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14819 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014820_ACEOF
14821
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014822# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14823# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824# trailing colons and then remove the whole line if VPATH becomes empty
14825# (actually we leave an empty line to preserve line numbers).
14826if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014827 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14828h
14829s///
14830s/^/:/
14831s/[ ]*$/:/
14832s/:\$(srcdir):/:/g
14833s/:\${srcdir}:/:/g
14834s/:@srcdir@:/:/g
14835s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014837x
14838s/\(=[ ]*\).*/\1/
14839G
14840s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841s/^[^=]*=[ ]*$//
14842}'
14843fi
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014846fi # test -n "$CONFIG_FILES"
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848# Set up the scripts for CONFIG_HEADERS section.
14849# No need to generate them if there are no CONFIG_HEADERS.
14850# This happens for instance with `./config.status Makefile'.
14851if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014852cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014853BEGIN {
14854_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856# Transform confdefs.h into an awk script `defines.awk', embedded as
14857# here-document in config.status, that substitutes the proper values into
14858# config.h.in to produce config.h.
14859
14860# Create a delimiter string that does not exist in confdefs.h, to ease
14861# handling of long lines.
14862ac_delim='%!_!# '
14863for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014864 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14865 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 break
14867 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014868 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 else
14870 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14871 fi
14872done
14873
14874# For the awk script, D is an array of macro values keyed by name,
14875# likewise P contains macro parameters if any. Preserve backslash
14876# newline sequences.
14877
14878ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14879sed -n '
14880s/.\{148\}/&'"$ac_delim"'/g
14881t rset
14882:rset
14883s/^[ ]*#[ ]*define[ ][ ]*/ /
14884t def
14885d
14886:def
14887s/\\$//
14888t bsnl
14889s/["\\]/\\&/g
14890s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14891D["\1"]=" \3"/p
14892s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14893d
14894:bsnl
14895s/["\\]/\\&/g
14896s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14897D["\1"]=" \3\\\\\\n"\\/p
14898t cont
14899s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14900t cont
14901d
14902:cont
14903n
14904s/.\{148\}/&'"$ac_delim"'/g
14905t clear
14906:clear
14907s/\\$//
14908t bsnlc
14909s/["\\]/\\&/g; s/^/"/; s/$/"/p
14910d
14911:bsnlc
14912s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14913b cont
14914' <confdefs.h | sed '
14915s/'"$ac_delim"'/"\\\
14916"/g' >>$CONFIG_STATUS || ac_write_fail=1
14917
14918cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14919 for (key in D) D_is_set[key] = 1
14920 FS = ""
14921}
14922/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14923 line = \$ 0
14924 split(line, arg, " ")
14925 if (arg[1] == "#") {
14926 defundef = arg[2]
14927 mac1 = arg[3]
14928 } else {
14929 defundef = substr(arg[1], 2)
14930 mac1 = arg[2]
14931 }
14932 split(mac1, mac2, "(") #)
14933 macro = mac2[1]
14934 prefix = substr(line, 1, index(line, defundef) - 1)
14935 if (D_is_set[macro]) {
14936 # Preserve the white space surrounding the "#".
14937 print prefix "define", macro P[macro] D[macro]
14938 next
14939 } else {
14940 # Replace #undef with comments. This is necessary, for example,
14941 # in the case of _POSIX_SOURCE, which is predefined and required
14942 # on some systems where configure will not decide to define it.
14943 if (defundef == "undef") {
14944 print "/*", prefix defundef, macro, "*/"
14945 next
14946 }
14947 }
14948}
14949{ print }
14950_ACAWK
14951_ACEOF
14952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014953 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014954fi # test -n "$CONFIG_HEADERS"
14955
14956
14957eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14958shift
14959for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960do
14961 case $ac_tag in
14962 :[FHLC]) ac_mode=$ac_tag; continue;;
14963 esac
14964 case $ac_mode$ac_tag in
14965 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014966 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 :[FH]-) ac_tag=-:-;;
14968 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14969 esac
14970 ac_save_IFS=$IFS
14971 IFS=:
14972 set x $ac_tag
14973 IFS=$ac_save_IFS
14974 shift
14975 ac_file=$1
14976 shift
14977
14978 case $ac_mode in
14979 :L) ac_source=$1;;
14980 :[FH])
14981 ac_file_inputs=
14982 for ac_f
14983 do
14984 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014985 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986 *) # Look for the file first in the build tree, then in the source tree
14987 # (if the path is not absolute). The absolute path cannot be DOS-style,
14988 # because $ac_f cannot contain `:'.
14989 test -f "$ac_f" ||
14990 case $ac_f in
14991 [\\/$]*) false;;
14992 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14993 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014994 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14997 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998 done
14999
15000 # Let's still pretend it is `configure' which instantiates (i.e., don't
15001 # use $as_me), people would be surprised to read:
15002 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 configure_input='Generated from '`
15004 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15005 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 if test x"$ac_file" != x-; then
15007 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15009$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 # Neutralize special characters interpreted by sed in replacement strings.
15012 case $configure_input in #(
15013 *\&* | *\|* | *\\* )
15014 ac_sed_conf_input=`$as_echo "$configure_input" |
15015 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15016 *) ac_sed_conf_input=$configure_input;;
15017 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
15019 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015020 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15021 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022 esac
15023 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 esac
15025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015027$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028 X"$ac_file" : 'X\(//\)[^/]' \| \
15029 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015031$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15033 s//\1/
15034 q
15035 }
15036 /^X\(\/\/\)[^/].*/{
15037 s//\1/
15038 q
15039 }
15040 /^X\(\/\/\)$/{
15041 s//\1/
15042 q
15043 }
15044 /^X\(\/\).*/{
15045 s//\1/
15046 q
15047 }
15048 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_builddir=.
15051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052case "$ac_dir" in
15053.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15054*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058 case $ac_top_builddir_sub in
15059 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15060 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15061 esac ;;
15062esac
15063ac_abs_top_builddir=$ac_pwd
15064ac_abs_builddir=$ac_pwd$ac_dir_suffix
15065# for backward compatibility:
15066ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
15068case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 ac_top_srcdir=$ac_top_builddir_sub
15072 ac_abs_top_srcdir=$ac_pwd ;;
15073 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075 ac_top_srcdir=$srcdir
15076 ac_abs_top_srcdir=$srcdir ;;
15077 *) # Relative name.
15078 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15079 ac_top_srcdir=$ac_top_build_prefix$srcdir
15080 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015081esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015083
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 case $ac_mode in
15086 :F)
15087 #
15088 # CONFIG_FILE
15089 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015090
15091 case $INSTALL in
15092 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015095_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096
Matthias Kloseb9621712010-04-24 17:59:49 +000015097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098# If the template does not know about datarootdir, expand it.
15099# FIXME: This hack should be removed a few years after 2.60.
15100ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015101ac_sed_dataroot='
15102/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 p
15104 q
15105}
15106/@datadir@/p
15107/@docdir@/p
15108/@infodir@/p
15109/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015110/@mandir@/p'
15111case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112*datarootdir*) ac_datarootdir_seen=yes;;
15113*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15115$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015117cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 ac_datarootdir_hack='
15119 s&@datadir@&$datadir&g
15120 s&@docdir@&$docdir&g
15121 s&@infodir@&$infodir&g
15122 s&@localedir@&$localedir&g
15123 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125esac
15126_ACEOF
15127
15128# Neutralize VPATH when `$srcdir' = `.'.
15129# Shell code in configure.ac might set extrasub.
15130# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15132ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015133$extrasub
15134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015135cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015136:t
15137/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015138s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015140s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141s&@srcdir@&$ac_srcdir&;t t
15142s&@abs_srcdir@&$ac_abs_srcdir&;t t
15143s&@top_srcdir@&$ac_top_srcdir&;t t
15144s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15145s&@builddir@&$ac_builddir&;t t
15146s&@abs_builddir@&$ac_abs_builddir&;t t
15147s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15148s&@INSTALL@&$ac_INSTALL&;t t
15149$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015150"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015151eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15152 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015155 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15156 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15157 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 { $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 +000015159which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015161which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015162
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015163 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015165 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15166 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015168 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169 ;;
15170 :H)
15171 #
15172 # CONFIG_HEADER
15173 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 {
15176 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015177 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15178 } >"$ac_tmp/config.h" \
15179 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15180 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15182$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015185 mv "$ac_tmp/config.h" "$ac_file" \
15186 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 fi
15188 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015190 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15191 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195
15196 esac
15197
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015198
15199 case $ac_file$ac_mode in
15200 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15201
15202 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203done # for ac_tag
15204
Guido van Rossum627b2d71993-12-24 10:39:16 +000015205
Matthias Kloseb9621712010-04-24 17:59:49 +000015206as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015207_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015208ac_clean_files=$ac_clean_files_save
15209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015211 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015212
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
15214# configure is writing to config.log, and then calls config.status.
15215# config.status does its own redirection, appending to config.log.
15216# Unfortunately, on DOS this fails, as config.log is still kept open
15217# by configure, so config.status won't be able to write to it; its
15218# output is simply discarded. So we exec the FD to /dev/null,
15219# effectively closing config.log, so it can be properly (re)opened and
15220# appended to by config.status. When coming back to configure, we
15221# need to make the FD available again.
15222if test "$no_create" != yes; then
15223 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015224 ac_config_status_args=
15225 test "$silent" = yes &&
15226 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015228 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 exec 5>>config.log
15230 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15231 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015232 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015233fi
15234if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15236$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015237fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015238
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015239
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015240echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015241if test ! -f Modules/Setup
15242then
15243 cp $srcdir/Modules/Setup.dist Modules/Setup
15244fi
15245
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015246echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015247if test ! -f Modules/Setup.local
15248then
15249 echo "# Edit this file for local setup changes" >Modules/Setup.local
15250fi
15251
15252echo "creating Makefile"
15253$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15254 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015255 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015256mv config.c Modules