blob: a71e128cbf1a4be64596f5e4ca6187500b858f9b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Victor Stinnere0be4232011-10-25 13:06:09 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
Victor Stinnere0be4232011-10-25 13:06:09 +0200220 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
Victor Stinnere0be4232011-10-25 13:06:09 +0200225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $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 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
498 as_ln_s='cp -p'
499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000523 case $1 in #(
524 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000525 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_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 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000649ARFLAGS
650AR
651RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000652USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000653GNULD
654LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000655LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000656RUNSHARED
657INSTSONAME
658LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000659PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000660BLDLIBRARY
661DLLLIBRARY
662LDLIBRARY
663LIBRARY
664BUILDEXEEXT
665EGREP
666GREP
667CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200668NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000669MAINCC
670CXX
671OBJEXT
672EXEEXT
673ac_ct_CC
674CPPFLAGS
675LDFLAGS
676CFLAGS
677CC
678EXPORT_MACOSX_DEPLOYMENT_TARGET
679CONFIGURE_MACOSX_DEPLOYMENT_TARGET
680SGI_ABI
681MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000682FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000683FRAMEWORKUNIXTOOLSPREFIX
684FRAMEWORKALTINSTALLLAST
685FRAMEWORKALTINSTALLFIRST
686FRAMEWORKINSTALLLAST
687FRAMEWORKINSTALLFIRST
688PYTHONFRAMEWORKINSTALLDIR
689PYTHONFRAMEWORKPREFIX
690PYTHONFRAMEWORKDIR
691PYTHONFRAMEWORKIDENTIFIER
692PYTHONFRAMEWORK
693LIPO_32BIT_FLAGS
694ARCH_RUN_32BIT
695UNIVERSALSDK
696CONFIG_ARGS
697SOVERSION
698VERSION
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500699HAS_HG
700HGBRANCH
701HGTAG
702HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703target_alias
704host_alias
705build_alias
706LIBS
707ECHO_T
708ECHO_N
709ECHO_C
710DEFS
711mandir
712localedir
713libdir
714psdir
715pdfdir
716dvidir
717htmldir
718infodir
719docdir
720oldincludedir
721includedir
722localstatedir
723sharedstatedir
724sysconfdir
725datadir
726datarootdir
727libexecdir
728sbindir
729bindir
730program_transform_name
731prefix
732exec_prefix
733PACKAGE_URL
734PACKAGE_BUGREPORT
735PACKAGE_STRING
736PACKAGE_VERSION
737PACKAGE_TARNAME
738PACKAGE_NAME
739PATH_SEPARATOR
740SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000742ac_user_opts='
743enable_option_checking
744enable_universalsdk
745with_universal_archs
746with_framework_name
747enable_framework
748with_gcc
749with_cxx_main
750with_suffix
751enable_shared
752enable_profiling
753with_pydebug
754with_libs
755with_system_expat
756with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000757enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000758with_dbmliborder
759with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000760with_threads
761with_thread
762enable_ipv6
763with_doc_strings
764with_tsc
765with_pymalloc
766with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000767with_fpectl
768with_libm
769with_libc
770enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000771with_computed_gotos
772'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200781CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Kloseb9621712010-04-24 17:59:49 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001324\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001385 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001393 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001399 --enable-loadable-sqlite-extensions
1400 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001403 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Optional Packages:
1407 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1408 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001409 --with-universal-archs=ARCH
1410 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001411 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001412 --with-framework-name=FRAMEWORK
1413 specify an alternate name of the framework built
1414 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-cxx-main=<compiler>
1417 compile main() and link python executable with C++
1418 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-suffix=.exe set executable suffix
1420 --with-pydebug build with Py_DEBUG defined
1421 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001422 --with-system-expat build pyexpat module using an installed expat
1423 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001424 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001425 --with-dbmliborder=db1:db2:...
1426 order to check db backends for dbm. Valid value is a
1427 colon separated string with the backend names
1428 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-threads[=DIRECTORY]
1431 disable/enable thread support
1432 --with(out)-thread[=DIRECTORY]
1433 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001435 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001437 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-fpectl enable SIGFPE catching
1439 --with-libm=STRING math library
1440 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001441 --with(out)-computed-gotos
1442 Use computed gotos in evaluation loop (enabled by
1443 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
Georg Brandle2e15612009-05-20 18:25:10 +00001458Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_builddir=.
1470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001500esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 done
1516fi
1517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001519if $ac_init_version; then
1520 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001521python configure 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +02001522generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001524Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
Matthias Kloseb9621712010-04-24 17:59:49 +00001573# ac_fn_c_try_link LINENO
1574# -----------------------
1575# Try to link conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_link ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 rm -f conftest.$ac_objext conftest$ac_exeext
1580 if { { ac_try="$ac_link"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_link") 2>conftest.err
1588 ac_status=$?
1589 if test -s conftest.err; then
1590 grep -v '^ *+' conftest.err >conftest.er1
1591 cat conftest.er1 >&5
1592 mv -f conftest.er1 conftest.err
1593 fi
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1595 test $ac_status = 0; } && {
1596 test -z "$ac_c_werror_flag" ||
1597 test ! -s conftest.err
1598 } && test -s conftest$ac_exeext && {
1599 test "$cross_compiling" = yes ||
1600 $as_test_x conftest$ac_exeext
1601 }; then :
1602 ac_retval=0
1603else
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=1
1608fi
1609 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1610 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1611 # interfere with the next link command; also delete a directory that is
1612 # left behind by Apple's compiler. We do this before executing the actions.
1613 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 as_fn_set_status $ac_retval
1616
1617} # ac_fn_c_try_link
1618
Matthias Kloseb9621712010-04-24 17:59:49 +00001619# ac_fn_c_try_cpp LINENO
1620# ----------------------
1621# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1622ac_fn_c_try_cpp ()
1623{
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 if { { ac_try="$ac_cpp conftest.$ac_ext"
1626case "(($ac_try" in
1627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628 *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1633 ac_status=$?
1634 if test -s conftest.err; then
1635 grep -v '^ *+' conftest.err >conftest.er1
1636 cat conftest.er1 >&5
1637 mv -f conftest.er1 conftest.err
1638 fi
1639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001640 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1642 test ! -s conftest.err
1643 }; then :
1644 ac_retval=0
1645else
1646 $as_echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649 ac_retval=1
1650fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001651 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001652 as_fn_set_status $ac_retval
1653
1654} # ac_fn_c_try_cpp
1655
1656# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1657# -------------------------------------------------------
1658# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1659# the include files in INCLUDES and setting the cache variable VAR
1660# accordingly.
1661ac_fn_c_check_header_mongrel ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001664 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1666$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001667if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 $as_echo_n "(cached) " >&6
1669fi
1670eval ac_res=\$$3
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1672$as_echo "$ac_res" >&6; }
1673else
1674 # Is the header compilable?
1675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1676$as_echo_n "checking $2 usability... " >&6; }
1677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678/* end confdefs.h. */
1679$4
1680#include <$2>
1681_ACEOF
1682if ac_fn_c_try_compile "$LINENO"; then :
1683 ac_header_compiler=yes
1684else
1685 ac_header_compiler=no
1686fi
1687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1689$as_echo "$ac_header_compiler" >&6; }
1690
1691# Is the header present?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1693$as_echo_n "checking $2 presence... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h. */
1696#include <$2>
1697_ACEOF
1698if ac_fn_c_try_cpp "$LINENO"; then :
1699 ac_header_preproc=yes
1700else
1701 ac_header_preproc=no
1702fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001703rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1705$as_echo "$ac_header_preproc" >&6; }
1706
1707# So? What about this header?
1708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1709 yes:no: )
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1711$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1713$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1714 ;;
1715 no:yes:* )
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1717$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1719$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1721$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1723$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1725$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001726( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001727## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001728## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 ) | sed "s/^/$as_me: WARNING: /" >&2
1730 ;;
1731esac
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001734if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001735 $as_echo_n "(cached) " >&6
1736else
1737 eval "$3=\$ac_header_compiler"
1738fi
1739eval ac_res=\$$3
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1741$as_echo "$ac_res" >&6; }
1742fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744
1745} # ac_fn_c_check_header_mongrel
1746
1747# ac_fn_c_try_run LINENO
1748# ----------------------
1749# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1750# that executables *can* be run.
1751ac_fn_c_try_run ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_link"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_link") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1765 { { case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_try") 2>&5
1772 ac_status=$?
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; }; }; then :
1775 ac_retval=0
1776else
1777 $as_echo "$as_me: program exited with status $ac_status" >&5
1778 $as_echo "$as_me: failed program was:" >&5
1779sed 's/^/| /' conftest.$ac_ext >&5
1780
1781 ac_retval=$ac_status
1782fi
1783 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001785 as_fn_set_status $ac_retval
1786
1787} # ac_fn_c_try_run
1788
1789# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists and can be compiled using the include files in
1792# INCLUDES, setting the cache variable VAR accordingly.
1793ac_fn_c_check_header_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001798if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001799 $as_echo_n "(cached) " >&6
1800else
1801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 eval "$3=yes"
1808else
1809 eval "$3=no"
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001817
1818} # ac_fn_c_check_header_compile
1819
Matthias Kloseb9621712010-04-24 17:59:49 +00001820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1821# -------------------------------------------
1822# Tests whether TYPE exists after having included INCLUDES, setting cache
1823# variable VAR accordingly.
1824ac_fn_c_check_type ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001829if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=no"
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof ($2))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849int
1850main ()
1851{
1852if (sizeof (($2)))
1853 return 0;
1854 ;
1855 return 0;
1856}
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859
1860else
1861 eval "$3=yes"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_type
1873
1874# ac_fn_c_find_uintX_t LINENO BITS VAR
1875# ------------------------------------
1876# Finds an unsigned integer type with width BITS, setting cache variable VAR
1877# accordingly.
1878ac_fn_c_find_uintX_t ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1882$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 # Order is important - never check a type that is potentially smaller
1888 # than half of the expected target width.
1889 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1890 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$ac_includes_default
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1898test_array [0] = 0
1899
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 case $ac_type in #(
1906 uint$2_t) :
1907 eval "$3=yes" ;; #(
1908 *) :
1909 eval "$3=\$ac_type" ;;
1910esac
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001913 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915else
1916 break
1917fi
1918 done
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001924
1925} # ac_fn_c_find_uintX_t
1926
1927# ac_fn_c_find_intX_t LINENO BITS VAR
1928# -----------------------------------
1929# Finds a signed integer type with width BITS, setting cache variable VAR
1930# accordingly.
1931ac_fn_c_find_intX_t ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1935$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001937 $as_echo_n "(cached) " >&6
1938else
1939 eval "$3=no"
1940 # Order is important - never check a type that is potentially smaller
1941 # than half of the expected target width.
1942 for ac_type in int$2_t 'int' 'long int' \
1943 'long long int' 'short int' 'signed char'; do
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001947 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001951static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001963int
1964main ()
1965{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001966static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001967 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1968test_array [0] = 0
1969
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975
1976else
1977 case $ac_type in #(
1978 int$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999} # ac_fn_c_find_intX_t
2000
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
2077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002246# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2247# ---------------------------------------------
2248# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2249# accordingly.
2250ac_fn_c_check_decl ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 as_decl_name=`echo $2|sed 's/ *(.*//'`
2254 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2256$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2257if eval \${$3+:} false; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$4
2263int
2264main ()
2265{
2266#ifndef $as_decl_name
2267#ifdef __cplusplus
2268 (void) $as_decl_use;
2269#else
2270 (void) $as_decl_name;
2271#endif
2272#endif
2273
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$3=yes"
2280else
2281 eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_c_check_decl
2291
Matthias Kloseb9621712010-04-24 17:59:49 +00002292# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2293# ----------------------------------------------------
2294# Tries to find if the field MEMBER exists in type AGGR, after including
2295# INCLUDES, setting cache variable VAR accordingly.
2296ac_fn_c_check_member ()
2297{
2298 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2300$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002301if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002302 $as_echo_n "(cached) " >&6
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$5
2323int
2324main ()
2325{
2326static $2 ac_aggr;
2327if (sizeof ac_aggr.$3)
2328return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$4=yes"
2335else
2336 eval "$4=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$4
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002352It was created by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +02002353generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002701
2702
2703
2704
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002705if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706then
2707# Extract the first word of "hg", so it can be a program name with args.
2708set dummy hg; ac_word=$2
2709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002711if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712 $as_echo_n "(cached) " >&6
2713else
2714 if test -n "$HAS_HG"; then
2715 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2716else
2717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2718for as_dir in $PATH
2719do
2720 IFS=$as_save_IFS
2721 test -z "$as_dir" && as_dir=.
2722 for ac_exec_ext in '' $ac_executable_extensions; do
2723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2724 ac_cv_prog_HAS_HG="found"
2725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2726 break 2
2727 fi
2728done
2729 done
2730IFS=$as_save_IFS
2731
2732 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2733fi
2734fi
2735HAS_HG=$ac_cv_prog_HAS_HG
2736if test -n "$HAS_HG"; then
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2738$as_echo "$HAS_HG" >&6; }
2739else
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2741$as_echo "no" >&6; }
2742fi
2743
2744
2745else
2746HAS_HG=no-repository
2747fi
2748if test $HAS_HG = found
2749then
2750 HGVERSION="hg id -i \$(srcdir)"
2751 HGTAG="hg id -t \$(srcdir)"
2752 HGBRANCH="hg id -b \$(srcdir)"
2753else
2754 HGVERSION=""
2755 HGTAG=""
2756 HGBRANCH=""
2757fi
2758
2759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002761
2762
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
Benjamin Petersond23f8222009-04-05 19:13:16 +00002764if test "$prefix" != "/"; then
2765 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2766fi
2767
2768
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002771# We don't use PACKAGE_ variables, and they cause conflicts
2772# with other autoconf-based packages that include Python.h
2773grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2774rm confdefs.h
2775mv confdefs.h.new confdefs.h
2776
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002777
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002778VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002779
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002780# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002781
2782SOVERSION=1.0
2783
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002784# The later defininition of _XOPEN_SOURCE disables certain features
2785# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2786
Matthias Kloseb9621712010-04-24 17:59:49 +00002787$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002788
2789
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002790# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2791# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2792# them.
2793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002795
2796
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002797# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2798# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2799# them.
2800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002802
2803
Martin v. Löwisd6320502004-08-12 13:45:08 +00002804# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2805# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002808
2809
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2811# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2812# them.
2813
Matthias Kloseb9621712010-04-24 17:59:49 +00002814$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816
2817
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002818define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002819
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002820# Arguments passed to configure.
2821
2822CONFIG_ARGS="$ac_configure_args"
2823
Matthias Kloseb9621712010-04-24 17:59:49 +00002824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2825$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002826# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002827if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002829 case $enableval in
2830 yes)
2831 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002832 if test ! -d "${enableval}"
2833 then
2834 enableval=/
2835 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002836 ;;
2837 esac
2838 case $enableval in
2839 no)
2840 UNIVERSALSDK=
2841 enable_universalsdk=
2842 ;;
2843 *)
2844 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002845 if test ! -d "${UNIVERSALSDK}"
2846 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002847 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002848 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849 ;;
2850 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002852
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853else
2854
2855 UNIVERSALSDK=
2856 enable_universalsdk=
2857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002859
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002860if test -n "${UNIVERSALSDK}"
2861then
Matthias Kloseb9621712010-04-24 17:59:49 +00002862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2863$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002864else
Matthias Kloseb9621712010-04-24 17:59:49 +00002865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002867fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002870
2871
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002873
Matthias Kloseb9621712010-04-24 17:59:49 +00002874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2875$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002876
2877# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002878if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002879 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2881$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002882 UNIVERSAL_ARCHS="$withval"
2883
2884else
2885
Matthias Kloseb9621712010-04-24 17:59:49 +00002886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2887$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002888
2889fi
2890
2891
2892
2893
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002894
2895# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002896if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002897 withval=$with_framework_name;
2898 PYTHONFRAMEWORK=${withval}
2899 PYTHONFRAMEWORKDIR=${withval}.framework
2900 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2901
2902else
2903
2904 PYTHONFRAMEWORK=Python
2905 PYTHONFRAMEWORKDIR=Python.framework
2906 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2907
2908fi
2909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002911if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002913 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002914 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002915 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002916 esac
2917 case $enableval in
2918 no)
2919 PYTHONFRAMEWORK=
2920 PYTHONFRAMEWORKDIR=no-framework
2921 PYTHONFRAMEWORKPREFIX=
2922 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002923 FRAMEWORKINSTALLFIRST=
2924 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002925 FRAMEWORKALTINSTALLFIRST=
2926 FRAMEWORKALTINSTALLLAST=
2927 if test "x${prefix}" = "xNONE"; then
2928 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2929 else
2930 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2931 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002932 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002933 ;;
2934 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002935 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002936 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002938 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002939 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2940 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002941 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943 if test "x${prefix}" = "xNONE" ; then
2944 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002945
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002946 else
2947 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2948 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
2950 case "${enableval}" in
2951 /System*)
2952 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2953 if test "${prefix}" = "NONE" ; then
2954 # See below
2955 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2956 fi
2957 ;;
2958
2959 /Library*)
2960 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2961 ;;
2962
2963 */Library/Frameworks)
2964 MDIR="`dirname "${enableval}"`"
2965 MDIR="`dirname "${MDIR}"`"
2966 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2967
2968 if test "${prefix}" = "NONE"; then
2969 # User hasn't specified the
2970 # --prefix option, but wants to install
2971 # the framework in a non-default location,
2972 # ensure that the compatibility links get
2973 # installed relative to that prefix as well
2974 # instead of in /usr/local.
2975 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2976 fi
2977 ;;
2978
2979 *)
2980 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2981 ;;
2982 esac
2983
Jack Jansen127e56e2001-09-11 14:41:54 +00002984 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002985
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002986 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002987 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002991
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002992 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2993
2994 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2995
Jack Jansene578a632001-08-15 01:27:14 +00002996 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Guido van Rossum563e7081996-09-10 18:20:48 +00002998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
Jack Jansene578a632001-08-15 01:27:14 +00003000 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003001 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003002 PYTHONFRAMEWORKPREFIX=
3003 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 FRAMEWORKINSTALLFIRST=
3005 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003006 FRAMEWORKALTINSTALLFIRST=
3007 FRAMEWORKALTINSTALLLAST=
3008 if test "x${prefix}" = "xNONE" ; then
3009 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3010 else
3011 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3012 fi
Jack Jansene578a632001-08-15 01:27:14 +00003013 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003014
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016fi
3017
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018
3019
Michael W. Hudson54241132001-12-07 15:38:26 +00003020
3021
3022
3023
Jack Jansene578a632001-08-15 01:27:14 +00003024
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003025
3026
3027
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003028
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003029
Jack Jansene578a632001-08-15 01:27:14 +00003030##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003031## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003032## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003033##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003034# Set name for machine-dependent library files
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3037$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003038if test -z "$MACHDEP"
3039then
Guido van Rossum563e7081996-09-10 18:20:48 +00003040 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003041 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003042 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003043 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003044 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003045 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003046 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003047 ac_md_system=`echo $ac_sys_system |
3048 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3049 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003050 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003051 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003052
Guido van Rossum07397971997-04-29 21:49:50 +00003053 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003054 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003055 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003056 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003059 esac
3060fi
Guido van Rossum91922671997-10-09 20:24:13 +00003061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3063# disable features if it is defined, without any means to access these
3064# features as extensions. For these systems, we skip the definition of
3065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3066# some feature, make sure there is no alternative way to access this
3067# feature. Also, when using wildcards, make sure you have verified the
3068# need for not defining _XOPEN_SOURCE on all systems matching the
3069# wildcard, and that the wildcard does not include future systems
3070# (which may remove their limitations).
3071case $ac_sys_system/$ac_sys_release in
3072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003075 # In addition, Stefan Krah confirms that issue #1244610 exists through
3076 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003077 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003078 define_xopen_source=no
3079 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3080 # also defined. This can be overridden by defining _BSD_SOURCE
3081 # As this has a different meaning on Linux, only define it on OpenBSD
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003084
3085 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003086 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003087 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3088 # also defined. This can be overridden by defining _BSD_SOURCE
3089 # As this has a different meaning on Linux, only define it on OpenBSD
3090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003092
3093 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003094 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3095 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3096 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003097 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 +00003098 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003099 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3100 # request to enable features supported by the standard as a request
3101 # to disable features not supported by the standard. The best way
3102 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3103 # entirely and define __EXTENSIONS__ instead.
3104 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003110 define_xopen_source=no;;
3111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003115 # On FreeBSD 4, the math functions C89 does not cover are never defined
3116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3117 FreeBSD/4.*)
3118 define_xopen_source=no;;
3119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3121 # identifies itself as Darwin/7.*
3122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3123 # disables platform specific features beyond repair.
3124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3125 # has no effect, don't bother defining them
3126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003127 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003128 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003133 AIX/4)
3134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003135 AIX/5)
3136 if test `uname -r` -eq 1; then
3137 define_xopen_source=no
3138 fi
3139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3141 # defining NI_NUMERICHOST.
3142 QNX/6.3.2)
3143 define_xopen_source=no
3144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003146esac
3147
3148if test $define_xopen_source = yes
3149then
Victor Stinner14d098d2011-09-07 22:29:43 +02003150 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003151
Victor Stinner14d098d2011-09-07 22:29:43 +02003152$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003153
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003154
3155 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3156 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3157 # several APIs are not declared. Since this is also needed in some
3158 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003161
3162
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003163
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003164$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003165
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003166fi
3167
Guido van Rossum91922671997-10-09 20:24:13 +00003168#
3169# SGI compilers allow the specification of the both the ABI and the
3170# ISA on the command line. Depending on the values of these switches,
3171# different and often incompatable code will be generated.
3172#
3173# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3174# thus supply support for various ABI/ISA combinations. The MACHDEP
3175# variable is also adjusted.
3176#
3177
3178if test ! -z "$SGI_ABI"
3179then
3180 CC="cc $SGI_ABI"
3181 LDFLAGS="$SGI_ABI $LDFLAGS"
3182 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3185$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003186
Jack Jansen6b08a402004-06-03 12:41:45 +00003187# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3188# it may influence the way we can build extensions, so distutils
3189# needs to check it
3190
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Jack Jansen6b08a402004-06-03 12:41:45 +00003192CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003194
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3196$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003197ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3199$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003200
Guido van Rossum627b2d71993-12-24 10:39:16 +00003201# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003202
3203# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3204# for debug/optimization stuff. BASECFLAGS is for flags that are required
3205# just to get things to compile and link. Users are free to override OPT
3206# when running configure or make. The build should not break if they do.
3207# BASECFLAGS should generally not be messed with, however.
3208
3209# XXX shouldn't some/most/all of this code be merged with the stuff later
3210# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3212$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003218 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003219 without_gcc=yes;;
3220 yes) CC=gcc
3221 without_gcc=no;;
3222 *) CC=$withval
3223 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003224 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003225else
Martin v. Löwis11437992002-04-12 09:54:03 +00003226
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003228 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003229 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003230 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003231 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232fi
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3235$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003236
Guido van Rossum8b131c51995-03-09 14:10:13 +00003237# If the user switches compilers, we can't believe the cache
3238if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3239then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003240 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003241(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003242fi
3243
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003244# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3245# when the compiler supports them, but we don't always want -O2, and
3246# we set -g later.
3247if test -z "$CFLAGS"; then
3248 CFLAGS=
3249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255if test -n "$ac_tool_prefix"; then
3256 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3257set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003260if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003261 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003262else
3263 if test -n "$CC"; then
3264 ac_cv_prog_CC="$CC" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003271 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 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 +00003273 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003274 $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 +00003275 break 2
3276 fi
3277done
Matthias Kloseb9621712010-04-24 17:59:49 +00003278 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Jack Jansendd19cf82001-12-06 22:36:17 +00003281fi
3282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003284if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3286$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi
3291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292
Martin v. Löwis11437992002-04-12 09:54:03 +00003293fi
3294if test -z "$ac_cv_prog_CC"; then
3295 ac_ct_CC=$CC
3296 # Extract the first word of "gcc", so it can be a program name with args.
3297set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3299$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003300if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003302else
3303 if test -n "$ac_ct_CC"; then
3304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3305else
3306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in $PATH
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 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 +00003313 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003314 $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 +00003315 break 2
3316 fi
3317done
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
3321fi
3322fi
3323ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
Matthias Kloseb9621712010-04-24 17:59:49 +00003328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003330fi
3331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339ac_tool_warned=yes ;;
3340esac
3341 CC=$ac_ct_CC
3342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003343else
3344 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003345fi
3346
Jack Jansendd19cf82001-12-06 22:36:17 +00003347if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003348 if test -n "$ac_tool_prefix"; then
3349 # 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 +00003350set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003353if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003355else
3356 if test -n "$CC"; then
3357 ac_cv_prog_CC="$CC" # Let the user override the test.
3358else
Martin v. Löwis11437992002-04-12 09:54:03 +00003359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 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 +00003366 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 $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 +00003368 break 2
3369 fi
3370done
Matthias Kloseb9621712010-04-24 17:59:49 +00003371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374fi
3375fi
3376CC=$ac_cv_prog_CC
3377if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3379$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003380else
Matthias Kloseb9621712010-04-24 17:59:49 +00003381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003387fi
3388if test -z "$CC"; then
3389 # Extract the first word of "cc", so it can be a program name with args.
3390set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3392$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003393if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003395else
3396 if test -n "$CC"; then
3397 ac_cv_prog_CC="$CC" # Let the user override the test.
3398else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003399 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401for as_dir in $PATH
3402do
3403 IFS=$as_save_IFS
3404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3408 ac_prog_rejected=yes
3409 continue
3410 fi
3411 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 break 2
3414 fi
3415done
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003418
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419if test $ac_prog_rejected = yes; then
3420 # We found a bogon in the path, so make sure we never use it.
3421 set dummy $ac_cv_prog_CC
3422 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 # We chose a different compiler from the bogus one.
3425 # However, it has the same basename, so the bogon will be chosen
3426 # first if we set CC to just the basename; use the full file name.
3427 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003428 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429 fi
3430fi
3431fi
3432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003433CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3436$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437else
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003440fi
3441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444if test -z "$CC"; then
3445 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 do
3448 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3451$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003452if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003454else
3455 if test -n "$CC"; then
3456 ac_cv_prog_CC="$CC" # Let the user override the test.
3457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3459for as_dir in $PATH
3460do
3461 IFS=$as_save_IFS
3462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 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 +00003465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003466 $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 +00003467 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469done
Matthias Kloseb9621712010-04-24 17:59:49 +00003470 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
3473fi
3474fi
3475CC=$ac_cv_prog_CC
3476if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3478$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479else
Matthias Kloseb9621712010-04-24 17:59:49 +00003480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3481$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003482fi
3483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 test -n "$CC" && break
3486 done
3487fi
3488if test -z "$CC"; then
3489 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003491do
3492 # Extract the first word of "$ac_prog", so it can be a program name with args.
3493set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3495$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003496if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003498else
3499 if test -n "$ac_ct_CC"; then
3500 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3501else
3502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503for as_dir in $PATH
3504do
3505 IFS=$as_save_IFS
3506 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003508 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 +00003509 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003510 $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 +00003511 break 2
3512 fi
3513done
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003515IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517fi
3518fi
3519ac_ct_CC=$ac_cv_prog_ac_ct_CC
3520if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3522$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003523else
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3525$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 test -n "$ac_ct_CC" && break
3530done
Michael W. Hudson54241132001-12-07 15:38:26 +00003531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 if test "x$ac_ct_CC" = x; then
3533 CC=""
3534 else
3535 case $cross_compiling:$ac_tool_warned in
3536yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539ac_tool_warned=yes ;;
3540esac
3541 CC=$ac_ct_CC
3542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543fi
3544
3545fi
3546
3547
Matthias Kloseb9621712010-04-24 17:59:49 +00003548test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003550as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003551See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
3553# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3555set X $ac_compile
3556ac_compiler=$2
3557for ac_option in --version -v -V -qversion; do
3558 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564$as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test -s conftest.err; then
3568 sed '10a\
3569... rest of stderr output deleted ...
3570 10q' conftest.err >conftest.er1
3571 cat conftest.er1 >&5
3572 fi
3573 rm -f conftest.er1 conftest.err
3574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3575 test $ac_status = 0; }
3576done
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Matthias Kloseb9621712010-04-24 17:59:49 +00003578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003579/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581int
3582main ()
3583{
3584
3585 ;
3586 return 0;
3587}
3588_ACEOF
3589ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003590ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003591# Try to create an executable without -o first, disregard a.out.
3592# It will help us diagnose broken compilers, and finding out an intuition
3593# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3595$as_echo_n "checking whether the C compiler works... " >&6; }
3596ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3597
3598# The possible output files:
3599ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601ac_rmfiles=
3602for ac_file in $ac_files
3603do
3604 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3607 esac
3608done
3609rm -f $ac_rmfiles
3610
Matthias Kloseb9621712010-04-24 17:59:49 +00003611if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3623# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3624# in a Makefile. We should not override ac_cv_exeext if it was cached,
3625# so that the user can short-circuit this test for compilers unknown to
3626# Autoconf.
3627for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003628do
3629 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 ;;
3633 [ab].out )
3634 # We found the default executable, but exeext='' is most
3635 # certainly right.
3636 break;;
3637 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 then :; else
3640 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 fi
3642 # We set ac_cv_exeext here because the later test for it is not
3643 # safe: cross compilers may not add the suffix if given an `-o'
3644 # argument, so we may need to know it at that point already.
3645 # Even if this section looks crufty: it has the advantage of
3646 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003647 break;;
3648 * )
3649 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 esac
3651done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652test "$ac_cv_exeext" = no && ac_cv_exeext=
3653
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003654else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 ac_file=''
3656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003657if test -z "$ac_file"; then :
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3659$as_echo "no" >&6; }
3660$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003661sed 's/^/| /' conftest.$ac_ext >&5
3662
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003665as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003666See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003667else
3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3669$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3672$as_echo_n "checking for C compiler default output file name... " >&6; }
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3674$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003675ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003676
Matthias Kloseb9621712010-04-24 17:59:49 +00003677rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003678ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3680$as_echo_n "checking for suffix of executables... " >&6; }
3681if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3687$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3691 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003692 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3693# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3694# work properly (i.e., refer to `conftest.exe'), while it won't with
3695# `rm'.
3696for ac_file in conftest.exe conftest conftest.*; do
3697 test -f "$ac_file" || continue
3698 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003700 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3701 break;;
3702 * ) break;;
3703 esac
3704done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003708as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003709See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003711rm -f conftest conftest$ac_cv_exeext
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3713$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714
3715rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003716EXEEXT=$ac_cv_exeext
3717ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3719/* end confdefs.h. */
3720#include <stdio.h>
3721int
3722main ()
3723{
3724FILE *f = fopen ("conftest.out", "w");
3725 return ferror (f) || fclose (f) != 0;
3726
3727 ;
3728 return 0;
3729}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003731ac_clean_files="$ac_clean_files conftest.out"
3732# Check that the compiler produces executables we can run. If not, either
3733# the compiler is broken, or we cross compile.
3734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3735$as_echo_n "checking whether we are cross compiling... " >&6; }
3736if test "$cross_compiling" != yes; then
3737 { { ac_try="$ac_link"
3738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
3742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
3744 (eval "$ac_link") 2>&5
3745 ac_status=$?
3746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3747 test $ac_status = 0; }
3748 if { ac_try='./conftest$ac_cv_exeext'
3749 { { case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
3753eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3754$as_echo "$ac_try_echo"; } >&5
3755 (eval "$ac_try") 2>&5
3756 ac_status=$?
3757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3758 test $ac_status = 0; }; }; then
3759 cross_compiling=no
3760 else
3761 if test "$cross_compiling" = maybe; then
3762 cross_compiling=yes
3763 else
3764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003766as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003768See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 fi
3770 fi
3771fi
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3773$as_echo "$cross_compiling" >&6; }
3774
3775rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3776ac_clean_files=$ac_clean_files_save
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3778$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003779if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
3781else
3782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003783/* end confdefs.h. */
3784
3785int
3786main ()
3787{
3788
3789 ;
3790 return 0;
3791}
3792_ACEOF
3793rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003794if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3800$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3804 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 for ac_file in conftest.o conftest.obj conftest.*; do
3806 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3810 break;;
3811 esac
3812done
3813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003815sed 's/^/| /' conftest.$ac_ext >&5
3816
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003819as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02003820See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003822rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3825$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003826OBJEXT=$ac_cv_objext
3827ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3829$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003830if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836int
3837main ()
3838{
3839#ifndef __GNUC__
3840 choke me
3841#endif
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_compiler_gnu=yes
3849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003853ac_cv_c_compiler_gnu=$ac_compiler_gnu
3854
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3857$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3858if test $ac_compiler_gnu = yes; then
3859 GCC=yes
3860else
3861 GCC=
3862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863ac_test_CFLAGS=${CFLAGS+set}
3864ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3866$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003867if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_save_c_werror_flag=$ac_c_werror_flag
3871 ac_c_werror_flag=yes
3872 ac_cv_prog_cc_g=no
3873 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003885if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003886 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 CFLAGS=""
3889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* end confdefs.h. */
3907
3908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003916if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3924 ac_c_werror_flag=$ac_save_c_werror_flag
3925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3927$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930elif test $ac_cv_prog_cc_g = yes; then
3931 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003932 CFLAGS="-g -O2"
3933 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003934 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935 fi
3936else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937 if test "$GCC" = yes; then
3938 CFLAGS="-O2"
3939 else
3940 CFLAGS=
3941 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3944$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003945if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003947else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003949ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003951/* end confdefs.h. */
3952#include <stdarg.h>
3953#include <stdio.h>
3954#include <sys/types.h>
3955#include <sys/stat.h>
3956/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3957struct buf { int x; };
3958FILE * (*rcsopen) (struct buf *, struct stat *, int);
3959static char *e (p, i)
3960 char **p;
3961 int i;
3962{
3963 return p[i];
3964}
3965static char *f (char * (*g) (char **, int), char **p, ...)
3966{
3967 char *s;
3968 va_list v;
3969 va_start (v,p);
3970 s = g (p, va_arg (v,int));
3971 va_end (v);
3972 return s;
3973}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974
3975/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3976 function prototypes and stuff, but not '\xHH' hex character constants.
3977 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3980 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3985 inside strings and character constants. */
3986#define FOO(x) 'x'
3987int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3988
Skip Montanaro6dead952003-09-25 14:50:04 +00003989int test (int i, double x);
3990struct s1 {int (*f) (int a);};
3991struct s2 {int (*f) (double a);};
3992int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3993int argc;
3994char **argv;
3995int
3996main ()
3997{
3998return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3999 ;
4000 return 0;
4001}
4002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4004 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004005do
4006 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010rm -f core conftest.err conftest.$ac_objext
4011 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004012done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004014CC=$ac_save_CC
4015
4016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017# AC_CACHE_VAL
4018case "x$ac_cv_prog_cc_c89" in
4019 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4021$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4024$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004025 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4028$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004029esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004030if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004033
Martin v. Löwis11437992002-04-12 09:54:03 +00004034ac_ext=c
4035ac_cpp='$CPP $CPPFLAGS'
4036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4038ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042
Matthias Kloseb9621712010-04-24 17:59:49 +00004043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4044$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004046# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004047if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004048 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049
4050 case $withval in
4051 no) with_cxx_main=no
4052 MAINCC='$(CC)';;
4053 yes) with_cxx_main=yes
4054 MAINCC='$(CXX)';;
4055 *) with_cxx_main=yes
4056 MAINCC=$withval
4057 if test -z "$CXX"
4058 then
4059 CXX=$withval
4060 fi;;
4061 esac
4062else
4063
4064 with_cxx_main=no
4065 MAINCC='$(CC)'
4066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067fi
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4070$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004071
4072preset_cxx="$CXX"
4073if test -z "$CXX"
4074then
4075 case "$CC" in
4076 gcc) # Extract the first word of "g++", so it can be a program name with args.
4077set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004080if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082else
4083 case $CXX in
4084 [\\/]* | ?:[\\/]*)
4085 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4086 ;;
4087 *)
4088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in notfound
4090do
4091 IFS=$as_save_IFS
4092 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 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 +00004095 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097 break 2
4098 fi
4099done
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004102
4103 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4104 ;;
4105esac
4106fi
4107CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004108if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4110$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004116 ;;
4117 cc) # Extract the first word of "c++", so it can be a program name with args.
4118set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4120$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004121if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123else
4124 case $CXX in
4125 [\\/]* | ?:[\\/]*)
4126 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4127 ;;
4128 *)
4129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130for as_dir in notfound
4131do
4132 IFS=$as_save_IFS
4133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 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 +00004136 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138 break 2
4139 fi
4140done
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4145 ;;
4146esac
4147fi
4148CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004149if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4151$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4154$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004157 ;;
4158 esac
4159 if test "$CXX" = "notfound"
4160 then
4161 CXX=""
4162 fi
4163fi
4164if test -z "$CXX"
4165then
4166 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4167do
4168 # Extract the first word of "$ac_prog", so it can be a program name with args.
4169set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4171$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004172if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004174else
4175 if test -n "$CXX"; then
4176 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4177else
4178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4179for as_dir in $PATH
4180do
4181 IFS=$as_save_IFS
4182 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184 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 +00004185 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004187 break 2
4188 fi
4189done
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004192
4193fi
4194fi
4195CXX=$ac_cv_prog_CXX
4196if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4198$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4201$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004202fi
4203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004205 test -n "$CXX" && break
4206done
4207test -n "$CXX" || CXX="notfound"
4208
4209 if test "$CXX" = "notfound"
4210 then
4211 CXX=""
4212 fi
4213fi
4214if test "$preset_cxx" != "$CXX"
4215then
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004217
4218 By default, distutils will build C++ extension modules with \"$CXX\".
4219 If this is not intended, then set CXX on the configure command line.
4220 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004221$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004222
4223 By default, distutils will build C++ extension modules with \"$CXX\".
4224 If this is not intended, then set CXX on the configure command line.
4225 " >&2;}
4226fi
4227
4228
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4230$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4231save_LDFLAGS="$LDFLAGS"
4232LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004233
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
4245if ac_fn_c_try_link "$LINENO"; then :
4246 NO_AS_NEEDED="-Wl,--no-as-needed"
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4248$as_echo "yes" >&6; }
4249else
4250 NO_AS_NEEDED=""
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252$as_echo "no" >&6; }
4253fi
4254rm -f core conftest.err conftest.$ac_objext \
4255 conftest$ac_exeext conftest.$ac_ext
4256LDFLAGS="$save_LDFLAGS"
4257
4258
4259
4260# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004261ac_ext=c
4262ac_cpp='$CPP $CPPFLAGS'
4263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4265ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4267$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004268# On Suns, sometimes $CPP names a directory.
4269if test -n "$CPP" && test -d "$CPP"; then
4270 CPP=
4271fi
4272if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004273 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Double quotes because CPP needs to be expanded
4277 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4278 do
4279 ac_preproc_ok=false
4280for ac_c_preproc_warn_flag in '' yes
4281do
4282 # Use a header file that comes with gcc, so configuring glibc
4283 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004284 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4285 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004286 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* end confdefs.h. */
4290#ifdef __STDC__
4291# include <limits.h>
4292#else
4293# include <assert.h>
4294#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004297if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Matthias Kloseb9621712010-04-24 17:59:49 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 # Broken: fails on valid input.
4301continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004302fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004303rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004309#include <ac_nonexistent.h>
4310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # Broken: success on invalid input.
4313continue
4314else
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 # Passes both tests.
4316ac_preproc_ok=:
4317break
4318fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004319rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
4321done
4322# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004323rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004324if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 break
4326fi
4327
4328 done
4329 ac_cv_prog_CPP=$CPP
4330
4331fi
4332 CPP=$ac_cv_prog_CPP
4333else
4334 ac_cv_prog_CPP=$CPP
4335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4337$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004338ac_preproc_ok=false
4339for ac_c_preproc_warn_flag in '' yes
4340do
4341 # Use a header file that comes with gcc, so configuring glibc
4342 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4344 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 # On the NeXT, cc -E runs the code through the compiler's parser,
4346 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004348/* end confdefs.h. */
4349#ifdef __STDC__
4350# include <limits.h>
4351#else
4352# include <assert.h>
4353#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004354 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 # Broken: fails on valid input.
4360continue
4361fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004362rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004368#include <ac_nonexistent.h>
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 # Broken: success on invalid input.
4372continue
4373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 # Passes both tests.
4375ac_preproc_ok=:
4376break
4377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004378rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
4380done
4381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004382rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if $ac_preproc_ok; then :
4384
Martin v. Löwis11437992002-04-12 09:54:03 +00004385else
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004388as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004389See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004390fi
4391
4392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397
4398
Matthias Kloseb9621712010-04-24 17:59:49 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4400$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004401if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004403else
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 # Loop through the user's path and test for each of PROGNAME-LIST
4407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 for ac_prog in grep ggrep; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4415 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4416# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 # Check for GNU $ac_path_GREP
4418case `"$ac_path_GREP" --version 2>&1` in
4419*GNU*)
4420 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4421*)
4422 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 while :
4425 do
4426 cat "conftest.in" "conftest.in" >"conftest.tmp"
4427 mv "conftest.tmp" "conftest.in"
4428 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4431 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004432 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4434 # Best one so far, save it but keep looking for a better one
4435 ac_cv_path_GREP="$ac_path_GREP"
4436 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004437 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 # 10*(2^10) chars as input seems more than enough
4439 test $ac_count -gt 10 && break
4440 done
4441 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4442esac
4443
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 $ac_path_GREP_found && break 3
4445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004449 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004450 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 +00004451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452else
4453 ac_cv_path_GREP=$GREP
4454fi
4455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4458$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459 GREP="$ac_cv_path_GREP"
4460
4461
Matthias Kloseb9621712010-04-24 17:59:49 +00004462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004464if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466else
4467 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468 then ac_cv_path_EGREP="$GREP -E"
4469 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 for ac_prog in egrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 # Check for GNU $ac_path_EGREP
4484case `"$ac_path_EGREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487*)
4488 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004496 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004499 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_EGREP="$ac_path_EGREP"
4502 ac_path_EGREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 $ac_path_EGREP_found && break 3
4511 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004512 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004514IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004516 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 +00004517 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518else
4519 ac_cv_path_EGREP=$EGREP
4520fi
4521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004522 fi
4523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004526 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004527
4528
Matthias Kloseb9621712010-04-24 17:59:49 +00004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4530$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
4533else
4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004535/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004536#include <stdlib.h>
4537#include <stdarg.h>
4538#include <string.h>
4539#include <float.h>
4540
4541int
4542main ()
4543{
4544
4545 ;
4546 return 0;
4547}
4548_ACEOF
4549if ac_fn_c_try_compile "$LINENO"; then :
4550 ac_cv_header_stdc=yes
4551else
4552 ac_cv_header_stdc=no
4553fi
4554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555
4556if test $ac_cv_header_stdc = yes; then
4557 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559/* end confdefs.h. */
4560#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004561
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004562_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004565
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004566else
Matthias Kloseb9621712010-04-24 17:59:49 +00004567 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004569rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571fi
4572
4573if test $ac_cv_header_stdc = yes; then
4574 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577#include <stdlib.h>
4578
4579_ACEOF
4580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4581 $EGREP "free" >/dev/null 2>&1; then :
4582
4583else
4584 ac_cv_header_stdc=no
4585fi
4586rm -f conftest*
4587
4588fi
4589
4590if test $ac_cv_header_stdc = yes; then
4591 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4592 if test "$cross_compiling" = yes; then :
4593 :
4594else
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#include <ctype.h>
4598#include <stdlib.h>
4599#if ((' ' & 0x0FF) == 0x020)
4600# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4601# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4602#else
4603# define ISLOWER(c) \
4604 (('a' <= (c) && (c) <= 'i') \
4605 || ('j' <= (c) && (c) <= 'r') \
4606 || ('s' <= (c) && (c) <= 'z'))
4607# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4608#endif
4609
4610#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4611int
4612main ()
4613{
4614 int i;
4615 for (i = 0; i < 256; i++)
4616 if (XOR (islower (i), ISLOWER (i))
4617 || toupper (i) != TOUPPER (i))
4618 return 2;
4619 return 0;
4620}
4621_ACEOF
4622if ac_fn_c_try_run "$LINENO"; then :
4623
4624else
4625 ac_cv_header_stdc=no
4626fi
4627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4628 conftest.$ac_objext conftest.beam conftest.$ac_ext
4629fi
4630
4631fi
4632fi
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4634$as_echo "$ac_cv_header_stdc" >&6; }
4635if test $ac_cv_header_stdc = yes; then
4636
4637$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4638
4639fi
4640
4641# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4642for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4643 inttypes.h stdint.h unistd.h
4644do :
4645 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4646ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4647"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004648if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 cat >>confdefs.h <<_ACEOF
4650#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4651_ACEOF
4652
4653fi
4654
4655done
4656
4657
4658
4659 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02004660if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 MINIX=yes
4662else
4663 MINIX=
4664fi
4665
4666
4667 if test "$MINIX" = yes; then
4668
4669$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4670
4671
4672$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4673
4674
4675$as_echo "#define _MINIX 1" >>confdefs.h
4676
4677 fi
4678
4679
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4681$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004682if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004683 $as_echo_n "(cached) " >&6
4684else
4685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686/* end confdefs.h. */
4687
4688# define __EXTENSIONS__ 1
4689 $ac_includes_default
4690int
4691main ()
4692{
4693
4694 ;
4695 return 0;
4696}
4697_ACEOF
4698if ac_fn_c_try_compile "$LINENO"; then :
4699 ac_cv_safe_to_define___extensions__=yes
4700else
4701 ac_cv_safe_to_define___extensions__=no
4702fi
4703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4704fi
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4706$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4707 test $ac_cv_safe_to_define___extensions__ = yes &&
4708 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4709
4710 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4711
4712 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4713
4714 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4715
4716 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4717
4718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004720# Check for unsupported systems
4721case $ac_sys_system/$ac_sys_release in
4722atheos*|Linux*/1*)
4723 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4724 echo See README for details.
4725 exit 1;;
4726esac
4727
4728
Matthias Kloseb9621712010-04-24 17:59:49 +00004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4730$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
4732# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004733if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004734 withval=$with_suffix;
4735 case $withval in
4736 no) EXEEXT=;;
4737 yes) EXEEXT=.exe;;
4738 *) EXEEXT=$withval;;
4739 esac
4740fi
4741
Matthias Kloseb9621712010-04-24 17:59:49 +00004742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4743$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744
4745# Test whether we're running on a non-case-sensitive system, in which
4746# case we give a warning if no ext is given
4747
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4749$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750if test ! -d CaseSensitiveTestDir; then
4751mkdir CaseSensitiveTestDir
4752fi
4753
4754if test -d casesensitivetestdir
4755then
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4757$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 BUILDEXEEXT=.exe
4759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762 BUILDEXEEXT=$EXEEXT
4763fi
4764rmdir CaseSensitiveTestDir
4765
4766case $MACHDEP in
4767bsdos*)
4768 case $CC in
4769 gcc) CC="$CC -D_HAVE_BSDI";;
4770 esac;;
4771esac
4772
4773case $ac_sys_system in
4774hp*|HP*)
4775 case $CC in
4776 cc|*/cc) CC="$CC -Ae";;
4777 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778esac
4779
4780
4781
Matthias Kloseb9621712010-04-24 17:59:49 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4783$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784if test -z "$LIBRARY"
4785then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004786 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4789$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790
4791# LDLIBRARY is the name of the library to link against (as opposed to the
4792# name of the library into which to insert object files). BLDLIBRARY is also
4793# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4794# is blank as the main program is not linked directly against LDLIBRARY.
4795# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4796# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4797# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4798# DLLLIBRARY is the shared (i.e., DLL) library.
4799#
4800# RUNSHARED is used to run shared python without installed libraries
4801#
4802# INSTSONAME is the name of the shared library that will be use to install
4803# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004804#
4805# LDVERSION is the shared library version number, normally the Python version
4806# with the ABI build flags appended.
4807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808
4809
4810
4811
4812
4813
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004815LDLIBRARY="$LIBRARY"
4816BLDLIBRARY='$(LDLIBRARY)'
4817INSTSONAME='$(LDLIBRARY)'
4818DLLLIBRARY=''
4819LDLIBRARYDIR=''
4820RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004821LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822
4823# LINKCC is the command that links the python executable -- default is $(CC).
4824# If CXX is set, and if it is needed to link a main function that was
4825# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4826# python might then depend on the C++ runtime
4827# This is altered for AIX in order to build the export list before
4828# linking.
4829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4831$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832if test -z "$LINKCC"
4833then
4834 LINKCC='$(PURIFY) $(MAINCC)'
4835 case $ac_sys_system in
4836 AIX*)
4837 exp_extra="\"\""
4838 if test $ac_sys_release -ge 5 -o \
4839 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4840 exp_extra="."
4841 fi
4842 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 QNX*)
4844 # qcc must be used because the other compilers do not
4845 # support -N.
4846 LINKCC=qcc;;
4847 esac
4848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4850$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851
4852# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4853# make sure we default having it set to "no": this is used by
4854# distutils.unixccompiler to know if it should add --enable-new-dtags
4855# to linker command lines, and failing to detect GNU ld simply results
4856# in the same bahaviour as before.
4857
Matthias Kloseb9621712010-04-24 17:59:49 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4859$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860ac_prog=ld
4861if test "$GCC" = yes; then
4862 ac_prog=`$CC -print-prog-name=ld`
4863fi
4864case `"$ac_prog" -V 2>&1 < /dev/null` in
4865 *GNU*)
4866 GNULD=yes;;
4867 *)
4868 GNULD=no;;
4869esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4871$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4874$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004875if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004876 $as_echo_n "(cached) " >&6
4877else
4878 ac_cv_c_inline=no
4879for ac_kw in inline __inline__ __inline; do
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h. */
4882#ifndef __cplusplus
4883typedef int foo_t;
4884static $ac_kw foo_t static_foo () {return 0; }
4885$ac_kw foo_t foo () {return 0; }
4886#endif
4887
4888_ACEOF
4889if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_c_inline=$ac_kw
4891fi
4892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4893 test "$ac_cv_c_inline" != no && break
4894done
4895
4896fi
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4898$as_echo "$ac_cv_c_inline" >&6; }
4899
4900case $ac_cv_c_inline in
4901 inline | yes) ;;
4902 *)
4903 case $ac_cv_c_inline in
4904 no) ac_val=;;
4905 *) ac_val=$ac_cv_c_inline;;
4906 esac
4907 cat >>confdefs.h <<_ACEOF
4908#ifndef __cplusplus
4909#define inline $ac_val
4910#endif
4911_ACEOF
4912 ;;
4913esac
4914
4915if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004916
4917$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004918
4919
4920fi
4921
4922
Matthias Kloseb9621712010-04-24 17:59:49 +00004923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4924$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 enableval=$enable_shared;
4928fi
4929
4930
4931if test -z "$enable_shared"
4932then
4933 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004934 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 enable_shared="yes";;
4936 *)
4937 enable_shared="no";;
4938 esac
4939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4941$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4944$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 enableval=$enable_profiling; ac_save_cc="$CC"
4948 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 ac_enable_profiling="no"
4951else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953/* end confdefs.h. */
4954int main() { return 0; }
4955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957 ac_enable_profiling="yes"
4958else
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963fi
4964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 CC="$ac_save_cc"
4966fi
4967
Matthias Kloseb9621712010-04-24 17:59:49 +00004968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4969$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970
4971case "$ac_enable_profiling" in
4972 "yes")
4973 BASECFLAGS="-pg $BASECFLAGS"
4974 LDFLAGS="-pg $LDFLAGS"
4975 ;;
4976esac
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4979$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980
4981# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4982# library that we build, but we do not want to link against it (we
4983# will find it with a -framework option). For this reason there is an
4984# extra variable BLDLIBRARY against which Python and the extension
4985# modules are linked, BLDLIBRARY. This is normally the same as
4986# LDLIBRARY, but empty for MacOSX framework builds.
4987if test "$enable_framework"
4988then
4989 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4990 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4991 BLDLIBRARY=''
4992else
4993 BLDLIBRARY='$(LDLIBRARY)'
4994fi
4995
4996# Other platforms follow
4997if test $enable_shared = "yes"; then
4998
Matthias Kloseb9621712010-04-24 17:59:49 +00004999$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000
5001 case $ac_sys_system in
5002 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005003 LDLIBRARY='libpython$(LDVERSION).dll.a'
5004 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 ;;
5006 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005007 LDLIBRARY='libpython$(LDVERSION).so'
5008 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5010 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005011 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005012 then
5013 PY3LIBRARY=libpython3.so
5014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005016 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005017 LDLIBRARY='libpython$(LDVERSION).so'
5018 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5020 case $ac_sys_system in
5021 FreeBSD*)
5022 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5023 ;;
5024 esac
5025 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005026 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005027 then
5028 PY3LIBRARY=libpython3.so
5029 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 ;;
5031 hp*|HP*)
5032 case `uname -m` in
5033 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005034 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 ;;
5036 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005037 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038 ;;
5039 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005040 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5042 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005044 LDLIBRARY='libpython$(LDVERSION).dylib'
5045 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5047 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005048 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005049 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005050 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5051 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052
5053 esac
5054else # shared is disabled
5055 case $ac_sys_system in
5056 CYGWIN*)
5057 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005058 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 ;;
5060 esac
5061fi
5062
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5064$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5068set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005071if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073else
5074 if test -n "$RANLIB"; then
5075 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5084 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 break 2
5087 fi
5088done
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090IFS=$as_save_IFS
5091
5092fi
5093fi
5094RANLIB=$ac_cv_prog_RANLIB
5095if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5097$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101fi
5102
5103
5104fi
5105if test -z "$ac_cv_prog_RANLIB"; then
5106 ac_ct_RANLIB=$RANLIB
5107 # Extract the first word of "ranlib", so it can be a program name with args.
5108set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005111if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113else
5114 if test -n "$ac_ct_RANLIB"; then
5115 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5124 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 break 2
5127 fi
5128done
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5135if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5137$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141fi
5142
5143 if test "x$ac_ct_RANLIB" = x; then
5144 RANLIB=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150ac_tool_warned=yes ;;
5151esac
5152 RANLIB=$ac_ct_RANLIB
5153 fi
5154else
5155 RANLIB="$ac_cv_prog_RANLIB"
5156fi
5157
5158
5159for ac_prog in ar aal
5160do
5161 # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; 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; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005165if ${ac_cv_prog_AR+:} 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 "$AR"; then
5169 ac_cv_prog_AR="$AR" # 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_AR="$ac_prog"
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
5186fi
5187fi
5188AR=$ac_cv_prog_AR
5189if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5191$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005192else
Matthias Kloseb9621712010-04-24 17:59:49 +00005193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5194$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195fi
5196
5197
5198 test -n "$AR" && break
5199done
5200test -n "$AR" || AR="ar"
5201
5202
5203# tweak ARFLAGS only if the user didn't set it on the command line
5204
5205if test -z "$ARFLAGS"
5206then
5207 ARFLAGS="rc"
5208fi
5209
5210
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005211DISABLE_ASDLGEN=""
5212# Extract the first word of "python", so it can be a program name with args.
5213set dummy python; 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; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005216if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005217 $as_echo_n "(cached) " >&6
5218else
5219 if test -n "$HAS_PYTHON"; then
5220 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # 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_PYTHON="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_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5238fi
5239fi
5240HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5241if test -n "$HAS_PYTHON"; then
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5243$as_echo "$HAS_PYTHON" >&6; }
5244else
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }
5247fi
5248
5249
5250if test $HAS_HG != found -o $HAS_PYTHON != found
5251then
5252 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5253fi
5254
5255
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256case $MACHDEP in
5257bsdos*|hp*|HP*)
5258 # install -d does not work on BSDI or HP-UX
5259 if test -z "$INSTALL"
5260 then
5261 INSTALL="${srcdir}/install-sh -c"
5262 fi
5263esac
5264ac_aux_dir=
5265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266 if test -f "$ac_dir/install-sh"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/install-sh -c"
5269 break
5270 elif test -f "$ac_dir/install.sh"; then
5271 ac_aux_dir=$ac_dir
5272 ac_install_sh="$ac_aux_dir/install.sh -c"
5273 break
5274 elif test -f "$ac_dir/shtool"; then
5275 ac_aux_dir=$ac_dir
5276 ac_install_sh="$ac_aux_dir/shtool install -c"
5277 break
5278 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279done
5280if test -z "$ac_aux_dir"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# These three variables are undocumented and unsupported,
5285# and are intended to be withdrawn in a future Autoconf release.
5286# They can cause serious problems if a builder's source tree is in a directory
5287# whose full name contains unusual characters.
5288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5291
5292
5293# Find a good install program. We prefer a C program (faster),
5294# so one script is as good as another. But avoid the broken or
5295# incompatible versions:
5296# SysV /etc/install, /usr/sbin/install
5297# SunOS /usr/etc/install
5298# IRIX /sbin/install
5299# AIX /bin/install
5300# AmigaOS /C/install, which installs bootblocks on floppy discs
5301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5304# OS/2's system install, which has a completely different semantic
5305# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005306# Reject install programs that cannot install multiple files.
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5308$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005310if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312else
5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5314for as_dir in $PATH
5315do
5316 IFS=$as_save_IFS
5317 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 # Account for people who put trailing slashes in PATH elements.
5319case $as_dir/ in #((
5320 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323 /usr/ucb/* ) ;;
5324 *)
5325 # OSF1 and SCO ODT 3.0 have their own names for install.
5326 # Don't use installbsd from OSF since it installs stuff as root
5327 # by default.
5328 for ac_prog in ginstall scoinst install; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5331 if test $ac_prog = install &&
5332 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5333 # AIX install. It has an incompatible calling convention.
5334 :
5335 elif test $ac_prog = install &&
5336 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5337 # program-specific install script used by HP pwplus--don't use.
5338 :
5339 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 rm -rf conftest.one conftest.two conftest.dir
5341 echo one > conftest.one
5342 echo two > conftest.two
5343 mkdir conftest.dir
5344 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5345 test -s conftest.one && test -s conftest.two &&
5346 test -s conftest.dir/conftest.one &&
5347 test -s conftest.dir/conftest.two
5348 then
5349 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5350 break 3
5351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 fi
5353 fi
5354 done
5355 done
5356 ;;
5357esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005358
5359 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360IFS=$as_save_IFS
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365 if test "${ac_cv_path_install+set}" = set; then
5366 INSTALL=$ac_cv_path_install
5367 else
5368 # As a last resort, use the slow shell script. Don't cache a
5369 # value for INSTALL within a source directory, because that will
5370 # break other packages using the cache if that directory is
5371 # removed, or if the value is a relative name.
5372 INSTALL=$ac_install_sh
5373 fi
5374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5376$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377
5378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5379# It thinks the first close brace ends the variable substitution.
5380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5381
5382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5383
5384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5385
Matthias Klose93a0ef12012-03-15 18:08:34 +01005386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5387$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5388if test -z "$MKDIR_P"; then
5389 if ${ac_cv_path_mkdir+:} false; then :
5390 $as_echo_n "(cached) " >&6
5391else
5392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5394do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
5397 for ac_prog in mkdir gmkdir; do
5398 for ac_exec_ext in '' $ac_executable_extensions; do
5399 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5400 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5401 'mkdir (GNU coreutils) '* | \
5402 'mkdir (coreutils) '* | \
5403 'mkdir (fileutils) '4.1*)
5404 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5405 break 3;;
5406 esac
5407 done
5408 done
5409 done
5410IFS=$as_save_IFS
5411
5412fi
5413
5414 test -d ./--version && rmdir ./--version
5415 if test "${ac_cv_path_mkdir+set}" = set; then
5416 MKDIR_P="$ac_cv_path_mkdir -p"
5417 else
5418 # As a last resort, use the slow shell script. Don't cache a
5419 # value for MKDIR_P within a source directory, because that will
5420 # break other packages using the cache if that directory is
5421 # removed, or if the value is a relative name.
5422 MKDIR_P="$ac_install_sh -d"
5423 fi
5424fi
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5426$as_echo "$MKDIR_P" >&6; }
5427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428
5429# Not every filesystem supports hard links
5430
5431if test -z "$LN" ; then
5432 case $ac_sys_system in
5433 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 *) LN=ln;;
5435 esac
5436fi
5437
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005438# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005439
5440ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5444$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445
5446# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005447if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448 withval=$with_pydebug;
5449if test "$withval" != no
5450then
5451
Matthias Kloseb9621712010-04-24 17:59:49 +00005452$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5455$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005457 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005458else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460fi
5461else
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464fi
5465
5466
5467# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5468# merged with this chunk of code?
5469
5470# Optimizer/debugger flags
5471# ------------------------
5472# (The following bit of code is complicated enough - please keep things
5473# indented properly. Just pretend you're editing Python code. ;-)
5474
5475# There are two parallel sets of case statements below, one that checks to
5476# see if OPT was set and one that does BASECFLAGS setting based upon
5477# compiler and platform. BASECFLAGS tweaks need to be made even if the
5478# user set OPT.
5479
5480# tweak OPT based on compiler and platform, only if the user didn't set
5481# it on the command line
5482
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005483if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484then
5485 case $GCC in
5486 yes)
5487 if test "$CC" != 'g++' ; then
5488 STRICT_PROTO="-Wstrict-prototypes"
5489 fi
5490 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5491 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5492 WRAP="-fwrapv"
5493 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005494
5495 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005496 case $CC in
5497 *clang*) WRAP="-fwrapv"
5498 ;;
5499 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 case $ac_cv_prog_cc_g in
5502 yes)
5503 if test "$Py_DEBUG" = 'true' ; then
5504 # Optimization messes up debuggers, so turn it off for
5505 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005506 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507 else
5508 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5509 fi
5510 ;;
5511 *)
5512 OPT="-O3 -Wall $STRICT_PROTO"
5513 ;;
5514 esac
5515 case $ac_sys_system in
5516 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5517 ;;
5518 esac
5519 ;;
5520
5521 *)
5522 OPT="-O"
5523 ;;
5524 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525fi
5526
5527
5528
5529# The -arch flags for universal builds on OSX
5530UNIVERSAL_ARCH_FLAGS=
5531
5532
5533# tweak BASECFLAGS based on compiler and platform
5534case $GCC in
5535yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005536 # Python doesn't violate C99 aliasing rules, but older versions of
5537 # GCC produce warnings for legal Python code. Enable
5538 # -fno-strict-aliasing on versions of GCC that support but produce
5539 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5541$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542 ac_save_cc="$CC"
5543 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005544 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005545 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005547else
Matthias Kloseb9621712010-04-24 17:59:49 +00005548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005550
Matthias Kloseb159a552010-04-25 21:00:44 +00005551
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005552int
5553main ()
5554{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005555
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556 ;
5557 return 0;
5558}
Matthias Kloseb159a552010-04-25 21:00:44 +00005559
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005561if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005562
5563 CC="$ac_save_cc -fstrict-aliasing"
5564 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005566/* end confdefs.h. */
5567
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005568 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005569int
5570main ()
5571{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005572double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005573 ;
5574 return 0;
5575}
Matthias Kloseb159a552010-04-25 21:00:44 +00005576
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005578if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005579
5580 ac_cv_no_strict_aliasing=no
5581
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582else
Matthias Kloseb159a552010-04-25 21:00:44 +00005583
5584 ac_cv_no_strict_aliasing=yes
5585
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005586fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005588
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005589else
Matthias Kloseb159a552010-04-25 21:00:44 +00005590
5591 ac_cv_no_strict_aliasing=no
5592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005595fi
5596
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005597 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5600$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005601 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 then
5603 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5604 fi
5605
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5607$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5608 ac_save_cc="$CC"
5609 CC="$CC -Wunused-result -Werror"
5610 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005611 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005612 $as_echo_n "(cached) " >&6
5613else
5614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h. */
5616
5617
5618int
5619main ()
5620{
5621
5622 ;
5623 return 0;
5624}
5625
5626_ACEOF
5627if ac_fn_c_try_compile "$LINENO"; then :
5628
5629 ac_cv_disable_unused_result_warning=yes
5630
5631else
5632
5633 ac_cv_disable_unused_result_warning=no
5634
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638
5639 CFLAGS="$save_CFLAGS"
5640 CC="$ac_save_cc"
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5642$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5643
5644 if test $ac_cv_disable_unused_result_warning = yes
5645 then
5646 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5647 fi
5648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5650 # support. Without this, treatment of subnormals doesn't follow
5651 # the standard.
5652 case $ac_sys_machine in
5653 alpha*)
5654 BASECFLAGS="$BASECFLAGS -mieee"
5655 ;;
5656 esac
5657
5658 case $ac_sys_system in
5659 SCO_SV*)
5660 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5661 ;;
5662 # is there any other compiler on Darwin besides gcc?
5663 Darwin*)
5664 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5665 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005666 if test "${CC}" = gcc
5667 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5669$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005670 case "${UNIVERSALSDK}" in
5671 */MacOSX10.4u.sdk)
5672 # Build using 10.4 SDK, force usage of gcc when the
5673 # compiler is gcc, otherwise the user will get very
5674 # confusing error messages when building on OSX 10.6
5675 CC=gcc-4.0
5676 CPP=cpp-4.0
5677 ;;
5678 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5680$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005681 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682
5683
5684 if test "${enable_universalsdk}"; then
5685 UNIVERSAL_ARCH_FLAGS=""
5686 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5687 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5688 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005689 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5691 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005692 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005693 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694
5695 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5696 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005697 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005698 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005700 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5701 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005702 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005703 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005704
5705 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5706 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005707 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005708 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005711 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 +00005712
5713 fi
5714
5715
Ronald Oussoren666028b2010-04-18 19:07:43 +00005716 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5717 if test "${UNIVERSALSDK}" != "/"
5718 then
5719 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5720 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005721 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 fi
5723 fi
5724
5725 # Calculate the right deployment target for this build.
5726 #
5727 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5728 if test ${cur_target} '>' 10.2; then
5729 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005730 if test ${enable_universalsdk}; then
5731 if test "${UNIVERSAL_ARCHS}" = "all"; then
5732 # Ensure that the default platform for a
5733 # 4-way universal build is OSX 10.5,
5734 # that's the first OS release where
5735 # 4-way builds make sense.
5736 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005737
5738 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5739 cur_target='10.5'
5740
5741 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5742 cur_target='10.5'
5743
5744 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5745 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005746 fi
5747 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005748 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005749 # On Intel macs default to a deployment
5750 # target of 10.4, that's the first OSX
5751 # release with Intel support.
5752 cur_target="10.4"
5753 fi
5754 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 fi
5756 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5757
5758 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5759 # environment with a value that is the same as what we'll use
5760 # in the Makefile to ensure that we'll get the same compiler
5761 # environment during configure and build time.
5762 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5763 export MACOSX_DEPLOYMENT_TARGET
5764 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5765
5766 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 esac
5768 ;;
5769
5770*)
5771 case $ac_sys_system in
5772 OpenUNIX*|UnixWare*)
5773 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5774 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 SCO_SV*)
5776 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5777 ;;
5778 esac
5779 ;;
5780esac
5781
5782if test "$Py_DEBUG" = 'true'; then
5783 :
5784else
5785 OPT="-DNDEBUG $OPT"
5786fi
5787
5788if test "$ac_arch_flags"
5789then
5790 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5791fi
5792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793# Check whether GCC supports PyArg_ParseTuple format
5794if test "$GCC" = "yes"
5795then
Matthias Kloseb9621712010-04-24 17:59:49 +00005796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5797$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798 save_CFLAGS=$CFLAGS
5799 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801/* end confdefs.h. */
5802
5803 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804int
5805main ()
5806{
5807
5808 ;
5809 return 0;
5810}
Matthias Kloseb159a552010-04-25 21:00:44 +00005811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb159a552010-04-25 21:00:44 +00005815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
Matthias Kloseb159a552010-04-25 21:00:44 +00005818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005819$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
Matthias Kloseb159a552010-04-25 21:00:44 +00005822
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005824$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825
5826fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828 CFLAGS=$save_CFLAGS
5829fi
5830
5831# On some compilers, pthreads are available without further options
5832# (e.g. MacOS X). On some of these systems, the compiler will not
5833# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5834# So we have to see first whether pthreads are available without
5835# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5837$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005838if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840else
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842 ac_cv_pthread_is_default=no
5843else
Matthias Kloseb9621712010-04-24 17:59:49 +00005844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845/* end confdefs.h. */
5846
5847#include <pthread.h>
5848
5849void* routine(void* p){return NULL;}
5850
5851int main(){
5852 pthread_t p;
5853 if(pthread_create(&p,NULL,routine,NULL)!=0)
5854 return 1;
5855 (void)pthread_detach(p);
5856 return 0;
5857}
5858
5859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005860if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
5862 ac_cv_pthread_is_default=yes
5863 ac_cv_kthread=no
5864 ac_cv_pthread=no
5865
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
5872
5873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874fi
5875
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5877$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
5879
5880if test $ac_cv_pthread_is_default = yes
5881then
5882 ac_cv_kpthread=no
5883else
5884# -Kpthread, if available, provides the right #defines
5885# and linker options to make pthread_create available
5886# Some compilers won't report that they do not support -Kpthread,
5887# so we need to run a program to see whether it really made the
5888# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5890$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005891if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005892 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893else
5894 ac_save_cc="$CC"
5895CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005896if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ac_cv_kpthread=no
5898else
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900/* end confdefs.h. */
5901
5902#include <pthread.h>
5903
5904void* routine(void* p){return NULL;}
5905
5906int main(){
5907 pthread_t p;
5908 if(pthread_create(&p,NULL,routine,NULL)!=0)
5909 return 1;
5910 (void)pthread_detach(p);
5911 return 0;
5912}
5913
5914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005915if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ac_cv_kpthread=yes
5917else
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922fi
5923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924CC="$ac_save_cc"
5925fi
5926
Matthias Kloseb9621712010-04-24 17:59:49 +00005927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5928$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
5930
5931if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5932then
5933# -Kthread, if available, provides the right #defines
5934# and linker options to make pthread_create available
5935# Some compilers won't report that they do not support -Kthread,
5936# so we need to run a program to see whether it really made the
5937# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5939$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005940if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942else
5943 ac_save_cc="$CC"
5944CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005945if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ac_cv_kthread=no
5947else
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949/* end confdefs.h. */
5950
5951#include <pthread.h>
5952
5953void* routine(void* p){return NULL;}
5954
5955int main(){
5956 pthread_t p;
5957 if(pthread_create(&p,NULL,routine,NULL)!=0)
5958 return 1;
5959 (void)pthread_detach(p);
5960 return 0;
5961}
5962
5963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005964if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_kthread=yes
5966else
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971fi
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973CC="$ac_save_cc"
5974fi
5975
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5977$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
5980if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5981then
5982# -pthread, if available, provides the right #defines
5983# and linker options to make pthread_create available
5984# Some compilers won't report that they do not support -pthread,
5985# so we need to run a program to see whether it really made the
5986# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5988$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005989if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
5992 ac_save_cc="$CC"
5993CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005994if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 ac_cv_pthread=no
5996else
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998/* end confdefs.h. */
5999
6000#include <pthread.h>
6001
6002void* routine(void* p){return NULL;}
6003
6004int main(){
6005 pthread_t p;
6006 if(pthread_create(&p,NULL,routine,NULL)!=0)
6007 return 1;
6008 (void)pthread_detach(p);
6009 return 0;
6010}
6011
6012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006013if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ac_cv_pthread=yes
6015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020fi
6021
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022CC="$ac_save_cc"
6023fi
6024
Matthias Kloseb9621712010-04-24 17:59:49 +00006025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6026$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028
6029# If we have set a CC compiler flag for thread support then
6030# check if it works for CXX, too.
6031ac_cv_cxx_thread=no
6032if test ! -z "$CXX"
6033then
Matthias Kloseb9621712010-04-24 17:59:49 +00006034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6035$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036ac_save_cxx="$CXX"
6037
6038if test "$ac_cv_kpthread" = "yes"
6039then
6040 CXX="$CXX -Kpthread"
6041 ac_cv_cxx_thread=yes
6042elif test "$ac_cv_kthread" = "yes"
6043then
6044 CXX="$CXX -Kthread"
6045 ac_cv_cxx_thread=yes
6046elif test "$ac_cv_pthread" = "yes"
6047then
6048 CXX="$CXX -pthread"
6049 ac_cv_cxx_thread=yes
6050fi
6051
6052if test $ac_cv_cxx_thread = yes
6053then
6054 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6055 $CXX -c conftest.$ac_ext 2>&5
6056 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6057 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6058 then
6059 ac_cv_cxx_thread=yes
6060 else
6061 ac_cv_cxx_thread=no
6062 fi
6063 rm -fr conftest*
6064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6066$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067fi
6068CXX="$ac_save_cxx"
6069
6070
6071# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6073$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006074if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078/* end confdefs.h. */
6079#include <stdlib.h>
6080#include <stdarg.h>
6081#include <string.h>
6082#include <float.h>
6083
6084int
6085main ()
6086{
6087
6088 ;
6089 return 0;
6090}
6091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006092if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093 ac_cv_header_stdc=yes
6094else
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6098
6099if test $ac_cv_header_stdc = yes; then
6100 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102/* end confdefs.h. */
6103#include <string.h>
6104
6105_ACEOF
6106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 $EGREP "memchr" >/dev/null 2>&1; then :
6108
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006109else
6110 ac_cv_header_stdc=no
6111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006112rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113
6114fi
6115
6116if test $ac_cv_header_stdc = yes; then
6117 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119/* end confdefs.h. */
6120#include <stdlib.h>
6121
6122_ACEOF
6123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 $EGREP "free" >/dev/null 2>&1; then :
6125
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126else
6127 ac_cv_header_stdc=no
6128fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006129rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130
6131fi
6132
6133if test $ac_cv_header_stdc = yes; then
6134 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136 :
6137else
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139/* end confdefs.h. */
6140#include <ctype.h>
6141#include <stdlib.h>
6142#if ((' ' & 0x0FF) == 0x020)
6143# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6144# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6145#else
6146# define ISLOWER(c) \
6147 (('a' <= (c) && (c) <= 'i') \
6148 || ('j' <= (c) && (c) <= 'r') \
6149 || ('s' <= (c) && (c) <= 'z'))
6150# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6151#endif
6152
6153#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6154int
6155main ()
6156{
6157 int i;
6158 for (i = 0; i < 256; i++)
6159 if (XOR (islower (i), ISLOWER (i))
6160 || toupper (i) != TOUPPER (i))
6161 return 2;
6162 return 0;
6163}
6164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if ac_fn_c_try_run "$LINENO"; then :
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167else
Matthias Kloseb9621712010-04-24 17:59:49 +00006168 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6171 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172fi
6173
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174fi
6175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6177$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178if test $ac_cv_header_stdc = yes; then
6179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181
6182fi
6183
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006184for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006185fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006186ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006187sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006188unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006189poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006190sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006191sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006192sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006193sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006194sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006195libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006196bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006197do :
6198 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6199ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006200if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006201 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006202#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006203_ACEOF
6204
6205fi
6206
Guido van Rossum627b2d71993-12-24 10:39:16 +00006207done
6208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006209ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006210for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6213$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006214if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006218/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006219#include <sys/types.h>
6220#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006221
Martin v. Löwis11437992002-04-12 09:54:03 +00006222int
6223main ()
6224{
6225if ((DIR *) 0)
6226return 0;
6227 ;
6228 return 0;
6229}
6230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006232 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006233else
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006238eval ac_res=\$$as_ac_Header
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6240$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006241if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006243#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006244_ACEOF
6245
6246ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006247fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006248
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006249done
6250# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6251if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6253$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006254if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256else
Martin v. Löwis11437992002-04-12 09:54:03 +00006257 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261/* Override any GCC internal prototype to avoid an error.
6262 Use char because int might match the return type of a GCC
6263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006264#ifdef __cplusplus
6265extern "C"
6266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006267char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006268int
6269main ()
6270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006272 ;
6273 return 0;
6274}
6275_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276for ac_lib in '' dir; do
6277 if test -z "$ac_lib"; then
6278 ac_res="none required"
6279 else
6280 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006281 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006286rm -f core conftest.err conftest.$ac_objext \
6287 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006288 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006291done
Victor Stinnere0be4232011-10-25 13:06:09 +02006292if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294else
6295 ac_cv_search_opendir=no
6296fi
6297rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006298LIBS=$ac_func_search_save_LIBS
6299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6301$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006302ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006303if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006304 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006307
Michael W. Hudson54241132001-12-07 15:38:26 +00006308else
Matthias Kloseb9621712010-04-24 17:59:49 +00006309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6310$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006311if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006313else
6314 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318/* Override any GCC internal prototype to avoid an error.
6319 Use char because int might match the return type of a GCC
6320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006321#ifdef __cplusplus
6322extern "C"
6323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006324char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006325int
6326main ()
6327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006329 ;
6330 return 0;
6331}
6332_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006333for ac_lib in '' x; do
6334 if test -z "$ac_lib"; then
6335 ac_res="none required"
6336 else
6337 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006338 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006339 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006343rm -f core conftest.err conftest.$ac_objext \
6344 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006345 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006346 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006348done
Victor Stinnere0be4232011-10-25 13:06:09 +02006349if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351else
6352 ac_cv_search_opendir=no
6353fi
6354rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006355LIBS=$ac_func_search_save_LIBS
6356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6358$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006360if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006361 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006362
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006363fi
6364
6365fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006366
Matthias Kloseb9621712010-04-24 17:59:49 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6368$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006369if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006371else
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006373/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006374#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006375int
6376main ()
6377{
6378return makedev(0, 0);
6379 ;
6380 return 0;
6381}
6382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384 ac_cv_header_sys_types_h_makedev=yes
6385else
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006388rm -f core conftest.err conftest.$ac_objext \
6389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006390
6391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6393$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006394
6395if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006396ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006397if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006398
Matthias Kloseb9621712010-04-24 17:59:49 +00006399$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006400
6401fi
6402
6403
6404
6405 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006407if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006408
Matthias Kloseb9621712010-04-24 17:59:49 +00006409$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410
6411fi
6412
6413
6414 fi
6415fi
6416
Michael W. Hudson54241132001-12-07 15:38:26 +00006417
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006418# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6419for ac_header in net/if.h
6420do :
6421 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6422#ifdef STDC_HEADERS
6423# include <stdlib.h>
6424# include <stddef.h>
6425#else
6426# ifdef HAVE_STDLIB_H
6427# include <stdlib.h>
6428# endif
6429#endif
6430#ifdef HAVE_SYS_SOCKET_H
6431# include <sys/socket.h>
6432#endif
6433
6434"
Victor Stinnere0be4232011-10-25 13:06:09 +02006435if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006436 cat >>confdefs.h <<_ACEOF
6437#define HAVE_NET_IF_H 1
6438_ACEOF
6439
6440fi
6441
6442done
6443
6444
6445
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006446# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006447for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006448do :
6449 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006450#ifdef HAVE_CURSES_H
6451#include <curses.h>
6452#endif
6453
Matthias Kloseb9621712010-04-24 17:59:49 +00006454"
Victor Stinnere0be4232011-10-25 13:06:09 +02006455if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006456 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006457#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006458_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006459
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006460fi
6461
6462done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006463
6464
Martin v. Löwis11017b12006-01-14 18:12:57 +00006465# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006466for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006467do :
6468 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 +00006469#ifdef HAVE_ASM_TYPES_H
6470#include <asm/types.h>
6471#endif
6472#ifdef HAVE_SYS_SOCKET_H
6473#include <sys/socket.h>
6474#endif
6475
Matthias Kloseb9621712010-04-24 17:59:49 +00006476"
Victor Stinnere0be4232011-10-25 13:06:09 +02006477if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006479#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006480_ACEOF
6481
6482fi
6483
6484done
6485
6486
Charles-François Natali47413c12011-10-06 19:47:44 +02006487# On Linux, can.h and can/raw.h require sys/socket.h
6488for ac_header in linux/can.h linux/can/raw.h
6489do :
6490 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6491ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6492#ifdef HAVE_SYS_SOCKET_H
6493#include <sys/socket.h>
6494#endif
6495
6496"
6497if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6498 cat >>confdefs.h <<_ACEOF
6499#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6500_ACEOF
6501
6502fi
6503
6504done
6505
6506
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006508was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6510$as_echo_n "checking for clock_t in time.h... " >&6; }
6511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006513#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006514
6515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006517 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006518 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521
Matthias Kloseb9621712010-04-24 17:59:49 +00006522$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006524
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006526rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Matthias Kloseb9621712010-04-24 17:59:49 +00006528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6529$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006530
Matthias Kloseb9621712010-04-24 17:59:49 +00006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6532$as_echo_n "checking for makedev... " >&6; }
6533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006534/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006535
Jesus Cea740f53a2010-04-28 11:35:30 +00006536#if defined(MAJOR_IN_MKDEV)
6537#include <sys/mkdev.h>
6538#elif defined(MAJOR_IN_SYSMACROS)
6539#include <sys/sysmacros.h>
6540#else
6541#include <sys/types.h>
6542#endif
6543
Neal Norwitz11690112002-07-30 01:08:28 +00006544int
6545main ()
6546{
Jesus Cea740f53a2010-04-28 11:35:30 +00006547
6548 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ;
6550 return 0;
6551}
Matthias Kloseb159a552010-04-25 21:00:44 +00006552
Neal Norwitz11690112002-07-30 01:08:28 +00006553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006554if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006555 ac_cv_has_makedev=yes
6556else
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006559rm -f core conftest.err conftest.$ac_objext \
6560 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6562$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006563if test "$ac_cv_has_makedev" = "yes"; then
6564
Matthias Kloseb9621712010-04-24 17:59:49 +00006565$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006566
6567fi
6568
Martin v. Löwis399a6892002-10-04 10:22:02 +00006569# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6570# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6571# defined, but the compiler does not support pragma redefine_extname,
6572# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6573# structures (such as rlimit64) without declaring them. As a
6574# work-around, disable LFS on such configurations
6575
6576use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6578$as_echo_n "checking Solaris LFS bug... " >&6; }
6579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006580/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006581
6582#define _LARGEFILE_SOURCE 1
6583#define _FILE_OFFSET_BITS 64
6584#include <sys/resource.h>
6585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586int
6587main ()
6588{
6589struct rlimit foo;
6590 ;
6591 return 0;
6592}
6593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006595 sol_lfs_bug=no
6596else
Matthias Kloseb9621712010-04-24 17:59:49 +00006597 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6601$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602if test "$sol_lfs_bug" = "yes"; then
6603 use_lfs=no
6604fi
6605
6606if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006607# Two defines needed to enable largefile support on various platforms
6608# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006609case $ac_sys_system/$ac_sys_release in
6610AIX*)
6611
6612$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6613
6614 ;;
6615esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006616
Matthias Kloseb9621712010-04-24 17:59:49 +00006617$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006621
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006623
Guido van Rossum84e7b241996-08-19 21:59:00 +00006624# Add some code to confdefs.h so that the test for off_t works on SCO
6625cat >> confdefs.h <<\EOF
6626#if defined(SCO_DS)
6627#undef _OFF_T
6628#endif
6629EOF
6630
Guido van Rossumef2255b2000-03-10 22:30:29 +00006631# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006632ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006633if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006635else
Martin v. Löwis11437992002-04-12 09:54:03 +00006636
6637cat >>confdefs.h <<_ACEOF
6638#define mode_t int
6639_ACEOF
6640
6641fi
6642
Matthias Kloseb9621712010-04-24 17:59:49 +00006643ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006644if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006646else
Martin v. Löwis11437992002-04-12 09:54:03 +00006647
6648cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006649#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
6651
6652fi
6653
Matthias Kloseb9621712010-04-24 17:59:49 +00006654ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006655if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006656
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657else
Martin v. Löwis11437992002-04-12 09:54:03 +00006658
6659cat >>confdefs.h <<_ACEOF
6660#define pid_t int
6661_ACEOF
6662
6663fi
6664
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006667#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006669
Matthias Kloseb9621712010-04-24 17:59:49 +00006670ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006671if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673else
Martin v. Löwis11437992002-04-12 09:54:03 +00006674
6675cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006676#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006677_ACEOF
6678
6679fi
6680
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6682$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006683if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006688#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006689
6690_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693 ac_cv_type_uid_t=yes
6694else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006695 ac_cv_type_uid_t=no
6696fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006697rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006698
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6701$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006702if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006703
Matthias Kloseb9621712010-04-24 17:59:49 +00006704$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006705
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708
6709fi
6710
Matthias Kloseb9621712010-04-24 17:59:49 +00006711ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6712case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006713 no|yes) ;; #(
6714 *)
6715
Matthias Kloseb9621712010-04-24 17:59:49 +00006716$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006717
6718
6719cat >>confdefs.h <<_ACEOF
6720#define uint32_t $ac_cv_c_uint32_t
6721_ACEOF
6722;;
6723 esac
6724
Matthias Kloseb9621712010-04-24 17:59:49 +00006725ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6726case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006727 no|yes) ;; #(
6728 *)
6729
Matthias Kloseb9621712010-04-24 17:59:49 +00006730$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006731
6732
6733cat >>confdefs.h <<_ACEOF
6734#define uint64_t $ac_cv_c_uint64_t
6735_ACEOF
6736;;
6737 esac
6738
Matthias Kloseb9621712010-04-24 17:59:49 +00006739ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6740case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006741 no|yes) ;; #(
6742 *)
6743
6744cat >>confdefs.h <<_ACEOF
6745#define int32_t $ac_cv_c_int32_t
6746_ACEOF
6747;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006748esac
6749
Matthias Kloseb9621712010-04-24 17:59:49 +00006750ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6751case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006752 no|yes) ;; #(
6753 *)
6754
6755cat >>confdefs.h <<_ACEOF
6756#define int64_t $ac_cv_c_int64_t
6757_ACEOF
6758;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006759esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006760
Matthias Kloseb9621712010-04-24 17:59:49 +00006761ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006762if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763
Matthias Kloseb9621712010-04-24 17:59:49 +00006764$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006765
6766fi
6767
Jack Jansendd19cf82001-12-06 22:36:17 +00006768
Michael W. Hudson54241132001-12-07 15:38:26 +00006769# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006770# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771# The cast to long int works around a bug in the HP C Compiler
6772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6774# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6776$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006777if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 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 +00006781
Martin v. Löwis11437992002-04-12 09:54:03 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 if test "$ac_cv_type_int" = yes; then
6784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006786as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02006787See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006788 else
6789 ac_cv_sizeof_int=0
6790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6795$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006796
6797
6798
Martin v. Löwis11437992002-04-12 09:54:03 +00006799cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006800#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006801_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006802
6803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006804# The cast to long int works around a bug in the HP C Compiler
6805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6807# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6809$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006810if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006812else
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 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 +00006814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 if test "$ac_cv_type_long" = yes; then
6817 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006819as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02006820See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821 else
6822 ac_cv_sizeof_long=0
6823 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6828$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006829
6830
6831
Martin v. Löwis11437992002-04-12 09:54:03 +00006832cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006833#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006834_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006835
6836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006837# The cast to long int works around a bug in the HP C Compiler
6838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6842$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006843if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006845else
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 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 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848else
Matthias Kloseb9621712010-04-24 17:59:49 +00006849 if test "$ac_cv_type_void_p" = yes; then
6850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006852as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02006853See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 else
6855 ac_cv_sizeof_void_p=0
6856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6861$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006862
6863
6864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006866#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006867_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006868
6869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870# The cast to long int works around a bug in the HP C Compiler
6871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6875$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006876if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006878else
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 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 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881else
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 if test "$ac_cv_type_short" = yes; then
6883 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006885as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02006886See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887 else
6888 ac_cv_sizeof_short=0
6889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6894$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896
6897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006899#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006900_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006901
6902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903# The cast to long int works around a bug in the HP C Compiler
6904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6906# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6908$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006909if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 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 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 if test "$ac_cv_type_float" = yes; then
6916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006918as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02006919See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920 else
6921 ac_cv_sizeof_float=0
6922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6927$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006928
6929
6930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006932#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006933_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006934
6935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006936# The cast to long int works around a bug in the HP C Compiler
6937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6939# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6941$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006942if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006944else
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 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 +00006946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947else
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 if test "$ac_cv_type_double" = yes; then
6949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006951as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02006952See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953 else
6954 ac_cv_sizeof_double=0
6955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6960$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961
6962
6963
Martin v. Löwis11437992002-04-12 09:54:03 +00006964cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006965#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006967
6968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969# The cast to long int works around a bug in the HP C Compiler
6970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6974$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006975if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006977else
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 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 +00006979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 if test "$ac_cv_type_fpos_t" = yes; then
6982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006984as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02006985See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986 else
6987 ac_cv_sizeof_fpos_t=0
6988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006990
Martin v. Löwis11437992002-04-12 09:54:03 +00006991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6993$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994
6995
6996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006998#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006999_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007000
Michael W. Hudson54241132001-12-07 15:38:26 +00007001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002# The cast to long int works around a bug in the HP C Compiler
7003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7005# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7007$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007008if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007009 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007010else
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 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 +00007012
Martin v. Löwis18e16552006-02-15 17:27:45 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 if test "$ac_cv_type_size_t" = yes; then
7015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007017as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007018See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019 else
7020 ac_cv_sizeof_size_t=0
7021 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007023
Martin v. Löwis18e16552006-02-15 17:27:45 +00007024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7026$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027
7028
7029
Martin v. Löwis18e16552006-02-15 17:27:45 +00007030cat >>confdefs.h <<_ACEOF
7031#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7032_ACEOF
7033
7034
Christian Heimes400adb02008-02-01 08:12:03 +00007035# The cast to long int works around a bug in the HP C Compiler
7036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7040$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007041if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 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 +00007045
Christian Heimes400adb02008-02-01 08:12:03 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if test "$ac_cv_type_pid_t" = yes; then
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007050as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007051See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007052 else
7053 ac_cv_sizeof_pid_t=0
7054 fi
7055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056
Christian Heimes400adb02008-02-01 08:12:03 +00007057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7059$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007060
7061
7062
7063cat >>confdefs.h <<_ACEOF
7064#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7065_ACEOF
7066
7067
Michael W. Hudson54241132001-12-07 15:38:26 +00007068
Matthias Kloseb9621712010-04-24 17:59:49 +00007069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7070$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007071have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007073/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075int
7076main ()
7077{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007078long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007079 ;
7080 return 0;
7081}
7082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007084
7085
Matthias Kloseb9621712010-04-24 17:59:49 +00007086$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007088 have_long_long=yes
7089
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7093$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007094if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095# The cast to long int works around a bug in the HP C Compiler
7096# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7097# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7098# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7100$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007101if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 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 +00007105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 if test "$ac_cv_type_long_long" = yes; then
7108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007110as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007111See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112 else
7113 ac_cv_sizeof_long_long=0
7114 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007116
Martin v. Löwis11437992002-04-12 09:54:03 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7119$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007120
7121
7122
Martin v. Löwis11437992002-04-12 09:54:03 +00007123cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007124#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007126
Michael W. Hudson54241132001-12-07 15:38:26 +00007127
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007128fi
7129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7131$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007132have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007134/* end confdefs.h. */
7135
7136int
7137main ()
7138{
7139long double x; x = (long double)0;
7140 ;
7141 return 0;
7142}
7143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007144if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007145
7146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007148
7149 have_long_double=yes
7150
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007151fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7154$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007155if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007156# The cast to long int works around a bug in the HP C Compiler
7157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7159# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7161$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 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 +00007166
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_long_double" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007171as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007172See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007173 else
7174 ac_cv_sizeof_long_double=0
7175 fi
7176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7180$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007181
7182
7183
7184cat >>confdefs.h <<_ACEOF
7185#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7186_ACEOF
7187
7188
7189fi
7190
7191
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7193$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007194have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007196/* end confdefs.h. */
7197
7198int
7199main ()
7200{
7201_Bool x; x = (_Bool)0;
7202 ;
7203 return 0;
7204}
7205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007207
7208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007210
7211 have_c99_bool=yes
7212
Thomas Woutersb2137042007-02-01 18:02:27 +00007213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7216$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007217if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218# The cast to long int works around a bug in the HP C Compiler
7219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7223$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007224if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 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 +00007228
Thomas Woutersb2137042007-02-01 18:02:27 +00007229else
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 if test "$ac_cv_type__Bool" = yes; then
7231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007233as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007234See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007235 else
7236 ac_cv_sizeof__Bool=0
7237 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239
Thomas Woutersb2137042007-02-01 18:02:27 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7242$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007243
7244
7245
Thomas Woutersb2137042007-02-01 18:02:27 +00007246cat >>confdefs.h <<_ACEOF
7247#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7248_ACEOF
7249
7250
7251fi
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007254 #include <stdint.h>
7255 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007256 #ifdef HAVE_INTTYPES_H
7257 #include <inttypes.h>
7258 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007259"
Victor Stinnere0be4232011-10-25 13:06:09 +02007260if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007261
7262cat >>confdefs.h <<_ACEOF
7263#define HAVE_UINTPTR_T 1
7264_ACEOF
7265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007266# The cast to long int works around a bug in the HP C Compiler
7267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7269# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7271$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007272if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007274else
Matthias Kloseb9621712010-04-24 17:59:49 +00007275 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 +00007276
Martin v. Löwis11437992002-04-12 09:54:03 +00007277else
Matthias Kloseb9621712010-04-24 17:59:49 +00007278 if test "$ac_cv_type_uintptr_t" = yes; then
7279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007281as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007282See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007283 else
7284 ac_cv_sizeof_uintptr_t=0
7285 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287
Martin v. Löwis11437992002-04-12 09:54:03 +00007288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7290$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007291
7292
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007295#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007296_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007297
Michael W. Hudson54241132001-12-07 15:38:26 +00007298
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007299fi
7300
Thomas Wouters89f507f2006-12-13 04:49:30 +00007301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007302# The cast to long int works around a bug in the HP C Compiler
7303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7305# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7307$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007308if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007312#ifdef HAVE_SYS_TYPES_H
7313#include <sys/types.h>
7314#endif
7315
Matthias Kloseb9621712010-04-24 17:59:49 +00007316"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 if test "$ac_cv_type_off_t" = yes; then
7320 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007322as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007323See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324 else
7325 ac_cv_sizeof_off_t=0
7326 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7331$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007332
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333
7334
Martin v. Löwis11437992002-04-12 09:54:03 +00007335cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007336#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007337_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007338
Michael W. Hudson54241132001-12-07 15:38:26 +00007339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7342$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007343if test "$have_long_long" = yes
7344then
7345if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007346 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7351$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007352else
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007355fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007356else
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007359fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361# The cast to long int works around a bug in the HP C Compiler
7362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7366$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007367if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007371#ifdef HAVE_SYS_TYPES_H
7372#include <sys/types.h>
7373#endif
7374#ifdef HAVE_TIME_H
7375#include <time.h>
7376#endif
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007380else
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 if test "$ac_cv_type_time_t" = yes; then
7382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007384as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007385See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007386 else
7387 ac_cv_sizeof_time_t=0
7388 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007390
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7393$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007395
7396
Martin v. Löwis11437992002-04-12 09:54:03 +00007397cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007398#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007399_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007400
Michael W. Hudson54241132001-12-07 15:38:26 +00007401
7402
Trent Mick635f6fb2000-08-23 21:33:05 +00007403# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007404ac_save_cc="$CC"
7405if test "$ac_cv_kpthread" = "yes"
7406then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007407elif test "$ac_cv_kthread" = "yes"
7408then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007409elif test "$ac_cv_pthread" = "yes"
7410then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007411fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7414$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007415have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007417/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007418
7419 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007420int
7421main ()
7422{
Guido van Rossum12580492000-09-24 16:47:19 +00007423pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007424 ;
7425 return 0;
7426}
Matthias Kloseb159a552010-04-25 21:00:44 +00007427
Martin v. Löwis11437992002-04-12 09:54:03 +00007428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007430 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7434$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007435if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007437# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7438# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7439# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7441$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007442if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007446#ifdef HAVE_PTHREAD_H
7447#include <pthread.h>
7448#endif
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007452else
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 if test "$ac_cv_type_pthread_t" = yes; then
7454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007456as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007457See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007458 else
7459 ac_cv_sizeof_pthread_t=0
7460 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007462
Trent Mick635f6fb2000-08-23 21:33:05 +00007463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7465$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007467
7468
Martin v. Löwis11437992002-04-12 09:54:03 +00007469cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007470#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007471_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007473
Trent Mick635f6fb2000-08-23 21:33:05 +00007474fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007475CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007476
Michael W. Hudson54241132001-12-07 15:38:26 +00007477
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007478case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007479 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007480 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7481 ;;
7482 Darwin/*)
7483 OTHER_LIBTOOL_OPT=""
7484 ;;
7485esac
7486
7487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007488ARCH_RUN_32BIT=""
7489
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007490case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007491 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007492 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7493 if test "${enable_universalsdk}"; then
7494 :
7495 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007496 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007497 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007500 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007501 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007502 if test ${gcc_version} '<' 4.0
7503 then
7504 LIBTOOL_CRUFT="-lcc_dynamic"
7505 else
7506 LIBTOOL_CRUFT=""
7507 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007509 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007512/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007513
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007514 #include <unistd.h>
7515 int main(int argc, char*argv[])
7516 {
7517 if (sizeof(long) == 4) {
7518 return 0;
7519 } else {
7520 return 1;
7521 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007522 }
7523
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007526 ac_osx_32bit=yes
7527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007532fi
7533
7534
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007535 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007536 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007537 i386)
7538 MACOSX_DEFAULT_ARCH="i386"
7539 ;;
7540 ppc)
7541 MACOSX_DEFAULT_ARCH="ppc"
7542 ;;
7543 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007544 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007545 ;;
7546 esac
7547 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007548 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007549 i386)
7550 MACOSX_DEFAULT_ARCH="x86_64"
7551 ;;
7552 ppc)
7553 MACOSX_DEFAULT_ARCH="ppc64"
7554 ;;
7555 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007556 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007557 ;;
7558 esac
7559
7560 #ARCH_RUN_32BIT="true"
7561 fi
7562
7563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007564 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007566esac
7567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7569$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007570if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007571then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007572 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007574 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007575
Matthias Kloseb9621712010-04-24 17:59:49 +00007576$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007577
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7579$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007580 if test $enable_shared = "yes"
7581 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007582 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 +00007583 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007587fi
7588
Matthias Kloseb9621712010-04-24 17:59:49 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7590$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007591case $ac_sys_system/$ac_sys_release in
7592 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7597$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007598 ;;
7599 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007602 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007603esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007604
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007606
Michael W. Hudson54241132001-12-07 15:38:26 +00007607
7608
7609
7610
Benjamin Peterson99f03762010-04-11 22:15:28 +00007611
Thomas Wouters477c8d52006-05-27 19:21:47 +00007612
Georg Brandlb1441c72009-01-03 22:33:39 +00007613
Thomas Wouters477c8d52006-05-27 19:21:47 +00007614cat >>confdefs.h <<_ACEOF
7615#define SHLIB_EXT "$SO"
7616_ACEOF
7617
Guido van Rossum0a516c91994-09-12 10:58:40 +00007618# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007619# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007620# (Shared libraries in this instance are shared modules to be loaded into
7621# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7623$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624if test -z "$LDSHARED"
7625then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007627 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007628 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007629 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007630 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007631 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007632 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007634 if test "$GCC" = "yes" ; then
7635 LDSHARED='$(CC) -shared'
7636 LDCXXSHARED='$(CXX) -shared'
7637 else
7638 LDSHARED='$(CC) -G'
7639 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007640 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007641 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007642 if test "$GCC" = "yes" ; then
7643 LDSHARED='$(CC) -shared'
7644 LDCXXSHARED='$(CXX) -shared'
7645 else
7646 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007647 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007648 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007649 LDSHARED='$(CC) -bundle'
7650 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007651 if test "$enable_framework" ; then
7652 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007653 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7654 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007655 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007656 else
7657 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007658 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007659 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007660 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007661 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007662 LDSHARED='$(CC) -bundle'
7663 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007664 if test "$enable_framework" ; then
7665 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007666 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7667 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007668 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007669 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007670 # No framework, use the Python app as bundle-loader
7671 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007672 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007673 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007674 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007675 Darwin/*)
7676 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7677 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007678
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007679 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007680 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007681 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007682 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007683 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007684 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7685 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007686 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007687 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007688 LDSHARED='$(CC) -bundle'
7689 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007690 if test "$enable_framework" ; then
7691 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007692 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7693 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007694 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007695 else
7696 # No framework, use the Python app as bundle-loader
7697 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7698 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007699 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007700 fi
7701 fi
7702 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007703 Linux*|GNU*|QNX*)
7704 LDSHARED='$(CC) -shared'
7705 LDCXXSHARED='$(CXX) -shared';;
7706 BSD/OS*/4*)
7707 LDSHARED="gcc -shared"
7708 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007709 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007710 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007711 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007712 LDSHARED='$(CC) -shared'
7713 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007714 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007715 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007716 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007717 OpenBSD*)
7718 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7719 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007720 LDSHARED='$(CC) -shared $(CCSHARED)'
7721 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007722 else
7723 case `uname -r` in
7724 [01].* | 2.[0-7] | 2.[0-7].*)
7725 LDSHARED="ld -Bshareable ${LDFLAGS}"
7726 ;;
7727 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007728 LDSHARED='$(CC) -shared $(CCSHARED)'
7729 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007730 ;;
7731 esac
7732 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007733 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007734 LDSHARED='$(CC) -shared'
7735 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007736 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007737 if test "$GCC" = "yes" ; then
7738 LDSHARED='$(CC) -shared'
7739 LDCXXSHARED='$(CXX) -shared'
7740 else
7741 LDSHARED='$(CC) -G'
7742 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007743 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007744 SCO_SV*)
7745 LDSHARED='$(CC) -Wl,-G,-Bexport'
7746 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7747 CYGWIN*)
7748 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7749 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007750 *) LDSHARED="ld";;
7751 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7754$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007755LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007756BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007757# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007758# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7760$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007761if test -z "$CCSHARED"
7762then
Guido van Rossum07397971997-04-29 21:49:50 +00007763 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007764 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007765 then CCSHARED="-fPIC";
7766 elif test `uname -p` = sparc;
7767 then CCSHARED="-xcode=pic32";
7768 else CCSHARED="-Kpic";
7769 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007770 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007771 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007772 else CCSHARED="+z";
7773 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007774 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007775 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007776 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007777 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007778 if test "$GCC" = "yes"
7779 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007780 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007781 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007782 SCO_SV*)
7783 if test "$GCC" = "yes"
7784 then CCSHARED="-fPIC"
7785 else CCSHARED="-Kpic -belf"
7786 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007787 IRIX*/6*) case $CC in
7788 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007789 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007790 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007791 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7794$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007795# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007796# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7798$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007799if test -z "$LINKFORSHARED"
7800then
Guido van Rossum07397971997-04-29 21:49:50 +00007801 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007802 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007804 LINKFORSHARED="-Wl,-E -Wl,+s";;
7805# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007806 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007807 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007808 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007810 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007811 if test "$enable_framework"
7812 then
Jack Jansenda49e192005-01-07 13:08:22 +00007813 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007814 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007815 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007816 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007817 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007818 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007819 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007820 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7821 then
7822 LINKFORSHARED="-Wl,--export-dynamic"
7823 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007824 SunOS/5*) case $CC in
7825 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007826 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007827 then
7828 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007829 fi;;
7830 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007831 CYGWIN*)
7832 if test $enable_shared = "no"
7833 then
7834 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7835 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007836 QNX*)
7837 # -Wl,-E causes the symbols to be added to the dynamic
7838 # symbol table so that they can be found when a module
7839 # is loaded. -N 2048K causes the stack size to be set
7840 # to 2048 kilobytes so that the stack doesn't overflow
7841 # when running test_compile.py.
7842 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007843 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7846$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007847
Michael W. Hudson54241132001-12-07 15:38:26 +00007848
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007849
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7851$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007852if test ! "$LIBRARY" = "$LDLIBRARY"
7853then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007854 case $ac_sys_system in
7855 CYGWIN*)
7856 # Cygwin needs CCSHARED when building extension DLLs
7857 # but not when building the interpreter DLL.
7858 CFLAGSFORSHARED='';;
7859 *)
7860 CFLAGSFORSHARED='$(CCSHARED)'
7861 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7864$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007865
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007866# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7867# library (with --enable-shared).
7868# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007869# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7870# if it is not required, since it creates a dependency of the shared library
7871# to LIBS. This, in turn, means that applications linking the shared libpython
7872# don't need to link LIBS explicitly. The default should be only changed
7873# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007874
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7876$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007877case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007878 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007879 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007880esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7882$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007883
7884
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7887$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007888if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007889 $as_echo_n "(cached) " >&6
7890else
7891 ac_check_lib_save_LIBS=$LIBS
7892LIBS="-lsendfile $LIBS"
7893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7894/* end confdefs.h. */
7895
7896/* Override any GCC internal prototype to avoid an error.
7897 Use char because int might match the return type of a GCC
7898 builtin and then its argument prototype would still apply. */
7899#ifdef __cplusplus
7900extern "C"
7901#endif
7902char sendfile ();
7903int
7904main ()
7905{
7906return sendfile ();
7907 ;
7908 return 0;
7909}
7910_ACEOF
7911if ac_fn_c_try_link "$LINENO"; then :
7912 ac_cv_lib_sendfile_sendfile=yes
7913else
7914 ac_cv_lib_sendfile_sendfile=no
7915fi
7916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext
7918LIBS=$ac_check_lib_save_LIBS
7919fi
7920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7921$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007922if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007923 cat >>confdefs.h <<_ACEOF
7924#define HAVE_LIBSENDFILE 1
7925_ACEOF
7926
7927 LIBS="-lsendfile $LIBS"
7928
7929fi
7930
Matthias Kloseb9621712010-04-24 17:59:49 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7932$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007933if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007935else
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007937LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941/* Override any GCC internal prototype to avoid an error.
7942 Use char because int might match the return type of a GCC
7943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944#ifdef __cplusplus
7945extern "C"
7946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007947char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007948int
7949main ()
7950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ;
7953 return 0;
7954}
7955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007963LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7966$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007967if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 cat >>confdefs.h <<_ACEOF
7969#define HAVE_LIBDL 1
7970_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007972 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974fi
7975 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7977$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007982LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986/* Override any GCC internal prototype to avoid an error.
7987 Use char because int might match the return type of a GCC
7988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989#ifdef __cplusplus
7990extern "C"
7991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007992char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007993int
7994main ()
7995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8011$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008012if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 cat >>confdefs.h <<_ACEOF
8014#define HAVE_LIBDLD 1
8015_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008017 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019fi
8020 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008021
Georg Brandlb1441c72009-01-03 22:33:39 +00008022# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008023if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8025$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008028else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008029 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033/* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036#ifdef __cplusplus
8037extern "C"
8038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008039char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040int
8041main ()
8042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ;
8045 return 0;
8046}
8047_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048for ac_lib in '' pthread rt posix4; do
8049 if test -z "$ac_lib"; then
8050 ac_res="none required"
8051 else
8052 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008053 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058rm -f core conftest.err conftest.$ac_objext \
8059 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008060 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063done
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066else
8067 ac_cv_search_sem_init=no
8068fi
8069rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008070LIBS=$ac_func_search_save_LIBS
8071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8073$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008075if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008077
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008078fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008079 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008080 # posix4 on Solaris 2.6
8081 # pthread (first!) on Linux
8082fi
8083
Martin v. Löwis19d17342003-06-14 21:03:05 +00008084# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8086$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008087if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008089else
8090 ac_check_lib_save_LIBS=$LIBS
8091LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095/* Override any GCC internal prototype to avoid an error.
8096 Use char because int might match the return type of a GCC
8097 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008098#ifdef __cplusplus
8099extern "C"
8100#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008101char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008102int
8103main ()
8104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008106 ;
8107 return 0;
8108}
8109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008111 ac_cv_lib_intl_textdomain=yes
8112else
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008115rm -f core conftest.err conftest.$ac_objext \
8116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008117LIBS=$ac_check_lib_save_LIBS
8118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8120$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008124
Brett Cannonc6d936e2009-06-07 20:09:53 +00008125 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008126fi
8127
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008128
8129# checks for system dependent C++ extensions support
8130case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8132$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008134/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008135
Georg Brandl59e87bd2011-02-15 19:48:59 +00008136 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008137int
8138main ()
8139{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008140loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ;
8142 return 0;
8143}
Matthias Kloseb159a552010-04-25 21:00:44 +00008144
Martin v. Löwis11437992002-04-12 09:54:03 +00008145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008146if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008147
Matthias Kloseb159a552010-04-25 21:00:44 +00008148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008150
Matthias Kloseb159a552010-04-25 21:00:44 +00008151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008153
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008154else
Matthias Kloseb159a552010-04-25 21:00:44 +00008155
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008157$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008158
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008160rm -f core conftest.err conftest.$ac_objext \
8161 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008162 *) ;;
8163esac
8164
Guido van Rossum70c7f481998-03-26 18:44:10 +00008165# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8167$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008172LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176/* Override any GCC internal prototype to avoid an error.
8177 Use char because int might match the return type of a GCC
8178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008179#ifdef __cplusplus
8180extern "C"
8181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008182char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
8185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ;
8188 return 0;
8189}
8190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008193else
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008196rm -f core conftest.err conftest.$ac_objext \
8197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008198LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8201$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008202if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008203 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008204fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008205 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8207$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008208if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008210else
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008212LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216/* Override any GCC internal prototype to avoid an error.
8217 Use char because int might match the return type of a GCC
8218 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008219#ifdef __cplusplus
8220extern "C"
8221#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008222char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008223int
8224main ()
8225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ;
8228 return 0;
8229}
8230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008231if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236rm -f core conftest.err conftest.$ac_objext \
8237 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008238LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8241$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008242if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008243 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008244fi
8245 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8248$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8254$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008255LIBS="$withval $LIBS"
8256
8257else
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8259$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260fi
8261
Guido van Rossum7f43da71994-08-01 12:15:30 +00008262
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008263if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008264 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8265set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8267$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008270else
8271 case $PKG_CONFIG in
8272 [\\/]* | ?:[\\/]*)
8273 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8274 ;;
8275 *)
8276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8277for as_dir in $PATH
8278do
8279 IFS=$as_save_IFS
8280 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008282 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8283 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008285 break 2
8286 fi
8287done
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008289IFS=$as_save_IFS
8290
8291 ;;
8292esac
8293fi
8294PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8295if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8297$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8300$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008301fi
8302
8303
8304fi
8305if test -z "$ac_cv_path_PKG_CONFIG"; then
8306 ac_pt_PKG_CONFIG=$PKG_CONFIG
8307 # Extract the first word of "pkg-config", so it can be a program name with args.
8308set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008311if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008313else
8314 case $ac_pt_PKG_CONFIG in
8315 [\\/]* | ?:[\\/]*)
8316 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8317 ;;
8318 *)
8319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322 IFS=$as_save_IFS
8323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8326 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008328 break 2
8329 fi
8330done
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008332IFS=$as_save_IFS
8333
8334 ;;
8335esac
8336fi
8337ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8338if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8340$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008341else
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008344fi
8345
8346 if test "x$ac_pt_PKG_CONFIG" = x; then
8347 PKG_CONFIG=""
8348 else
8349 case $cross_compiling:$ac_tool_warned in
8350yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8352$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008353ac_tool_warned=yes ;;
8354esac
8355 PKG_CONFIG=$ac_pt_PKG_CONFIG
8356 fi
8357else
8358 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8359fi
8360
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008361
8362# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8364$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008365
8366# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008367if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008368 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008369else
8370 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008371fi
8372
8373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8375$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008376
8377# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8379$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008380
8381# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008382if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008383 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008384else
8385 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008386fi
8387
8388
8389if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008390 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8391else
8392 LIBFFI_INCLUDEDIR=""
8393fi
8394
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8397$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008398
Benjamin Peterson076ed002010-10-31 17:11:02 +00008399# Check for support for loadable sqlite extensions
8400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8401$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8402# Check whether --enable-loadable-sqlite-extensions was given.
8403if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8404 enableval=$enable_loadable_sqlite_extensions;
8405else
8406 enable_loadable_sqlite_extensions="no"
8407fi
8408
8409
8410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8411$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8412
Matthias Klose55708cc2009-04-30 08:06:49 +00008413# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8415$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008416
8417# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008419 withval=$with_dbmliborder;
8420if test x$with_dbmliborder = xyes
8421then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008422as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008423else
8424 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8425 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8426 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008427 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008428 fi
8429 done
8430fi
8431fi
8432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8434$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008435
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008436# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008437
8438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8440$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008443if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444 withval=$with_signal_module;
8445fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008446
8447
8448if test -z "$with_signal_module"
8449then with_signal_module="yes"
8450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8452$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008453
8454if test "${with_signal_module}" = "yes"; then
8455 USE_SIGNAL_MODULE=""
8456 SIGNAL_OBJS=""
8457else
8458 USE_SIGNAL_MODULE="#"
8459 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8460fi
8461
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008462# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008463
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008464USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
8468# Templates for things AC_DEFINEd more than once.
8469# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008470
8471
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8474$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008477if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478 withval=$with_threads;
8479fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008480
8481
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008482# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008485if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 withval=$with_thread; with_threads=$with_thread
8487fi
8488
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008489
8490if test -z "$with_threads"
8491then with_threads="yes"
8492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8494$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008495
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008496
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008497if test "$with_threads" = "no"
8498then
8499 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008500elif test "$ac_cv_pthread_is_default" = yes
8501then
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008503
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008504 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008506
8507 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008509elif test "$ac_cv_kpthread" = "yes"
8510then
8511 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008512 if test "$ac_cv_cxx_thread" = "yes"; then
8513 CXX="$CXX -Kpthread"
8514 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008516
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008517 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008518 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008519elif test "$ac_cv_kthread" = "yes"
8520then
8521 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008522 if test "$ac_cv_cxx_thread" = "yes"; then
8523 CXX="$CXX -Kthread"
8524 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008526
8527 posix_threads=yes
8528 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008529elif test "$ac_cv_pthread" = "yes"
8530then
8531 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008532 if test "$ac_cv_cxx_thread" = "yes"; then
8533 CXX="$CXX -pthread"
8534 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008536
8537 posix_threads=yes
8538 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008539else
8540 if test ! -z "$with_threads" -a -d "$with_threads"
8541 then LDFLAGS="$LDFLAGS -L$with_threads"
8542 fi
8543 if test ! -z "$withval" -a -d "$withval"
8544 then LDFLAGS="$LDFLAGS -L$withval"
8545 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008546
8547 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008548 # define _POSIX_THREADS in unistd.h. Some apparently don't
8549 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8551$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008554
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008555#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008556#ifdef _POSIX_THREADS
8557yes
8558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008559
8560_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008563 unistd_defines_pthreads=yes
8564else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008565 unistd_defines_pthreads=no
8566fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008567rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008568
Matthias Kloseb9621712010-04-24 17:59:49 +00008569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8570$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008573
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008574 # Just looking for pthread_create in libpthread is not enough:
8575 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8576 # So we really have to include pthread.h, and then link.
8577 _libs=$LIBS
8578 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8580$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008582/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008583#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008584
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008585void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
8588{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008589
8590pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ;
8592 return 0;
8593}
8594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8598$as_echo "yes" >&6; }
8599 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008600
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008601 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008602 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008605 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008607if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008609
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008610 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008611 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008612else
Guido van Rossumad678af1998-10-02 14:42:15 +00008613
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8615$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008618else
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008620LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624/* Override any GCC internal prototype to avoid an error.
8625 Use char because int might match the return type of a GCC
8626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008627#ifdef __cplusplus
8628extern "C"
8629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008630char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008631int
8632main ()
8633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ;
8636 return 0;
8637}
8638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644rm -f core conftest.err conftest.$ac_objext \
8645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008646LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8649$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008650if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008653 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008654 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008655 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008656else
Greg Steinadf63d62000-07-05 10:38:09 +00008657
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8659$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008662else
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008664LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671#ifdef __cplusplus
8672extern "C"
8673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008674char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675int
8676main ()
8677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ;
8680 return 0;
8681}
8682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8693$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008696
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008697 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008698 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008699 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008700else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008701
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8703$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008706else
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008708LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712/* Override any GCC internal prototype to avoid an error.
8713 Use char because int might match the return type of a GCC
8714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715#ifdef __cplusplus
8716extern "C"
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ;
8724 return 0;
8725}
8726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732rm -f core conftest.err conftest.$ac_objext \
8733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008734LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8737$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008741 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008742 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008743 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008744else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008745
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8747$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008750else
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008752LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756/* Override any GCC internal prototype to avoid an error.
8757 Use char because int might match the return type of a GCC
8758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759#ifdef __cplusplus
8760extern "C"
8761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008762char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ;
8768 return 0;
8769}
8770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776rm -f core conftest.err conftest.$ac_objext \
8777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008778LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8781$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008782if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008784
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008785 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008786 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008787 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008788else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008789
Martin v. Löwis130fb172001-07-19 11:00:41 +00008790 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008791fi
8792
Guido van Rossum627b2d71993-12-24 10:39:16 +00008793
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008794fi
8795
Guido van Rossum0be3e491997-05-22 20:33:33 +00008796fi
8797
Guido van Rossum49545951997-12-02 19:28:29 +00008798fi
8799
Guido van Rossumb93a8621998-05-07 13:27:32 +00008800fi
8801
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803rm -f core conftest.err conftest.$ac_objext \
8804 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8807$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008808if ${ac_cv_lib_mpc_usconfig+:} 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="-lmpc $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 usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826return usconfig ();
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_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 ac_cv_lib_mpc_usconfig=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_mpc_usconfig" >&5
8841$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008842if test "x$ac_cv_lib_mpc_usconfig" = 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öwis130fb172001-07-19 11:00:41 +00008845 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008846 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008847 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008848fi
8849
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008850
Neal Norwitza978ab02002-11-02 16:58:05 +00008851 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8853$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008856else
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008858LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862/* Override any GCC internal prototype to avoid an error.
8863 Use char because int might match the return type of a GCC
8864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865#ifdef __cplusplus
8866extern "C"
8867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008868char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ;
8874 return 0;
8875}
8876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008879else
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008882rm -f core conftest.err conftest.$ac_objext \
8883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8887$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008891 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008892 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008893 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008894fi
8895
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008896 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008897fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008898
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008899if test "$posix_threads" = "yes"; then
8900 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008901
Matthias Kloseb9621712010-04-24 17:59:49 +00008902$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008903
8904 fi
8905
8906 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8907 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02008908 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008909$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008910
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008911 ;;
8912 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008913$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008914
8915 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02008916 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00008917$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008918
8919 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008920 esac
8921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8923$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008924 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008926else
Matthias Kloseb9621712010-04-24 17:59:49 +00008927 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008928 ac_cv_pthread_system_supported=no
8929else
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008932#include <pthread.h>
8933 void *foo(void *parm) {
8934 return NULL;
8935 }
8936 main() {
8937 pthread_attr_t attr;
8938 pthread_t id;
8939 if (pthread_attr_init(&attr)) exit(-1);
8940 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8941 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8942 exit(0);
8943 }
8944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008945if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008946 ac_cv_pthread_system_supported=yes
8947else
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008952fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955fi
8956
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8958$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008959 if test "$ac_cv_pthread_system_supported" = "yes"; then
8960
Matthias Kloseb9621712010-04-24 17:59:49 +00008961$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008962
8963 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 for ac_func in pthread_sigmask
8965do :
8966 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02008967if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008968 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008969#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008970_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008971 case $ac_sys_system in
8972 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008975
8976 ;;
8977 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008978fi
8979done
8980
8981fi
8982
8983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8987$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008989if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8993$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994 ipv6=no
8995 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8997$as_echo "yes" >&6; }
8998 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999
9000 ipv6=yes
9001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003else
Martin v. Löwis11437992002-04-12 09:54:03 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009 ipv6=no
9010
9011else
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 /* AF_INET6 available check */
9015#include <sys/types.h>
9016#include <sys/socket.h>
9017main()
9018{
9019 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9020 exit(1);
9021 else
9022 exit(0);
9023}
9024
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9029$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009030 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032else
Matthias Kloseb159a552010-04-25 21:00:44 +00009033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041fi
9042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009044if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9046$as_echo_n "checking if RFC2553 API is available... " >&6; }
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009048/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009049
9050 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009051#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009052int
9053main ()
9054{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009055struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009056 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 ;
9058 return 0;
9059}
Matthias Kloseb159a552010-04-25 21:00:44 +00009060
Martin v. Löwis11437992002-04-12 09:54:03 +00009061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009062if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009065$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009066 ipv6=yes
9067
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009068else
Matthias Kloseb159a552010-04-25 21:00:44 +00009069
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009071$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009072 ipv6=no
9073
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009076fi
9077
9078if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009080
9081fi
9082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083fi
9084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085
9086ipv6type=unknown
9087ipv6lib=none
9088ipv6trylibc=no
9089
9090if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9092$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009093 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9094 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 case $i in
9096 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009098/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009099
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009100#include <netinet/in.h>
9101#ifdef IPV6_INRIA_VERSION
9102yes
9103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009104_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009107 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009108fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009109rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110
9111 ;;
9112 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009116#include <netinet/in.h>
9117#ifdef __KAME__
9118yes
9119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123 ipv6type=$i;
9124 ipv6lib=inet6
9125 ipv6libdir=/usr/local/v6/lib
9126 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009128rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129
9130 ;;
9131 linux-glibc)
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 <features.h>
9136#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
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 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009146
9147 ;;
9148 linux-inet6)
9149 if test -d /usr/inet6; then
9150 ipv6type=$i
9151 ipv6lib=inet6
9152 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009153 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154 fi
9155 ;;
9156 solaris)
9157 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009158 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009159 ipv6type=$i
9160 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009161 fi
9162 fi
9163 ;;
9164 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009168#include <sys/param.h>
9169#ifdef _TOSHIBA_INET6
9170yes
9171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009175 ipv6type=$i;
9176 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009177 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009180
9181 ;;
9182 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186#include </usr/local/v6/include/sys/v6config.h>
9187#ifdef __V6D__
9188yes
9189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009193 ipv6type=$i;
9194 ipv6lib=v6;
9195 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009196 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009198rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199
9200 ;;
9201 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009203/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009204
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205#include <sys/param.h>
9206#ifdef _ZETA_MINAMI_INET6
9207yes
9208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009209_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009212 ipv6type=$i;
9213 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009214 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217
9218 ;;
9219 esac
9220 if test "$ipv6type" != "unknown"; then
9221 break
9222 fi
9223 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9225$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226fi
9227
9228if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9229 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9230 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9231 echo "using lib$ipv6lib"
9232 else
9233 if test $ipv6trylibc = "yes"; then
9234 echo "using libc"
9235 else
9236 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9237 echo "You need to fetch lib$ipv6lib.a from appropriate"
9238 echo 'ipv6 kit and compile beforehand.'
9239 exit 1
9240 fi
9241 fi
9242fi
9243
Matthias Kloseb9621712010-04-24 17:59:49 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9245$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009247/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009248
9249 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009250int
9251main ()
9252{
9253FSIORefNum fRef = 0
9254 ;
9255 return 0;
9256}
Matthias Kloseb159a552010-04-25 21:00:44 +00009257
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009259if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009260
Matthias Kloseb159a552010-04-25 21:00:44 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9265$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009266
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009267else
Matthias Kloseb159a552010-04-25 21:00:44 +00009268
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009271
9272fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9274
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009275# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9277$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009280if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281 withval=$with_doc_strings;
9282fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009283
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009284
9285if test -z "$with_doc_strings"
9286then with_doc_strings="yes"
9287fi
9288if test "$with_doc_strings" != "no"
9289then
9290
Matthias Kloseb9621712010-04-24 17:59:49 +00009291$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009292
9293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9295$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009296
Antoine Pitrou042b1282010-08-13 21:15:58 +00009297# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9299$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009301# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009302if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009303 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009304if test "$withval" != no
9305then
9306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9310$as_echo "yes" >&6; }
9311else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9312$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009313fi
9314else
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317fi
9318
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009319
9320# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9322$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009325if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009326 withval=$with_pymalloc;
9327fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009328
Neil Schemenauera35c6882001-02-27 04:45:05 +00009329
Neil Schemenauer16c22972002-03-22 15:34:49 +00009330if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009331then
9332 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009333 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009334fi
9335if test "$with_pymalloc" != "no"
9336then
Martin v. Löwis11437992002-04-12 09:54:03 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009339
9340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9342$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009343
Benjamin Peterson05159c42009-12-03 03:01:27 +00009344# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9346$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009347
9348# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009349if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009350 withval=$with_valgrind;
9351else
9352 with_valgrind=no
9353fi
9354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9356$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009357if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02009359if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009362
9363else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009364 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009365
9366fi
9367
9368
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009369 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009370fi
9371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009372# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009373
Guido van Rossum98935bf2001-09-05 19:13:16 +00009374DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009375
Guido van Rossume97ee181999-12-20 21:27:22 +00009376# the dlopen() function means we might want to use dynload_shlib.o. some
9377# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009378for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009379do :
9380 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009383#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009384_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009385
Guido van Rossume97ee181999-12-20 21:27:22 +00009386fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009387done
Guido van Rossume97ee181999-12-20 21:27:22 +00009388
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
Guido van Rossume97ee181999-12-20 21:27:22 +00009390# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9391# loading of modules.
9392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9394$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009395if test -z "$DYNLOADFILE"
9396then
9397 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009398 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9399 if test "$ac_cv_func_dlopen" = yes
9400 then DYNLOADFILE="dynload_shlib.o"
9401 else DYNLOADFILE="dynload_aix.o"
9402 fi
9403 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009404 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009405 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9406 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009407 *)
9408 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9409 # out any dynamic loading
9410 if test "$ac_cv_func_dlopen" = yes
9411 then DYNLOADFILE="dynload_shlib.o"
9412 else DYNLOADFILE="dynload_stub.o"
9413 fi
9414 ;;
9415 esac
9416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9418$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009419if test "$DYNLOADFILE" != "dynload_stub.o"
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009423
9424fi
9425
Neil Schemenauer4e425612001-06-19 15:44:15 +00009426# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9427
Michael W. Hudson54241132001-12-07 15:38:26 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9430$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009431if test -z "$MACHDEP_OBJS"
9432then
Jack Jansene578a632001-08-15 01:27:14 +00009433 MACHDEP_OBJS=$extra_machdep_objs
9434else
9435 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9438$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009439
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009441for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009442 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009443 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009444 futimens futimes gai_strerror \
9445 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009446 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009447 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009448 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9449 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009450 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009451 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009452 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009453 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009454 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009455 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009456 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9457 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009458 sigaction sigaltstack siginterrupt sigpending sigrelse \
9459 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009460 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009461 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9462 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009463do :
9464 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9465ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009466if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009468#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009469_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009471fi
9472done
9473
Michael W. Hudson54241132001-12-07 15:38:26 +00009474
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009475ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9476 #include <dirent.h>
9477"
9478if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9479
9480$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9481
9482fi
9483
9484
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009485# For some functions, having a definition is not sufficient, since
9486# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9488$as_echo_n "checking for chroot... " >&6; }
9489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009490/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009491#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009492int
9493main ()
9494{
9495void *x=chroot
9496 ;
9497 return 0;
9498}
9499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009503
Matthias Kloseb159a552010-04-25 21:00:44 +00009504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009505$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009506else
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9508$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009509
9510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9513$as_echo_n "checking for link... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009515/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009516#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009517int
9518main ()
9519{
9520void *x=link
9521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009528
Matthias Kloseb159a552010-04-25 21:00:44 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009534
9535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9538$as_echo_n "checking for symlink... " >&6; }
9539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009540/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009541#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009542int
9543main ()
9544{
9545void *x=symlink
9546 ;
9547 return 0;
9548}
9549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009551
Matthias Kloseb9621712010-04-24 17:59:49 +00009552$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009553
Matthias Kloseb159a552010-04-25 21:00:44 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009555$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009556else
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009559
9560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9563$as_echo_n "checking for fchdir... " >&6; }
9564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009566#include <unistd.h>
9567int
9568main ()
9569{
9570void *x=fchdir
9571 ;
9572 return 0;
9573}
9574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009578
Matthias Kloseb159a552010-04-25 21:00:44 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009580$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009581else
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009584
9585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9588$as_echo_n "checking for fsync... " >&6; }
9589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009591#include <unistd.h>
9592int
9593main ()
9594{
9595void *x=fsync
9596 ;
9597 return 0;
9598}
9599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009601
Matthias Kloseb9621712010-04-24 17:59:49 +00009602$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009603
Matthias Kloseb159a552010-04-25 21:00:44 +00009604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009606else
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9608$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009609
9610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9613$as_echo_n "checking for fdatasync... " >&6; }
9614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009616#include <unistd.h>
9617int
9618main ()
9619{
9620void *x=fdatasync
9621 ;
9622 return 0;
9623}
9624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009628
Matthias Kloseb159a552010-04-25 21:00:44 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009630$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009631else
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9633$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009634
9635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9638$as_echo_n "checking for epoll... " >&6; }
9639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009640/* end confdefs.h. */
9641#include <sys/epoll.h>
9642int
9643main ()
9644{
9645void *x=epoll_create
9646 ;
9647 return 0;
9648}
9649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009651
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009653
Matthias Kloseb159a552010-04-25 21:00:44 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009656else
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009659
9660fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9663$as_echo_n "checking for epoll_create1... " >&6; }
9664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665/* end confdefs.h. */
9666#include <sys/epoll.h>
9667int
9668main ()
9669{
9670void *x=epoll_create1
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675if ac_fn_c_try_compile "$LINENO"; then :
9676
9677$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9678
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9680$as_echo "yes" >&6; }
9681else
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683$as_echo "no" >&6; }
9684
9685fi
9686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9688$as_echo_n "checking for kqueue... " >&6; }
9689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009690/* end confdefs.h. */
9691
9692#include <sys/types.h>
9693#include <sys/event.h>
9694
9695int
9696main ()
9697{
9698int x=kqueue()
9699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009704
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009706
Matthias Kloseb159a552010-04-25 21:00:44 +00009707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009712
9713fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009715# On some systems (eg. FreeBSD 5), we would find a definition of the
9716# functions ctermid_r, setgroups in the library, but no prototype
9717# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9718# address to avoid compiler warnings and potential miscompilations
9719# because of the missing prototypes.
9720
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9722$as_echo_n "checking for ctermid_r... " >&6; }
9723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009725
Martin v. Löwisd5843682002-11-21 20:41:28 +00009726#include <stdio.h>
9727
Martin v. Löwisd5843682002-11-21 20:41:28 +00009728int
9729main ()
9730{
9731void* p = ctermid_r
9732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009737
Matthias Kloseb9621712010-04-24 17:59:49 +00009738$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009739
Matthias Kloseb159a552010-04-25 21:00:44 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009741$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009742else
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009745
9746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9748
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9750$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009751if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009752 $as_echo_n "(cached) " >&6
9753else
9754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009756#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009757int
9758main ()
9759{
9760void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009761
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009762 ;
9763 return 0;
9764}
9765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009766if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009767 ac_cv_flock_decl=yes
9768else
9769 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009770
9771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009773
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009774fi
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9776$as_echo "$ac_cv_flock_decl" >&6; }
9777if test "x${ac_cv_flock_decl}" = xyes; then
9778 for ac_func in flock
9779do :
9780 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +02009781if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009782 cat >>confdefs.h <<_ACEOF
9783#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009784_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009785
Antoine Pitroua3000072010-09-07 14:52:42 +00009786else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009788$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009789if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009790 $as_echo_n "(cached) " >&6
9791else
9792 ac_check_lib_save_LIBS=$LIBS
9793LIBS="-lbsd $LIBS"
9794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9795/* end confdefs.h. */
9796
9797/* Override any GCC internal prototype to avoid an error.
9798 Use char because int might match the return type of a GCC
9799 builtin and then its argument prototype would still apply. */
9800#ifdef __cplusplus
9801extern "C"
9802#endif
9803char flock ();
9804int
9805main ()
9806{
9807return flock ();
9808 ;
9809 return 0;
9810}
9811_ACEOF
9812if ac_fn_c_try_link "$LINENO"; then :
9813 ac_cv_lib_bsd_flock=yes
9814else
9815 ac_cv_lib_bsd_flock=no
9816fi
9817rm -f core conftest.err conftest.$ac_objext \
9818 conftest$ac_exeext conftest.$ac_ext
9819LIBS=$ac_check_lib_save_LIBS
9820fi
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9822$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009823if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009824 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009825
9826
9827$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9828
9829
9830fi
9831
9832
9833fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009834done
9835
Antoine Pitroua3000072010-09-07 14:52:42 +00009836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9839$as_echo_n "checking for getpagesize... " >&6; }
9840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009842
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009843#include <unistd.h>
9844
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009845int
9846main ()
9847{
9848void* p = getpagesize
9849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009854
Matthias Kloseb9621712010-04-24 17:59:49 +00009855$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009856
Matthias Kloseb159a552010-04-25 21:00:44 +00009857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009859else
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009862
9863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009865
Victor Stinner984890f2011-11-24 13:53:38 +01009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9867$as_echo_n "checking for broken unsetenv... " >&6; }
9868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9869/* end confdefs.h. */
9870
9871#include <stdlib.h>
9872
9873int
9874main ()
9875{
9876int res = unsetenv("DUMMY")
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_compile "$LINENO"; then :
9882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9883$as_echo "no" >&6; }
9884else
9885
9886$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9887
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9889$as_echo "yes" >&6; }
9890
9891fi
9892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9893
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009894for ac_prog in true
9895do
9896 # Extract the first word of "$ac_prog", so it can be a program name with args.
9897set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9899$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009900if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902else
9903 if test -n "$TRUE"; then
9904 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9905else
9906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912 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 +00009913 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $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 +00009915 break 2
9916 fi
9917done
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009920
9921fi
9922fi
9923TRUE=$ac_cv_prog_TRUE
9924if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9926$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009927else
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930fi
9931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009933 test -n "$TRUE" && break
9934done
9935test -n "$TRUE" || TRUE="/bin/true"
9936
9937
Matthias Kloseb9621712010-04-24 17:59:49 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9939$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009940if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009942else
9943 ac_check_lib_save_LIBS=$LIBS
9944LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948/* Override any GCC internal prototype to avoid an error.
9949 Use char because int might match the return type of a GCC
9950 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009951#ifdef __cplusplus
9952extern "C"
9953#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009954char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009955int
9956main ()
9957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009959 ;
9960 return 0;
9961}
9962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009964 ac_cv_lib_c_inet_aton=yes
9965else
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968rm -f core conftest.err conftest.$ac_objext \
9969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009970LIBS=$ac_check_lib_save_LIBS
9971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9973$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009974if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009975 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009976else
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9978$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009981else
9982 ac_check_lib_save_LIBS=$LIBS
9983LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987/* Override any GCC internal prototype to avoid an error.
9988 Use char because int might match the return type of a GCC
9989 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009990#ifdef __cplusplus
9991extern "C"
9992#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009993char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009994int
9995main ()
9996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009998 ;
9999 return 0;
10000}
10001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010003 ac_cv_lib_resolv_inet_aton=yes
10004else
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007rm -f core conftest.err conftest.$ac_objext \
10008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010009LIBS=$ac_check_lib_save_LIBS
10010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10012$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010013if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010014 cat >>confdefs.h <<_ACEOF
10015#define HAVE_LIBRESOLV 1
10016_ACEOF
10017
10018 LIBS="-lresolv $LIBS"
10019
10020fi
10021
10022
10023fi
10024
10025
Christian Heimesd0764e22007-12-04 15:00:33 +000010026# On Tru64, chflags seems to be present, but calling it will
10027# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10029$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010030if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010034 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010035else
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010037/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010038
Christian Heimesd0764e22007-12-04 15:00:33 +000010039#include <sys/stat.h>
10040#include <unistd.h>
10041int main(int argc, char*argv[])
10042{
10043 if(chflags(argv[0], 0) != 0)
10044 return 1;
10045 return 0;
10046}
Ned Deily3eb67d52011-06-28 00:00:28 -070010047
Christian Heimesd0764e22007-12-04 15:00:33 +000010048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010050 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010051else
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010056fi
10057
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10061$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010062if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010064if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010065 ac_cv_have_chflags="yes"
10066else
10067 ac_cv_have_chflags="no"
10068fi
10069
10070fi
10071if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010074
10075fi
10076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10078$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010083 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010084else
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010086/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010087
Christian Heimesd0764e22007-12-04 15:00:33 +000010088#include <sys/stat.h>
10089#include <unistd.h>
10090int main(int argc, char*argv[])
10091{
10092 if(lchflags(argv[0], 0) != 0)
10093 return 1;
10094 return 0;
10095}
Ned Deily3eb67d52011-06-28 00:00:28 -070010096
Christian Heimesd0764e22007-12-04 15:00:33 +000010097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010098if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010099 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010100else
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010105fi
10106
10107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10110$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010111if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010113if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010114 ac_cv_have_lchflags="yes"
10115else
10116 ac_cv_have_lchflags="no"
10117fi
10118
10119fi
10120if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010123
10124fi
10125
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010126case $ac_sys_system/$ac_sys_release in
10127Darwin/*)
10128 _CUR_CFLAGS="${CFLAGS}"
10129 _CUR_LDFLAGS="${LDFLAGS}"
10130 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10131 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10132 ;;
10133esac
10134
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10136$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010137if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010139else
10140 ac_check_lib_save_LIBS=$LIBS
10141LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010143/* end confdefs.h. */
10144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145/* Override any GCC internal prototype to avoid an error.
10146 Use char because int might match the return type of a GCC
10147 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010148#ifdef __cplusplus
10149extern "C"
10150#endif
10151char inflateCopy ();
10152int
10153main ()
10154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010156 ;
10157 return 0;
10158}
10159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010161 ac_cv_lib_z_inflateCopy=yes
10162else
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165rm -f core conftest.err conftest.$ac_objext \
10166 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010167LIBS=$ac_check_lib_save_LIBS
10168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10170$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010171if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010172
Matthias Kloseb9621712010-04-24 17:59:49 +000010173$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010174
10175fi
10176
10177
10178case $ac_sys_system/$ac_sys_release in
10179Darwin/*)
10180 CFLAGS="${_CUR_CFLAGS}"
10181 LDFLAGS="${_CUR_LDFLAGS}"
10182 ;;
10183esac
10184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10186$as_echo_n "checking for hstrerror... " >&6; }
10187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010188/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010189
Martin v. Löwise9416172003-05-03 10:12:45 +000010190#include <netdb.h>
10191
Martin v. Löwise9416172003-05-03 10:12:45 +000010192int
10193main ()
10194{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010195void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010196 ;
10197 return 0;
10198}
10199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010201
Matthias Kloseb9621712010-04-24 17:59:49 +000010202$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010203
Matthias Kloseb159a552010-04-25 21:00:44 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010205$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010206else
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010209
10210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211rm -f core conftest.err conftest.$ac_objext \
10212 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10215$as_echo_n "checking for inet_aton... " >&6; }
10216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010218
Martin v. Löwis86d66262006-02-17 08:40:11 +000010219#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010220#include <sys/socket.h>
10221#include <netinet/in.h>
10222#include <arpa/inet.h>
10223
Martin v. Löwise9416172003-05-03 10:12:45 +000010224int
10225main ()
10226{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010227void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010233
Matthias Kloseb9621712010-04-24 17:59:49 +000010234$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010235
Matthias Kloseb159a552010-04-25 21:00:44 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010237$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010241
10242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245
Matthias Kloseb9621712010-04-24 17:59:49 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10247$as_echo_n "checking for inet_pton... " >&6; }
10248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010250
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010251#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010252#include <sys/socket.h>
10253#include <netinet/in.h>
10254#include <arpa/inet.h>
10255
Martin v. Löwise9416172003-05-03 10:12:45 +000010256int
10257main ()
10258{
10259void* p = inet_pton
10260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010265
Matthias Kloseb9621712010-04-24 17:59:49 +000010266$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010267
Matthias Kloseb159a552010-04-25 21:00:44 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010269$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010270else
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010273
10274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010276
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010277# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10279$as_echo_n "checking for setgroups... " >&6; }
10280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010281/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010282
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010283#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010284#ifdef HAVE_GRP_H
10285#include <grp.h>
10286#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010287
Martin v. Löwisd5843682002-11-21 20:41:28 +000010288int
10289main ()
10290{
10291void* p = setgroups
10292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010299
Matthias Kloseb159a552010-04-25 21:00:44 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010305
10306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010309# check for openpty and forkpty
10310
10311for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010312do :
10313 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010314if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010317_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010318
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010319else
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10321$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010322if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324else
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010326LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330/* Override any GCC internal prototype to avoid an error.
10331 Use char because int might match the return type of a GCC
10332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333#ifdef __cplusplus
10334extern "C"
10335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010336char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010337int
10338main ()
10339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ;
10342 return 0;
10343}
10344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010347else
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350rm -f core conftest.err conftest.$ac_objext \
10351 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010352LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10355$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010356if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010358 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010359else
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10361$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010362if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010364else
10365 ac_check_lib_save_LIBS=$LIBS
10366LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010368/* end confdefs.h. */
10369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370/* Override any GCC internal prototype to avoid an error.
10371 Use char because int might match the return type of a GCC
10372 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010373#ifdef __cplusplus
10374extern "C"
10375#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376char openpty ();
10377int
10378main ()
10379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010386 ac_cv_lib_bsd_openpty=yes
10387else
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390rm -f core conftest.err conftest.$ac_objext \
10391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010392LIBS=$ac_check_lib_save_LIBS
10393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10395$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010396if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010398 LIBS="$LIBS -lbsd"
10399fi
10400
10401
10402fi
10403
Fred Drake8cef4cf2000-06-28 16:40:38 +000010404
10405fi
10406done
10407
10408for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010409do :
10410 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010411if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010414_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415
Fred Drake8cef4cf2000-06-28 16:40:38 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10418$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010419if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010421else
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010423LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010427/* Override any GCC internal prototype to avoid an error.
10428 Use char because int might match the return type of a GCC
10429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010430#ifdef __cplusplus
10431extern "C"
10432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010433char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010434int
10435main ()
10436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010447rm -f core conftest.err conftest.$ac_objext \
10448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010449LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10452$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010455 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010456else
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10458$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010459if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010461else
10462 ac_check_lib_save_LIBS=$LIBS
10463LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010465/* end confdefs.h. */
10466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467/* Override any GCC internal prototype to avoid an error.
10468 Use char because int might match the return type of a GCC
10469 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010470#ifdef __cplusplus
10471extern "C"
10472#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010473char forkpty ();
10474int
10475main ()
10476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010478 ;
10479 return 0;
10480}
10481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010483 ac_cv_lib_bsd_forkpty=yes
10484else
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010487rm -f core conftest.err conftest.$ac_objext \
10488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010489LIBS=$ac_check_lib_save_LIBS
10490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10492$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010493if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010495 LIBS="$LIBS -lbsd"
10496fi
10497
10498
10499fi
10500
Fred Drake8cef4cf2000-06-28 16:40:38 +000010501
10502fi
10503done
10504
Jack Jansendd19cf82001-12-06 22:36:17 +000010505
Christian Heimesb186d002008-03-18 15:15:01 +000010506# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010507for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010508do :
10509 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010510if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010512#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010513_ACEOF
10514
10515fi
10516done
10517
10518
Michael W. Hudson54241132001-12-07 15:38:26 +000010519# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010521do :
10522 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10523ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010524if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010527_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010529fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530done
10531
Michael W. Hudson54241132001-12-07 15:38:26 +000010532
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010533ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010534if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010535 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010536
Martin v. Löwis1142de32002-03-29 16:28:31 +000010537else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010539 *" dup2.$ac_objext "* ) ;;
10540 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010542esac
10543
Martin v. Löwis1142de32002-03-29 16:28:31 +000010544fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010545
10546ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010547if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010548 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10549
10550else
10551 case " $LIBOBJS " in
10552 *" getcwd.$ac_objext "* ) ;;
10553 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10554 ;;
10555esac
10556
10557fi
10558
10559ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010560if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010561 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10562
10563else
10564 case " $LIBOBJS " in
10565 *" strdup.$ac_objext "* ) ;;
10566 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10567 ;;
10568esac
10569
10570fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010571
10572
10573for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010574do :
10575 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010576if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010578#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010582#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010583int
10584main ()
10585{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010586getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010594
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010597
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010599done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010600
Jack Jansen150753c2003-03-29 22:07:47 +000010601for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010602do :
10603 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010604if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010610#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010611int
10612main ()
10613{
10614setpgrp(0,0);
10615 ;
10616 return 0;
10617}
10618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010622
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010625
10626fi
10627done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010628
Thomas Wouters3a584202000-08-05 23:28:51 +000010629for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010630do :
10631 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010632if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010635_ACEOF
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. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
10648
Guido van Rossum627b2d71993-12-24 10:39:16 +000010649else
Skip Montanaro6dead952003-09-25 14:50:04 +000010650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010652
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Guido van Rossum627b2d71993-12-24 10:39:16 +000010654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010658done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010659
Michael W. Hudson54241132001-12-07 15:38:26 +000010660
Victor Stinnere0be4232011-10-25 13:06:09 +020010661for ac_func in clock_gettime
10662do :
10663 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10664if test "x$ac_cv_func_clock_gettime" = xyes; then :
10665 cat >>confdefs.h <<_ACEOF
10666#define HAVE_CLOCK_GETTIME 1
10667_ACEOF
10668
10669else
10670
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10672$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10673if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10674 $as_echo_n "(cached) " >&6
10675else
10676 ac_check_lib_save_LIBS=$LIBS
10677LIBS="-lrt $LIBS"
10678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679/* end confdefs.h. */
10680
10681/* Override any GCC internal prototype to avoid an error.
10682 Use char because int might match the return type of a GCC
10683 builtin and then its argument prototype would still apply. */
10684#ifdef __cplusplus
10685extern "C"
10686#endif
10687char clock_gettime ();
10688int
10689main ()
10690{
10691return clock_gettime ();
10692 ;
10693 return 0;
10694}
10695_ACEOF
10696if ac_fn_c_try_link "$LINENO"; then :
10697 ac_cv_lib_rt_clock_gettime=yes
10698else
10699 ac_cv_lib_rt_clock_gettime=no
10700fi
10701rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
10703LIBS=$ac_check_lib_save_LIBS
10704fi
10705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10706$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10707if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10708
10709 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10710
10711
10712$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10713
10714
10715fi
10716
10717
10718fi
10719done
10720
10721
10722for ac_func in clock_getres
10723do :
10724 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10725if test "x$ac_cv_func_clock_getres" = xyes; then :
10726 cat >>confdefs.h <<_ACEOF
10727#define HAVE_CLOCK_GETRES 1
10728_ACEOF
10729
10730else
10731
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
10733$as_echo_n "checking for clock_getres in -lrt... " >&6; }
10734if ${ac_cv_lib_rt_clock_getres+:} false; then :
10735 $as_echo_n "(cached) " >&6
10736else
10737 ac_check_lib_save_LIBS=$LIBS
10738LIBS="-lrt $LIBS"
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10740/* end confdefs.h. */
10741
10742/* Override any GCC internal prototype to avoid an error.
10743 Use char because int might match the return type of a GCC
10744 builtin and then its argument prototype would still apply. */
10745#ifdef __cplusplus
10746extern "C"
10747#endif
10748char clock_getres ();
10749int
10750main ()
10751{
10752return clock_getres ();
10753 ;
10754 return 0;
10755}
10756_ACEOF
10757if ac_fn_c_try_link "$LINENO"; then :
10758 ac_cv_lib_rt_clock_getres=yes
10759else
10760 ac_cv_lib_rt_clock_getres=no
10761fi
10762rm -f core conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
10764LIBS=$ac_check_lib_save_LIBS
10765fi
10766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
10767$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
10768if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
10769
10770 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
10771
10772
10773fi
10774
10775
10776fi
10777done
10778
10779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10781$as_echo_n "checking for major... " >&6; }
10782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010784
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010785#if defined(MAJOR_IN_MKDEV)
10786#include <sys/mkdev.h>
10787#elif defined(MAJOR_IN_SYSMACROS)
10788#include <sys/sysmacros.h>
10789#else
10790#include <sys/types.h>
10791#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010792
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010793int
10794main ()
10795{
10796
10797 makedev(major(0),minor(0));
10798
10799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010804
10805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10809$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010810
10811else
Skip Montanaro6dead952003-09-25 14:50:04 +000010812
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10814$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010815
10816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010817rm -f core conftest.err conftest.$ac_objext \
10818 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010819
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010820# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010821# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10823$as_echo_n "checking for getaddrinfo... " >&6; }
10824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010825/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010826
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010827#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010828#include <sys/socket.h>
10829#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010830#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010831
Martin v. Löwis11437992002-04-12 09:54:03 +000010832int
10833main ()
10834{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010835getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ;
10837 return 0;
10838}
10839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010840if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010841 have_getaddrinfo=yes
10842else
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
10847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10848$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010849if test $have_getaddrinfo = yes
10850then
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10852$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010853 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010855else
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010857 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010858else
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010861
10862#include <sys/types.h>
10863#include <netdb.h>
10864#include <string.h>
10865#include <sys/socket.h>
10866#include <netinet/in.h>
10867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010868int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010869{
10870 int passive, gaierr, inet4 = 0, inet6 = 0;
10871 struct addrinfo hints, *ai, *aitop;
10872 char straddr[INET6_ADDRSTRLEN], strport[16];
10873
10874 for (passive = 0; passive <= 1; passive++) {
10875 memset(&hints, 0, sizeof(hints));
10876 hints.ai_family = AF_UNSPEC;
10877 hints.ai_flags = passive ? AI_PASSIVE : 0;
10878 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010879 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010880 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10881 (void)gai_strerror(gaierr);
10882 goto bad;
10883 }
10884 for (ai = aitop; ai; ai = ai->ai_next) {
10885 if (ai->ai_addr == NULL ||
10886 ai->ai_addrlen == 0 ||
10887 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10888 straddr, sizeof(straddr), strport, sizeof(strport),
10889 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10890 goto bad;
10891 }
10892 switch (ai->ai_family) {
10893 case AF_INET:
10894 if (strcmp(strport, "54321") != 0) {
10895 goto bad;
10896 }
10897 if (passive) {
10898 if (strcmp(straddr, "0.0.0.0") != 0) {
10899 goto bad;
10900 }
10901 } else {
10902 if (strcmp(straddr, "127.0.0.1") != 0) {
10903 goto bad;
10904 }
10905 }
10906 inet4++;
10907 break;
10908 case AF_INET6:
10909 if (strcmp(strport, "54321") != 0) {
10910 goto bad;
10911 }
10912 if (passive) {
10913 if (strcmp(straddr, "::") != 0) {
10914 goto bad;
10915 }
10916 } else {
10917 if (strcmp(straddr, "::1") != 0) {
10918 goto bad;
10919 }
10920 }
10921 inet6++;
10922 break;
10923 case AF_UNSPEC:
10924 goto bad;
10925 break;
10926 default:
10927 /* another family support? */
10928 break;
10929 }
10930 }
10931 }
10932
10933 if (!(inet4 == 0 || inet4 == 2))
10934 goto bad;
10935 if (!(inet6 == 0 || inet6 == 2))
10936 goto bad;
10937
10938 if (aitop)
10939 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010940 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941
10942 bad:
10943 if (aitop)
10944 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010945 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946}
10947
Martin v. Löwis11437992002-04-12 09:54:03 +000010948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010950 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010958fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10963$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10964
Mark Dickinson2df5d282009-12-31 21:22:50 +000010965if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010966then
10967 if test $ipv6 = yes
10968 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969 echo 'Fatal: You must get working getaddrinfo() function.'
10970 echo ' or you can specify "--disable-ipv6"'.
10971 exit 1
10972 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010973else
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010976
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010977fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010978
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010979for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010980do :
10981 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020010982if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010986
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010987fi
10988done
10989
Michael W. Hudson54241132001-12-07 15:38:26 +000010990
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10993$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010994if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996else
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010999#include <sys/types.h>
11000#include <sys/time.h>
11001#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
11006if ((struct tm *) 0)
11007return 0;
11008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11020$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011021if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024
11025fi
11026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11028$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011034#include <sys/types.h>
11035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
Martin v. Löwis11437992002-04-12 09:54:03 +000011037int
11038main ()
11039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011040struct tm tm;
11041 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ;
11044 return 0;
11045}
11046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011048 ac_cv_struct_tm=time.h
11049else
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11055$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011056if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011059
11060fi
11061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062ac_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 +000011063#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065"
Victor Stinnere0be4232011-10-25 13:06:09 +020011066if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
11068cat >>confdefs.h <<_ACEOF
11069#define HAVE_STRUCT_TM_TM_ZONE 1
11070_ACEOF
11071
11072
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011073fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011074
Martin v. Löwis11437992002-04-12 09:54:03 +000011075if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011078
11079else
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11081"
Victor Stinnere0be4232011-10-25 13:06:09 +020011082if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086fi
11087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011089#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090_ACEOF
11091
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11093$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011094if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096else
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011099#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011100#if !HAVE_DECL_TZNAME
11101extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
Martin v. Löwis11437992002-04-12 09:54:03 +000011104int
11105main ()
11106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ;
11109 return 0;
11110}
11111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113 ac_cv_var_tzname=yes
11114else
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011117rm -f core conftest.err conftest.$ac_objext \
11118 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11121$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011122 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126 fi
11127fi
11128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011130if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
11132cat >>confdefs.h <<_ACEOF
11133#define HAVE_STRUCT_STAT_ST_RDEV 1
11134_ACEOF
11135
11136
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011137fi
11138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011140if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142cat >>confdefs.h <<_ACEOF
11143#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11144_ACEOF
11145
11146
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011147fi
11148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011151
11152cat >>confdefs.h <<_ACEOF
11153#define HAVE_STRUCT_STAT_ST_FLAGS 1
11154_ACEOF
11155
11156
11157fi
11158
Matthias Kloseb9621712010-04-24 17:59:49 +000011159ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011160if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011161
11162cat >>confdefs.h <<_ACEOF
11163#define HAVE_STRUCT_STAT_ST_GEN 1
11164_ACEOF
11165
11166
11167fi
11168
Matthias Kloseb9621712010-04-24 17:59:49 +000011169ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011170if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011171
11172cat >>confdefs.h <<_ACEOF
11173#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11174_ACEOF
11175
11176
11177fi
11178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011180if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011181
Martin v. Löwis11437992002-04-12 09:54:03 +000011182cat >>confdefs.h <<_ACEOF
11183#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11184_ACEOF
11185
11186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011188
11189else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011191 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011192 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011194esac
11195
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011196fi
11197
Michael W. Hudson54241132001-12-07 15:38:26 +000011198
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Matthias Kloseb9621712010-04-24 17:59:49 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11201$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011202if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204else
Matthias Kloseb159a552010-04-25 21:00:44 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011207/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011208#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011209int
11210main ()
11211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 ;
11214 return 0;
11215}
11216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218 ac_cv_header_time_altzone=yes
11219else
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224fi
11225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11227$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011228if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011231
11232fi
11233
Guido van Rossumda88dad1995-01-26 00:46:29 +000011234was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11236$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011238/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011239
11240#include <sys/types.h>
11241#include <sys/select.h>
11242#include <sys/time.h>
11243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011247;
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
11254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011256
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011257 was_it_defined=yes
11258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11262$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11265$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011266if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011268else
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011271#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011272int
11273main ()
11274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011281 ac_cv_struct_addrinfo=yes
11282else
Matthias Kloseb9621712010-04-24 17:59:49 +000011283 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286fi
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11289$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011290if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011293
11294fi
11295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11297$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011298if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011303
11304# include <sys/types.h>
11305# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011306int
11307main ()
11308{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011309struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011315 ac_cv_struct_sockaddr_storage=yes
11316else
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11320fi
11321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11323$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011324if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011327
11328fi
11329
Guido van Rossum627b2d71993-12-24 10:39:16 +000011330# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11333$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011334if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011336else
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011339$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
11343static int test_array [1 - 2 * !(((char) -1) < 0)];
11344test_array [0] = 0
11345
11346 ;
11347 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011348}
Martin v. Löwis11437992002-04-12 09:54:03 +000011349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011350if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011351 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11358$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011359if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011361
11362fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11365$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011366if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011368else
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371
Martin v. Löwis11437992002-04-12 09:54:03 +000011372int
11373main ()
11374{
11375/* FIXME: Include the comments suggested by Paul. */
11376#ifndef __cplusplus
11377 /* Ultrix mips cc rejects this. */
11378 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011381 char const *const *pcpcc;
11382 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 /* NEC SVR4.0.2 mips cc rejects this. */
11384 struct point {int x, y;};
11385 static struct point const zero = {0,0};
11386 /* AIX XL C 1.02.0.0 rejects this.
11387 It does not let you subtract one const X* pointer from another in
11388 an arm of an if-expression whose if-part is not a constant
11389 expression */
11390 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393 ++pcpcc;
11394 ppc = (char**) pcpcc;
11395 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 { /* SCO 3.2v4 cc rejects this. */
11397 char *t;
11398 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 }
11403 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11404 int x[] = {25, 17};
11405 const int *foo = &x[0];
11406 ++foo;
11407 }
11408 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11409 typedef const int *iptr;
11410 iptr p = 0;
11411 ++p;
11412 }
11413 { /* AIX XL C 1.02.0.0 rejects this saying
11414 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11415 struct s { int j; const int *ap[3]; };
11416 struct s *b; b->j = 5;
11417 }
11418 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11419 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011424
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ;
11426 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011427}
Martin v. Löwis11437992002-04-12 09:54:03 +000011428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430 ac_cv_c_const=yes
11431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11437$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441
11442fi
11443
Michael W. Hudson54241132001-12-07 15:38:26 +000011444
Guido van Rossumda88dad1995-01-26 00:46:29 +000011445works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11447$as_echo_n "checking for working volatile... " >&6; }
11448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011449/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451int
11452main ()
11453{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011454volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011459if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011460 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461else
Skip Montanaro6dead952003-09-25 14:50:04 +000011462
Matthias Kloseb9621712010-04-24 17:59:49 +000011463$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011465
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11469$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011470
Guido van Rossumda88dad1995-01-26 00:46:29 +000011471works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11473$as_echo_n "checking for working signed char... " >&6; }
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477int
11478main ()
11479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011480signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011486 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011487else
Skip Montanaro6dead952003-09-25 14:50:04 +000011488
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011490
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011491
Guido van Rossum7f43da71994-08-01 12:15:30 +000011492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11495$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011496
Guido van Rossumda88dad1995-01-26 00:46:29 +000011497have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11499$as_echo_n "checking for prototypes... " >&6; }
11500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011503int
11504main ()
11505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ;
11508 return 0;
11509}
11510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Matthias Kloseb9621712010-04-24 17:59:49 +000011513$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Matthias Kloseb159a552010-04-25 21:00:44 +000011515 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11519$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011520
Guido van Rossumda88dad1995-01-26 00:46:29 +000011521works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11523$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011525/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011526
11527#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011528int foo(int x, ...) {
11529 va_list va;
11530 va_start(va, x);
11531 va_arg(va, int);
11532 va_arg(va, char *);
11533 va_arg(va, double);
11534 return 0;
11535}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011536
Martin v. Löwis11437992002-04-12 09:54:03 +000011537int
11538main ()
11539{
Guido van Rossum90eea071996-08-30 20:58:57 +000011540return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
11547
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011550 works=yes
11551
Guido van Rossum627b2d71993-12-24 10:39:16 +000011552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11555$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556
Martin v. Löwisd6320502004-08-12 13:45:08 +000011557# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11559$as_echo_n "checking for socketpair... " >&6; }
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011561/* end confdefs.h. */
11562
11563#include <sys/types.h>
11564#include <sys/socket.h>
11565
11566int
11567main ()
11568{
11569void *x=socketpair
11570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011577
Matthias Kloseb159a552010-04-25 21:00:44 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011583
11584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011586
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011587# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11589$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011592#include <sys/types.h>
11593#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011594int
11595main ()
11596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597struct sockaddr x;
11598x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ;
11600 return 0;
11601}
11602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011603if ac_fn_c_try_compile "$LINENO"; then :
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11605$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011608
11609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011612
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011615
Guido van Rossumda88dad1995-01-26 00:46:29 +000011616va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11618$as_echo_n "checking whether va_list is an array... " >&6; }
11619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011621
11622#ifdef HAVE_STDARG_PROTOTYPES
11623#include <stdarg.h>
11624#else
11625#include <varargs.h>
11626#endif
11627
Martin v. Löwis11437992002-04-12 09:54:03 +000011628int
11629main ()
11630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011631va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 ;
11633 return 0;
11634}
11635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if ac_fn_c_try_compile "$LINENO"; then :
11637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011638else
Skip Montanaro6dead952003-09-25 14:50:04 +000011639
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Guido van Rossumda88dad1995-01-26 00:46:29 +000011643 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11648$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011650# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
11652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011654if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11659$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011660 OLD_CFLAGS=$CFLAGS
11661 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011663/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011664
11665# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Martin v. Löwis11437992002-04-12 09:54:03 +000011667int
11668main ()
11669{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011670
11671 char *name;
11672 struct hostent *he, *res;
11673 char buffer[2048];
11674 int buflen = 2048;
11675 int h_errnop;
11676
11677 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
11679 ;
11680 return 0;
11681}
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011686
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11691$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011693else
Skip Montanaro6dead952003-09-25 14:50:04 +000011694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11696$as_echo "no" >&6; }
11697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11698$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011701
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011702# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011703
Martin v. Löwis11437992002-04-12 09:54:03 +000011704int
11705main ()
11706{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011707
11708 char *name;
11709 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 char buffer[2048];
11711 int buflen = 2048;
11712 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011713
Matthias Kloseb159a552010-04-25 21:00:44 +000011714 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
11716 ;
11717 return 0;
11718}
11719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011723
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
Matthias Kloseb159a552010-04-25 21:00:44 +000011725$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11728$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011730else
Skip Montanaro6dead952003-09-25 14:50:04 +000011731
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11735$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11737/* end confdefs.h. */
11738
11739# include <netdb.h>
11740
11741int
11742main ()
11743{
11744
11745 char *name;
11746 struct hostent *he;
11747 struct hostent_data data;
11748
11749 (void) gethostbyname_r(name, he, &data);
11750
11751 ;
11752 return 0;
11753}
11754_ACEOF
11755if ac_fn_c_try_compile "$LINENO"; then :
11756
11757 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11758
11759
11760$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11761
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11763$as_echo "yes" >&6; }
11764
11765else
11766
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11768$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011778 CFLAGS=$OLD_CFLAGS
11779
11780else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 for ac_func in gethostbyname
11783do :
11784 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011785if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011786 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011788_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011789
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011790fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011791done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011792
Michael W. Hudson54241132001-12-07 15:38:26 +000011793
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011794fi
11795
Michael W. Hudson54241132001-12-07 15:38:26 +000011796
11797
11798
11799
11800
11801
Guido van Rossum627b2d71993-12-24 10:39:16 +000011802# checks for system services
11803# (none yet)
11804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011806ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11811$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814else
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011816LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820/* Override any GCC internal prototype to avoid an error.
11821 Use char because int might match the return type of a GCC
11822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#ifdef __cplusplus
11824extern "C"
11825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011826char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011827int
11828main ()
11829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 ;
11832 return 0;
11833}
11834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011842LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11845$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011847 cat >>confdefs.h <<_ACEOF
11848#define HAVE_LIBIEEE 1
11849_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011851 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852
Guido van Rossum627b2d71993-12-24 10:39:16 +000011853fi
11854
Michael W. Hudson54241132001-12-07 15:38:26 +000011855
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011856fi
11857
Michael W. Hudson54241132001-12-07 15:38:26 +000011858
Guido van Rossum7f253911997-05-09 02:42:48 +000011859# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11861$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011863# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011866if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011867then
11868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11872$as_echo "yes" >&6; }
11873else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11874$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011875fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879fi
11880
Guido van Rossum7f253911997-05-09 02:42:48 +000011881
Guido van Rossum7f43da71994-08-01 12:15:30 +000011882# check for --with-libm=...
11883
Guido van Rossum563e7081996-09-10 18:20:48 +000011884case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011885Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011886*) LIBM=-lm
11887esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11889$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011891# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011894if test "$withval" = no
11895then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11897$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011898elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011899then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11901$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011902else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011903fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11906$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011907fi
11908
Guido van Rossum7f43da71994-08-01 12:15:30 +000011909
11910# check for --with-libc=...
11911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11913$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011917 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011918if test "$withval" = no
11919then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11921$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011922elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011923then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11925$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011926else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011927fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011928else
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11930$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931fi
11932
Guido van Rossum7f43da71994-08-01 12:15:30 +000011933
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011934# **************************************************
11935# * Check for various properties of floating point *
11936# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11939$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011940if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011942else
11943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011945 ac_cv_little_endian_double=no
11946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011948/* end confdefs.h. */
11949
11950#include <string.h>
11951int main() {
11952 double x = 9006104071832581.0;
11953 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11954 return 0;
11955 else
11956 return 1;
11957}
11958
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011961 ac_cv_little_endian_double=yes
11962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011967fi
11968
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011969fi
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11972$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011973if test "$ac_cv_little_endian_double" = yes
11974then
11975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011977
11978fi
11979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11981$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011982if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011984else
11985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011987 ac_cv_big_endian_double=no
11988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011990/* end confdefs.h. */
11991
11992#include <string.h>
11993int main() {
11994 double x = 9006104071832581.0;
11995 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11996 return 0;
11997 else
11998 return 1;
11999}
12000
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012003 ac_cv_big_endian_double=yes
12004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012009fi
12010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012011fi
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12014$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012015if test "$ac_cv_big_endian_double" = yes
12016then
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012019
12020fi
12021
12022# Some ARM platforms use a mixed-endian representation for doubles.
12023# While Python doesn't currently have full support for these platforms
12024# (see e.g., issue 1762561), we can at least make sure that float <-> string
12025# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12027$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012028if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012030else
12031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012033 ac_cv_mixed_endian_double=no
12034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012036/* end confdefs.h. */
12037
12038#include <string.h>
12039int main() {
12040 double x = 9006104071832581.0;
12041 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12042 return 0;
12043 else
12044 return 1;
12045}
12046
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012049 ac_cv_mixed_endian_double=yes
12050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012055fi
12056
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012057fi
12058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12060$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012061if test "$ac_cv_mixed_endian_double" = yes
12062then
12063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012065
12066fi
12067
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012068# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012069# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012070# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012071# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012072# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012073# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012074
12075# This inline assembler syntax may also work for suncc and icc,
12076# so we try it on all platforms.
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12079$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012081/* end confdefs.h. */
12082
12083int
12084main ()
12085{
12086
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012087 unsigned short cw;
12088 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12089 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012090
12091 ;
12092 return 0;
12093}
12094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012096 have_gcc_asm_for_x87=yes
12097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012099fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12102$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012103if test "$have_gcc_asm_for_x87" = yes
12104then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012107
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012108fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012109
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012110# Detect whether system arithmetic is subject to x87-style double
12111# rounding issues. The result of this test has little meaning on non
12112# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12113# mode is round-to-nearest and double rounding issues are present, and
12114# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12116$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012117# $BASECFLAGS may affect the result
12118ac_save_cc="$CC"
12119CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012120if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012121 ac_cv_x87_double_rounding=no
12122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012124/* end confdefs.h. */
12125
12126#include <stdlib.h>
12127#include <math.h>
12128int main() {
12129 volatile double x, y, z;
12130 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12131 x = 0.99999999999999989; /* 1-2**-53 */
12132 y = 1./x;
12133 if (y != 1.)
12134 exit(0);
12135 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12136 x = 1e16;
12137 y = 2.99999;
12138 z = x + y;
12139 if (z != 1e16+4.)
12140 exit(0);
12141 /* both tests show evidence of double rounding */
12142 exit(1);
12143}
12144
12145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012147 ac_cv_x87_double_rounding=no
12148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012153fi
12154
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012155CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12157$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012158if test "$ac_cv_x87_double_rounding" = yes
12159then
12160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012162
12163fi
12164
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012165# ************************************
12166# * Check for mathematical functions *
12167# ************************************
12168
12169LIBS_SAVE=$LIBS
12170LIBS="$LIBS $LIBM"
12171
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012172for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12173do :
12174 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12175ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012176if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012177 cat >>confdefs.h <<_ACEOF
12178#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12179_ACEOF
12180
12181fi
12182done
12183
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012184for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012185do :
12186 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12187ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012188if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012189 cat >>confdefs.h <<_ACEOF
12190#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12191_ACEOF
12192
12193fi
12194done
12195
12196ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12197"
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012199 ac_have_decl=1
12200else
12201 ac_have_decl=0
12202fi
12203
12204cat >>confdefs.h <<_ACEOF
12205#define HAVE_DECL_ISINF $ac_have_decl
12206_ACEOF
12207ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12208"
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012210 ac_have_decl=1
12211else
12212 ac_have_decl=0
12213fi
12214
12215cat >>confdefs.h <<_ACEOF
12216#define HAVE_DECL_ISNAN $ac_have_decl
12217_ACEOF
12218ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12219"
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012221 ac_have_decl=1
12222else
12223 ac_have_decl=0
12224fi
12225
12226cat >>confdefs.h <<_ACEOF
12227#define HAVE_DECL_ISFINITE $ac_have_decl
12228_ACEOF
12229
12230
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012231# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12232# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12234$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012237else
12238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012240 ac_cv_tanh_preserves_zero_sign=no
12241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012243/* end confdefs.h. */
12244
12245#include <math.h>
12246#include <stdlib.h>
12247int main() {
12248 /* return 0 if either negative zeros don't exist
12249 on this platform or if negative zeros exist
12250 and tanh(-0.) == -0. */
12251 if (atan2(0., -1.) == atan2(-0., -1.) ||
12252 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12253 else exit(1);
12254}
12255
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012258 ac_cv_tanh_preserves_zero_sign=yes
12259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012264fi
12265
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012266fi
12267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12269$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012270if test "$ac_cv_tanh_preserves_zero_sign" = yes
12271then
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012274
12275fi
12276
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012277if test "$ac_cv_func_log1p" = yes
12278then
12279 # On some versions of AIX, log1p(-0.) returns 0. instead of
12280 # -0. See issue #9920.
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12282$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012283 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012284 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012285else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012286
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012287 if test "$cross_compiling" = yes; then :
12288 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012289else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12291/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012292
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012293 #include <math.h>
12294 #include <stdlib.h>
12295 int main() {
12296 /* Fail if the signs of log1p(-0.) and -0. can be
12297 distinguished. */
12298 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12299 return 0;
12300 else
12301 return 1;
12302 }
12303
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012304_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012305if ac_fn_c_try_run "$LINENO"; then :
12306 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012307else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012308 ac_cv_log1p_drops_zero_sign=yes
12309fi
12310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012312fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012313
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012314fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012315
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12317$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12318fi
12319if test "$ac_cv_log1p_drops_zero_sign" = yes
12320then
12321
12322$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12323
12324fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012325
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012326LIBS=$LIBS_SAVE
12327
Mark Dickinsona614f042009-11-28 12:48:43 +000012328# For multiprocessing module, check that sem_open
12329# actually works. For FreeBSD versions <= 7.2,
12330# the kernel module that provides POSIX semaphores
12331# isn't loaded by default, so an attempt to call
12332# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12334$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012335if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012339 ac_cv_posix_semaphores_enabled=yes
12340else
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012342/* end confdefs.h. */
12343
12344#include <unistd.h>
12345#include <fcntl.h>
12346#include <stdio.h>
12347#include <semaphore.h>
12348#include <sys/stat.h>
12349
12350int main(void) {
12351 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12352 if (a == SEM_FAILED) {
12353 perror("sem_open");
12354 return 1;
12355 }
12356 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012357 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012358 return 0;
12359}
12360
12361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012363 ac_cv_posix_semaphores_enabled=yes
12364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012369fi
12370
12371
Mark Dickinsona614f042009-11-28 12:48:43 +000012372fi
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12375$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012376if test $ac_cv_posix_semaphores_enabled = no
12377then
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012380
12381fi
12382
Mark Dickinson10683072009-04-18 21:18:19 +000012383# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12385$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012386if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012388else
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012390 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012393/* end confdefs.h. */
12394
12395#include <unistd.h>
12396#include <fcntl.h>
12397#include <stdio.h>
12398#include <semaphore.h>
12399#include <sys/stat.h>
12400
12401int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012402 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012403 int count;
12404 int res;
12405 if(a==SEM_FAILED){
12406 perror("sem_open");
12407 return 1;
12408
12409 }
12410 res = sem_getvalue(a, &count);
12411 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012412 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012413 return res==-1 ? 1 : 0;
12414}
12415
Mark Dickinson10683072009-04-18 21:18:19 +000012416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012417if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012418 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012419else
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12423 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012424fi
12425
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012426
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012427fi
12428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12430$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012431if test $ac_cv_broken_sem_getvalue = yes
12432then
12433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012435
12436fi
12437
Mark Dickinsonbd792642009-03-18 20:06:12 +000012438# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12440$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012441# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012443 enableval=$enable_big_digits; case $enable_big_digits in
12444yes)
12445 enable_big_digits=30 ;;
12446no)
12447 enable_big_digits=15 ;;
1244815|30)
12449 ;;
12450*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012451 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 +000012452esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12454$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012455
12456cat >>confdefs.h <<_ACEOF
12457#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12458_ACEOF
12459
12460
12461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12463$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012464fi
12465
12466
Guido van Rossumef2255b2000-03-10 22:30:29 +000012467# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012468ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
12471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012474 wchar_h="yes"
12475
Guido van Rossumef2255b2000-03-10 22:30:29 +000012476else
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012478
12479fi
12480
Michael W. Hudson54241132001-12-07 15:38:26 +000012481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012483# determine wchar_t size
12484if test "$wchar_h" = yes
12485then
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12491$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012492if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12496"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 if test "$ac_cv_type_wchar_t" = yes; then
12500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012502as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012503See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504 else
12505 ac_cv_sizeof_wchar_t=0
12506 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012508
Martin v. Löwis11437992002-04-12 09:54:03 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12511$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512
12513
12514
Martin v. Löwis11437992002-04-12 09:54:03 +000012515cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012516#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012517_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012518
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012520fi
12521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12523$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012524have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012526/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012527
12528#include <tcl.h>
12529#if TCL_UTF_MAX != 6
12530# error "NOT UCS4_TCL"
12531#endif
12532int
12533main ()
12534{
12535
12536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012541
12542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012544
12545 have_ucs4_tcl=yes
12546
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12550$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012551
Skip Montanaro6dead952003-09-25 14:50:04 +000012552# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012553if test "$wchar_h" = yes
12554then
12555 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12557$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012558 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012560else
12561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012563 ac_cv_wchar_t_signed=yes
12564else
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012567
12568 #include <wchar.h>
12569 int main()
12570 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012571 /* Success: exit code 0 */
12572 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012573 }
12574
12575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012576if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012577 ac_cv_wchar_t_signed=yes
12578else
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012583fi
12584
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12588$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589fi
12590
Georg Brandl52d168a2008-01-07 18:10:24 +000012591# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012592if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012593 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012594then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012595 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Georg Brandl52d168a2008-01-07 18:10:24 +000012599else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012600 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012601fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12603$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604
12605# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12607$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012608if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012610else
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 ac_cv_c_bigendian=unknown
12612 # See if we're dealing with a universal compiler.
12613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614/* end confdefs.h. */
12615#ifndef __APPLE_CC__
12616 not a universal capable compiler
12617 #endif
12618 typedef int dummy;
12619
Skip Montanaro6dead952003-09-25 14:50:04 +000012620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_compile "$LINENO"; then :
12622
12623 # Check for potential -arch flags. It is not universal unless
12624 # there are at least two -arch flags with different values.
12625 ac_arch=
12626 ac_prev=
12627 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12628 if test -n "$ac_prev"; then
12629 case $ac_word in
12630 i?86 | x86_64 | ppc | ppc64)
12631 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12632 ac_arch=$ac_word
12633 else
12634 ac_cv_c_bigendian=universal
12635 break
12636 fi
12637 ;;
12638 esac
12639 ac_prev=
12640 elif test "x$ac_word" = "x-arch"; then
12641 ac_prev=arch
12642 fi
12643 done
12644fi
12645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646 if test $ac_cv_c_bigendian = unknown; then
12647 # See if sys/param.h defines the BYTE_ORDER macro.
12648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012650#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012652
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Matthias Kloseb9621712010-04-24 17:59:49 +000012656#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12657 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12658 && LITTLE_ENDIAN)
12659 bogus endian macros
12660 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
12662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012667 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012670#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673int
12674main ()
12675{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012676#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 not big endian
12678 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
12680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012685 ac_cv_c_bigendian=yes
12686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012690fi
12691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 fi
12693 if test $ac_cv_c_bigendian = unknown; then
12694 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012696/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012697#include <limits.h>
12698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699int
12700main ()
12701{
Matthias Kloseb9621712010-04-24 17:59:49 +000012702#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12703 bogus endian macros
12704 #endif
12705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_compile "$LINENO"; then :
12711 # It does; now see whether it defined to _BIG_ENDIAN or not.
12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12713/* end confdefs.h. */
12714#include <limits.h>
12715
12716int
12717main ()
12718{
12719#ifndef _BIG_ENDIAN
12720 not big endian
12721 #endif
12722
12723 ;
12724 return 0;
12725}
12726_ACEOF
12727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12733fi
12734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12735 fi
12736 if test $ac_cv_c_bigendian = unknown; then
12737 # Compile a test program.
12738 if test "$cross_compiling" = yes; then :
12739 # Try to guess by grepping values from an object file.
12740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h. */
12742short int ascii_mm[] =
12743 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12744 short int ascii_ii[] =
12745 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12746 int use_ascii (int i) {
12747 return ascii_mm[i] + ascii_ii[i];
12748 }
12749 short int ebcdic_ii[] =
12750 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12751 short int ebcdic_mm[] =
12752 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12753 int use_ebcdic (int i) {
12754 return ebcdic_mm[i] + ebcdic_ii[i];
12755 }
12756 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758int
12759main ()
12760{
12761return use_ascii (foo) == use_ebcdic (foo);
12762 ;
12763 return 0;
12764}
12765_ACEOF
12766if ac_fn_c_try_compile "$LINENO"; then :
12767 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12768 ac_cv_c_bigendian=yes
12769 fi
12770 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12771 if test "$ac_cv_c_bigendian" = unknown; then
12772 ac_cv_c_bigendian=no
12773 else
12774 # finding both strings is unlikely to happen, but who knows?
12775 ac_cv_c_bigendian=unknown
12776 fi
12777 fi
12778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012782/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012784int
12785main ()
12786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 /* Are we little or big endian? From Harbison&Steele. */
12789 union
12790 {
12791 long int l;
12792 char c[sizeof (long int)];
12793 } u;
12794 u.l = 1;
12795 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797 ;
12798 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012799}
Martin v. Löwis11437992002-04-12 09:54:03 +000012800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012801if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012802 ac_cv_c_bigendian=no
12803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12813$as_echo "$ac_cv_c_bigendian" >&6; }
12814 case $ac_cv_c_bigendian in #(
12815 yes)
12816 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12817;; #(
12818 no)
12819 ;; #(
12820 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 ;; #(
12825 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012826 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012827 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012831# ABI version string for Python extension modules. This appears between the
12832# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12833# from the following attributes which affect the ABI of this Python build (in
12834# this order):
12835#
12836# * The Python implementation (always 'cpython-' for us)
12837# * The major and minor version numbers
12838# * --with-pydebug (adds a 'd')
12839# * --with-pymalloc (adds a 'm')
12840# * --with-wide-unicode (adds a 'u')
12841#
12842# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012843# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12844# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012845
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12847$as_echo_n "checking ABIFLAGS... " >&6; }
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12849$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12851$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012852SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12854$as_echo "$SOABI" >&6; }
12855
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12857$as_echo_n "checking LDVERSION... " >&6; }
12858LDVERSION='$(VERSION)$(ABIFLAGS)'
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12860$as_echo "$LDVERSION" >&6; }
12861
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012862# SO is the extension of shared libraries `(including the dot!)
12863# -- usually .so, .sl on HP-UX, .dll on Cygwin
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12865$as_echo_n "checking SO... " >&6; }
12866if test -z "$SO"
12867then
12868 case $ac_sys_system in
12869 hp*|HP*)
12870 case `uname -m` in
12871 ia64) SO=.so;;
12872 *) SO=.sl;;
12873 esac
12874 ;;
12875 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012876 Linux*|GNU*)
12877 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012878 *) SO=.so;;
12879 esac
12880else
12881 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012882 echo
12883 echo '====================================================================='
12884 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012885 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012886 echo '+ Do you really mean to change the extension for shared libraries? +'
12887 echo '+ Continuing in 10 seconds to let you to ponder. +'
12888 echo '+ +'
12889 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012890 sleep 10
12891fi
12892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12893$as_echo "$SO" >&6; }
12894
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012895# Check whether right shifting a negative integer extends the sign bit
12896# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12898$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012899if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012901else
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012904 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012905else
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012907/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012908
12909int main()
12910{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012911 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012912}
12913
Martin v. Löwis11437992002-04-12 09:54:03 +000012914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012916 ac_cv_rshift_extends_sign=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012922fi
12923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924fi
12925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12927$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012928if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012929then
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012932
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012933fi
12934
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012935# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12937$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012938if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
12947{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012948
12949 FILE *f = fopen("/dev/null", "r");
12950 flockfile(f);
12951 getc_unlocked(f);
12952 funlockfile(f);
12953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012959 ac_cv_have_getc_unlocked=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_have_getc_unlocked=no
12962fi
12963rm -f core conftest.err conftest.$ac_objext \
12964 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12968$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012969if test "$ac_cv_have_getc_unlocked" = yes
12970then
Martin v. Löwis11437992002-04-12 09:54:03 +000012971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012973
12974fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012975
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012976# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012977# save the value of LIBS so we don't actually link Python with readline
12978LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012979
Gregory P. Smith18820942008-09-07 06:24:49 +000012980# On some systems we need to link readline to a termcap compatible
12981# library. NOTE: Keep the precedence of listed libraries synchronised
12982# with setup.py.
12983py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12985$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012986for py_libtermcap in "" ncursesw ncurses curses termcap; do
12987 if test -z "$py_libtermcap"; then
12988 READLINE_LIBS="-lreadline"
12989 else
12990 READLINE_LIBS="-lreadline -l$py_libtermcap"
12991 fi
12992 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012994/* end confdefs.h. */
12995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996/* Override any GCC internal prototype to avoid an error.
12997 Use char because int might match the return type of a GCC
12998 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012999#ifdef __cplusplus
13000extern "C"
13001#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013002char readline ();
13003int
13004main ()
13005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013007 ;
13008 return 0;
13009}
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013012 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013016 if test $py_cv_lib_readline = yes; then
13017 break
13018 fi
13019done
13020# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13021#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013022if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13024$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13027$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013030
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013031fi
13032
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13035$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013036if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038else
13039 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013040LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013042/* end confdefs.h. */
13043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044/* Override any GCC internal prototype to avoid an error.
13045 Use char because int might match the return type of a GCC
13046 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047#ifdef __cplusplus
13048extern "C"
13049#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050char rl_callback_handler_install ();
13051int
13052main ()
13053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055 ;
13056 return 0;
13057}
13058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013059if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060 ac_cv_lib_readline_rl_callback_handler_install=yes
13061else
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013064rm -f core conftest.err conftest.$ac_objext \
13065 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013066LIBS=$ac_check_lib_save_LIBS
13067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13069$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013070if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073
13074fi
13075
13076
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013077# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013079/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013080#include <readline/readline.h>
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013083 have_readline=yes
13084else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013085 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013086
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013087fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013088rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013089if test $have_readline = yes
13090then
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013093#include <readline/readline.h>
13094
13095_ACEOF
13096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013100
13101fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013102rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013105/* end confdefs.h. */
13106#include <readline/readline.h>
13107
13108_ACEOF
13109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013113
13114fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013115rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013116
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013117fi
13118
Martin v. Löwis0daad592001-09-30 21:09:59 +000013119# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13121$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013122if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013126LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130/* Override any GCC internal prototype to avoid an error.
13131 Use char because int might match the return type of a GCC
13132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013133#ifdef __cplusplus
13134extern "C"
13135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013136char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013137int
13138main ()
13139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013150rm -f core conftest.err conftest.$ac_objext \
13151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013152LIBS=$ac_check_lib_save_LIBS
13153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13155$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013156if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013159
Martin v. Löwis0daad592001-09-30 21:09:59 +000013160fi
13161
Michael W. Hudson54241132001-12-07 15:38:26 +000013162
Thomas Wouters89d996e2007-09-08 17:39:28 +000013163# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13165$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013166if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013168else
13169 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013170LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013172/* end confdefs.h. */
13173
13174/* Override any GCC internal prototype to avoid an error.
13175 Use char because int might match the return type of a GCC
13176 builtin and then its argument prototype would still apply. */
13177#ifdef __cplusplus
13178extern "C"
13179#endif
13180char rl_completion_display_matches_hook ();
13181int
13182main ()
13183{
13184return rl_completion_display_matches_hook ();
13185 ;
13186 return 0;
13187}
13188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013189if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013190 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013194rm -f core conftest.err conftest.$ac_objext \
13195 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013196LIBS=$ac_check_lib_save_LIBS
13197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13199$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013200if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013203
13204fi
13205
13206
Martin v. Löwis0daad592001-09-30 21:09:59 +000013207# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13209$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013212else
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013214LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218/* Override any GCC internal prototype to avoid an error.
13219 Use char because int might match the return type of a GCC
13220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013221#ifdef __cplusplus
13222extern "C"
13223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013224char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013225int
13226main ()
13227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 ;
13230 return 0;
13231}
13232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013235else
Matthias Kloseb9621712010-04-24 17:59:49 +000013236 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013238rm -f core conftest.err conftest.$ac_objext \
13239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013240LIBS=$ac_check_lib_save_LIBS
13241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13243$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013244if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013247
Guido van Rossum353ae582001-07-10 16:45:32 +000013248fi
13249
Jack Jansendd19cf82001-12-06 22:36:17 +000013250
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013251# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013253/* end confdefs.h. */
13254#include <readline/readline.h>
13255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013257 have_readline=yes
13258else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013259 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013260
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013261fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013262rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013263if test $have_readline = yes
13264then
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013266/* end confdefs.h. */
13267#include <readline/readline.h>
13268
13269_ACEOF
13270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013274
13275fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013276rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013277
13278fi
13279
Martin v. Löwis82bca632006-02-10 20:49:30 +000013280# End of readline checks: restore LIBS
13281LIBS=$LIBS_no_readline
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13284$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013285if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013287else
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013290 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013293/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013294
13295int main()
13296{
13297 int val1 = nice(1);
13298 if (val1 != -1 && val1 == nice(2))
13299 exit(0);
13300 exit(1);
13301}
13302
Martin v. Löwis11437992002-04-12 09:54:03 +000013303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013305 ac_cv_broken_nice=yes
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013311fi
13312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313fi
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13316$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013317if test "$ac_cv_broken_nice" = yes
13318then
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013321
13322fi
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13325$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013326if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013330 ac_cv_broken_poll=no
13331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013333/* end confdefs.h. */
13334
13335#include <poll.h>
13336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013337int main()
13338{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013339 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013341
13342 close (42);
13343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013345 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013346 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013347 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013348 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013349 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013350 return 1;
13351}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013352
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013355 ac_cv_broken_poll=yes
13356else
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13360 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013363fi
13364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13366$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013367if test "$ac_cv_broken_poll" = yes
13368then
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013371
13372fi
13373
Brett Cannon43802422005-02-10 20:48:03 +000013374# 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 +000013375# (which is not required by ISO C or UNIX spec) and/or if we support
13376# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013377ac_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 +000013378#include <$ac_cv_struct_tm>
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380"
Victor Stinnere0be4232011-10-25 13:06:09 +020013381if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013382
13383cat >>confdefs.h <<_ACEOF
13384#define HAVE_STRUCT_TM_TM_ZONE 1
13385_ACEOF
13386
13387
13388fi
13389
13390if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013393
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13396"
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401fi
13402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405_ACEOF
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13408$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013409if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013413/* end confdefs.h. */
13414#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415#if !HAVE_DECL_TZNAME
13416extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013417#endif
13418
13419int
13420main ()
13421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013423 ;
13424 return 0;
13425}
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013428 ac_cv_var_tzname=yes
13429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013432rm -f core conftest.err conftest.$ac_objext \
13433 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13436$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013437 if test $ac_cv_var_tzname = yes; then
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013440
13441 fi
13442fi
13443
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013444
Martin v. Löwis1d459062005-03-14 21:23:33 +000013445# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13447$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013448if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013450else
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013453 ac_cv_working_tzset=no
13454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013457
13458#include <stdlib.h>
13459#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013460#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013461
13462#if HAVE_TZNAME
13463extern char *tzname[];
13464#endif
13465
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013466int main()
13467{
Brett Cannon18367812003-09-19 00:59:16 +000013468 /* Note that we need to ensure that not only does tzset(3)
13469 do 'something' with localtime, but it works as documented
13470 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013471 This includes making sure that tzname is set properly if
13472 tm->tm_zone does not exist since it is the alternative way
13473 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013474
13475 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013476 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013477 */
13478
Martin v. Löwis1d459062005-03-14 21:23:33 +000013479 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013480 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13481
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013482 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013483 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013484 if (localtime(&groundhogday)->tm_hour != 0)
13485 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013486#if HAVE_TZNAME
13487 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13488 if (strcmp(tzname[0], "UTC") ||
13489 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13490 exit(1);
13491#endif
Brett Cannon18367812003-09-19 00:59:16 +000013492
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013493 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013494 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013495 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013496 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013497#if HAVE_TZNAME
13498 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13499 exit(1);
13500#endif
Brett Cannon18367812003-09-19 00:59:16 +000013501
13502 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13503 tzset();
13504 if (localtime(&groundhogday)->tm_hour != 11)
13505 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013506#if HAVE_TZNAME
13507 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13508 exit(1);
13509#endif
13510
13511#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013512 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13513 exit(1);
13514 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13515 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013516#endif
Brett Cannon18367812003-09-19 00:59:16 +000013517
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013518 exit(0);
13519}
13520
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013523 ac_cv_working_tzset=yes
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013529fi
13530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531fi
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13534$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013535if test "$ac_cv_working_tzset" = yes
13536then
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013539
13540fi
13541
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013542# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13544$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013545if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013549/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013550#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013551int
13552main ()
13553{
13554
13555struct stat st;
13556st.st_mtim.tv_nsec = 1;
13557
13558 ;
13559 return 0;
13560}
13561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013563 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13568fi
13569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13571$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013572if test "$ac_cv_stat_tv_nsec" = yes
13573then
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013576
13577fi
13578
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013579# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13581$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013582if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013586/* end confdefs.h. */
13587#include <sys/stat.h>
13588int
13589main ()
13590{
13591
13592struct stat st;
13593st.st_mtimespec.tv_nsec = 1;
13594
13595 ;
13596 return 0;
13597}
13598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013600 ac_cv_stat_tv_nsec2=yes
13601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13608$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013609if test "$ac_cv_stat_tv_nsec2" = yes
13610then
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013613
13614fi
13615
Jack Jansen666b1e72001-10-31 12:11:48 +000013616# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13618$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013623/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013624#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013625int
13626main ()
13627{
Jack Jansen666b1e72001-10-31 12:11:48 +000013628
13629 int rtn;
13630 rtn = mvwdelch(0,0,0);
13631
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 ;
13633 return 0;
13634}
13635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013637 ac_cv_mvwdelch_is_expression=yes
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13642fi
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13645$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013646
13647if test "$ac_cv_mvwdelch_is_expression" = yes
13648then
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013651
13652fi
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13655$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013656if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013660/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013661#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013662int
13663main ()
13664{
Jack Jansen666b1e72001-10-31 12:11:48 +000013665
13666 WINDOW *w;
13667 w->_flags = 0;
13668
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 ;
13670 return 0;
13671}
13672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013673if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013674 ac_cv_window_has_flags=yes
13675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13679fi
13680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13682$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013683
Jack Jansen666b1e72001-10-31 12:11:48 +000013684
13685if test "$ac_cv_window_has_flags" = yes
13686then
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013689
13690fi
13691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13693$as_echo_n "checking for is_term_resized... " >&6; }
13694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013695/* end confdefs.h. */
13696#include <curses.h>
13697int
13698main ()
13699{
13700void *x=is_term_resized
13701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013708
Matthias Kloseb159a552010-04-25 21:00:44 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013710$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13713$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013714
13715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13719$as_echo_n "checking for resize_term... " >&6; }
13720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013721/* end confdefs.h. */
13722#include <curses.h>
13723int
13724main ()
13725{
13726void *x=resize_term
13727 ;
13728 return 0;
13729}
13730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013731if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013734
Matthias Kloseb159a552010-04-25 21:00:44 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013736$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13739$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013740
13741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13745$as_echo_n "checking for resizeterm... " >&6; }
13746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013747/* end confdefs.h. */
13748#include <curses.h>
13749int
13750main ()
13751{
13752void *x=resizeterm
13753 ;
13754 return 0;
13755}
13756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013757if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013760
Matthias Kloseb159a552010-04-25 21:00:44 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013762$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13765$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013766
13767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13771$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013772
13773if test -r /dev/ptmx
13774then
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13776$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013779
Thomas Wouters89f507f2006-12-13 04:49:30 +000013780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13782$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013783fi
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13786$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013787
13788if test -r /dev/ptc
13789then
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13791$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013794
Thomas Wouters89f507f2006-12-13 04:49:30 +000013795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13797$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013798fi
13799
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013800if test "$have_long_long" = yes
13801then
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13803$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013804 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013808 ac_cv_have_long_long_format=no
13809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013811/* end confdefs.h. */
13812
13813 #include <stdio.h>
13814 #include <stddef.h>
13815 #include <string.h>
13816
13817 #ifdef HAVE_SYS_TYPES_H
13818 #include <sys/types.h>
13819 #endif
13820
13821 int main()
13822 {
13823 char buffer[256];
13824
13825 if (sprintf(buffer, "%lld", (long long)123) < 0)
13826 return 1;
13827 if (strcmp(buffer, "123"))
13828 return 1;
13829
13830 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13831 return 1;
13832 if (strcmp(buffer, "-123"))
13833 return 1;
13834
13835 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13836 return 1;
13837 if (strcmp(buffer, "123"))
13838 return 1;
13839
13840 return 0;
13841 }
13842
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013845 ac_cv_have_long_long_format=yes
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013851fi
13852
13853
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013854fi
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13857$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013858fi
13859
Mark Dickinson89d7d412009-12-31 20:50:59 +000013860if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013861then
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013864
13865fi
13866
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013867if test $ac_sys_system = Darwin
13868then
13869 LIBS="$LIBS -framework CoreFoundation"
13870fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13873$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013878 ac_cv_have_size_t_format="cross -- assuming yes"
13879
Thomas Wouters477c8d52006-05-27 19:21:47 +000013880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013882/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013883
Thomas Wouters477c8d52006-05-27 19:21:47 +000013884#include <stdio.h>
13885#include <stddef.h>
13886#include <string.h>
13887
Christian Heimes2c181612007-12-17 20:04:13 +000013888#ifdef HAVE_SYS_TYPES_H
13889#include <sys/types.h>
13890#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013891
13892#ifdef HAVE_SSIZE_T
13893typedef ssize_t Py_ssize_t;
13894#elif SIZEOF_VOID_P == SIZEOF_LONG
13895typedef long Py_ssize_t;
13896#else
13897typedef int Py_ssize_t;
13898#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013899
Christian Heimes2c181612007-12-17 20:04:13 +000013900int main()
13901{
13902 char buffer[256];
13903
Thomas Wouters477c8d52006-05-27 19:21:47 +000013904 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13905 return 1;
13906
Thomas Wouters89f507f2006-12-13 04:49:30 +000013907 if (strcmp(buffer, "123"))
13908 return 1;
13909
13910 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13911 return 1;
13912
13913 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013914 return 1;
13915
13916 return 0;
13917}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013918
Thomas Wouters477c8d52006-05-27 19:21:47 +000013919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013921 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013927fi
13928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13931$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013932if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013935
13936fi
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013939#ifdef HAVE_SYS_TYPES_H
13940#include <sys/types.h>
13941#endif
13942#ifdef HAVE_SYS_SOCKET_H
13943#include <sys/socket.h>
13944#endif
13945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946"
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013952
13953fi
13954
Michael W. Hudson54241132001-12-07 15:38:26 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13957$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013960else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013962 ac_cv_broken_mbstowcs=no
13963else
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013965/* end confdefs.h. */
13966
13967#include<stdlib.h>
13968int main() {
13969 size_t len = -1;
13970 const char *str = "text";
13971 len = mbstowcs(NULL, str, 0);
13972 return (len != 4);
13973}
13974
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013977 ac_cv_broken_mbstowcs=no
13978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013983fi
13984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013985fi
13986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13988$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013989if test "$ac_cv_broken_mbstowcs" = yes
13990then
13991
Matthias Kloseb9621712010-04-24 17:59:49 +000013992$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013993
13994fi
13995
Antoine Pitrou042b1282010-08-13 21:15:58 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13997$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013998if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013999 $as_echo_n "(cached) " >&6
14000else
14001 if test "$cross_compiling" = yes; then :
14002 ac_cv_computed_gotos=no
14003else
14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14005/* end confdefs.h. */
14006
14007int main(int argc, char **argv)
14008{
14009 static void *targets[1] = { &&LABEL1 };
14010 goto LABEL2;
14011LABEL1:
14012 return 0;
14013LABEL2:
14014 goto *targets[0];
14015 return 1;
14016}
14017
14018_ACEOF
14019if ac_fn_c_try_run "$LINENO"; then :
14020 ac_cv_computed_gotos=yes
14021else
14022 ac_cv_computed_gotos=no
14023fi
14024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14025 conftest.$ac_objext conftest.beam conftest.$ac_ext
14026fi
14027
14028fi
14029
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14031$as_echo "$ac_cv_computed_gotos" >&6; }
14032if test "$ac_cv_computed_gotos" = yes
14033then
14034
14035$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14036
14037fi
14038
Antoine Pitroub52ec782009-01-25 16:34:23 +000014039# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14041$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014042
14043# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014045 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014046if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014047then
14048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14052$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014053fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014054if test "$withval" = no
14055then
14056
14057$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14060$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014061fi
14062
Antoine Pitrou042b1282010-08-13 21:15:58 +000014063else
14064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14065$as_echo "no value specified" >&6; }
14066fi
14067
Antoine Pitroub52ec782009-01-25 16:34:23 +000014068
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014069case $ac_sys_system in
14070AIX*)
14071
14072$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14073 ;;
14074esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014075
Michael W. Hudson54241132001-12-07 15:38:26 +000014076
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014077
14078
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014079for h in `(cd $srcdir;echo Python/thread_*.h)`
14080do
14081 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14082done
14083
Michael W. Hudson54241132001-12-07 15:38:26 +000014084
Neal Norwitzd24499d2005-12-18 21:36:39 +000014085SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14087$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014088for dir in $SRCDIRS; do
14089 if test ! -d $dir; then
14090 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014091 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014092done
Matthias Kloseb9621712010-04-24 17:59:49 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14094$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014095
Guido van Rossum627b2d71993-12-24 10:39:16 +000014096# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014097ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014098
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014099ac_config_files="$ac_config_files Modules/ld_so_aix"
14100
Martin v. Löwis11437992002-04-12 09:54:03 +000014101cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102# This file is a shell script that caches the results of configure
14103# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014104# scripts and configure runs, see configure's option --config-cache.
14105# It is not useful on other systems. If it contains results you don't
14106# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107#
Martin v. Löwis11437992002-04-12 09:54:03 +000014108# config.status only pays attention to the cache file if you give it
14109# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110#
Skip Montanaro6dead952003-09-25 14:50:04 +000014111# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014112# loading this file, other *unset* `ac_cv_foo' will be assigned the
14113# following values.
14114
14115_ACEOF
14116
Guido van Rossumf78abae1997-01-21 22:02:36 +000014117# The following way of writing the cache mishandles newlines in values,
14118# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014119# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014120# Ultrix sh set writes to stderr and can't be redirected directly,
14121# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122(
14123 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14124 eval ac_val=\$$ac_var
14125 case $ac_val in #(
14126 *${as_nl}*)
14127 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14129$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 esac
14131 case $ac_var in #(
14132 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14134 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135 esac ;;
14136 esac
14137 done
14138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14141 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 # `set' does not quote correctly, so add quotes: double-quote
14143 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014145 "s/'/'\\\\''/g;
14146 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 *)
14149 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 esac |
14153 sort
14154) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14160 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14162 :end' >>confcache
14163if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14164 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014165 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14167$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014168 if test ! -f "$cache_file" || test -h "$cache_file"; then
14169 cat confcache >"$cache_file"
14170 else
14171 case $cache_file in #(
14172 */* | ?:*)
14173 mv -f confcache "$cache_file"$$ &&
14174 mv -f "$cache_file"$$ "$cache_file" ;; #(
14175 *)
14176 mv -f confcache "$cache_file" ;;
14177 esac
14178 fi
14179 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014180 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14182$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014183 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014184fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014185rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014187test "x$prefix" = xNONE && prefix=$ac_default_prefix
14188# Let make expand exec_prefix.
14189test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014191DEFS=-DHAVE_CONFIG_H
14192
Skip Montanaro6dead952003-09-25 14:50:04 +000014193ac_libobjs=
14194ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014195U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014196for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14197 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14201 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14203 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014204done
14205LIBOBJS=$ac_libobjs
14206
14207LTLIBOBJS=$ac_ltlibobjs
14208
14209
Martin v. Löwis11437992002-04-12 09:54:03 +000014210
Matthias Kloseb9621712010-04-24 17:59:49 +000014211
Victor Stinnere0be4232011-10-25 13:06:09 +020014212: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014213ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014214ac_clean_files_save=$ac_clean_files
14215ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014216{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14217$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14218as_write_fail=0
14219cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014220#! $SHELL
14221# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014222# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014223# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014224# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014225
Martin v. Löwis11437992002-04-12 09:54:03 +000014226debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014227ac_cs_recheck=false
14228ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230SHELL=\${CONFIG_SHELL-$SHELL}
14231export SHELL
14232_ASEOF
14233cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14234## -------------------- ##
14235## M4sh Initialization. ##
14236## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238# Be more Bourne compatible
14239DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 emulate sh
14242 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014244 # is contrary to our usage. Disable this feature.
14245 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 case `(set -o) 2>/dev/null` in #(
14249 *posix*) :
14250 set -o posix ;; #(
14251 *) :
14252 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014254fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014255
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257as_nl='
14258'
14259export as_nl
14260# Printing a long string crashes Solaris 7 /usr/bin/printf.
14261as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14262as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14263as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14264# Prefer a ksh shell builtin over an external printf program on Solaris,
14265# but without wasting forks for bash or zsh.
14266if test -z "$BASH_VERSION$ZSH_VERSION" \
14267 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14268 as_echo='print -r --'
14269 as_echo_n='print -rn --'
14270elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14271 as_echo='printf %s\n'
14272 as_echo_n='printf %s'
14273else
14274 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14275 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14276 as_echo_n='/usr/ucb/echo -n'
14277 else
14278 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14279 as_echo_n_body='eval
14280 arg=$1;
14281 case $arg in #(
14282 *"$as_nl"*)
14283 expr "X$arg" : "X\\(.*\\)$as_nl";
14284 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14285 esac;
14286 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14287 '
14288 export as_echo_n_body
14289 as_echo_n='sh -c $as_echo_n_body as_echo'
14290 fi
14291 export as_echo_body
14292 as_echo='sh -c $as_echo_body as_echo'
14293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
14295# The user is always right.
14296if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 PATH_SEPARATOR=:
14298 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14299 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14300 PATH_SEPARATOR=';'
14301 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304
14305# IFS
14306# We need space, tab and new line, in precisely that order. Quoting is
14307# there to prevent editors from complaining about space-tab.
14308# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14309# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310IFS=" "" $as_nl"
14311
14312# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014313as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014314case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315 *[\\/]* ) as_myself=$0 ;;
14316 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014317for as_dir in $PATH
14318do
14319 IFS=$as_save_IFS
14320 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14322 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 ;;
14326esac
14327# We did not find ourselves, most probably we were run as `sh COMMAND'
14328# in which case we are not to be found in the path.
14329if test "x$as_myself" = x; then
14330 as_myself=$0
14331fi
14332if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14334 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335fi
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337# Unset variables that we do not need and which cause bugs (e.g. in
14338# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14339# suppresses any "Segmentation fault" message there. '((' could
14340# trigger a bug in pdksh 5.2.14.
14341for as_var in BASH_ENV ENV MAIL MAILPATH
14342do eval test x\${$as_var+set} = xset \
14343 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344done
14345PS1='$ '
14346PS2='> '
14347PS4='+ '
14348
14349# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014350LC_ALL=C
14351export LC_ALL
14352LANGUAGE=C
14353export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354
Matthias Kloseb9621712010-04-24 17:59:49 +000014355# CDPATH.
14356(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14357
14358
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014359# as_fn_error STATUS ERROR [LINENO LOG_FD]
14360# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014363# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014364as_fn_error ()
14365{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014366 as_status=$1; test $as_status -eq 0 && as_status=1
14367 if test "$4"; then
14368 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014371 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 as_fn_exit $as_status
14373} # as_fn_error
14374
14375
14376# as_fn_set_status STATUS
14377# -----------------------
14378# Set $? to STATUS, without forking.
14379as_fn_set_status ()
14380{
14381 return $1
14382} # as_fn_set_status
14383
14384# as_fn_exit STATUS
14385# -----------------
14386# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14387as_fn_exit ()
14388{
14389 set +e
14390 as_fn_set_status $1
14391 exit $1
14392} # as_fn_exit
14393
14394# as_fn_unset VAR
14395# ---------------
14396# Portably unset VAR.
14397as_fn_unset ()
14398{
14399 { eval $1=; unset $1;}
14400}
14401as_unset=as_fn_unset
14402# as_fn_append VAR VALUE
14403# ----------------------
14404# Append the text in VALUE to the end of the definition contained in VAR. Take
14405# advantage of any shell optimizations that allow amortized linear growth over
14406# repeated appends, instead of the typical quadratic growth present in naive
14407# implementations.
14408if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14409 eval 'as_fn_append ()
14410 {
14411 eval $1+=\$2
14412 }'
14413else
14414 as_fn_append ()
14415 {
14416 eval $1=\$$1\$2
14417 }
14418fi # as_fn_append
14419
14420# as_fn_arith ARG...
14421# ------------------
14422# Perform arithmetic evaluation on the ARGs, and store the result in the
14423# global $as_val. Take advantage of shells that can avoid forks. The arguments
14424# must be portable across $(()) and expr.
14425if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14426 eval 'as_fn_arith ()
14427 {
14428 as_val=$(( $* ))
14429 }'
14430else
14431 as_fn_arith ()
14432 {
14433 as_val=`expr "$@" || test $? -eq 1`
14434 }
14435fi # as_fn_arith
14436
14437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438if expr a : '\(a\)' >/dev/null 2>&1 &&
14439 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14440 as_expr=expr
14441else
14442 as_expr=false
14443fi
14444
14445if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14446 as_basename=basename
14447else
14448 as_basename=false
14449fi
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14452 as_dirname=dirname
14453else
14454 as_dirname=false
14455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457as_me=`$as_basename -- "$0" ||
14458$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14459 X"$0" : 'X\(//\)$' \| \
14460 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014461$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462 sed '/^.*\/\([^/][^/]*\)\/*$/{
14463 s//\1/
14464 q
14465 }
14466 /^X\/\(\/\/\)$/{
14467 s//\1/
14468 q
14469 }
14470 /^X\/\(\/\).*/{
14471 s//\1/
14472 q
14473 }
14474 s/.*/./; q'`
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476# Avoid depending upon Character Ranges.
14477as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14478as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14479as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14480as_cr_digits='0123456789'
14481as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482
14483ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014484case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 xy) ECHO_C='\c';;
14489 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14490 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491 esac;;
14492*)
14493 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014495
Martin v. Löwis11437992002-04-12 09:54:03 +000014496rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497if test -d conf$$.dir; then
14498 rm -f conf$$.dir/conf$$.file
14499else
14500 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014503if (echo >conf$$.file) 2>/dev/null; then
14504 if ln -s conf$$.file conf$$ 2>/dev/null; then
14505 as_ln_s='ln -s'
14506 # ... but there are two gotchas:
14507 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14508 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14509 # In both cases, we have to default to `cp -p'.
14510 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14511 as_ln_s='cp -p'
14512 elif ln conf$$.file conf$$ 2>/dev/null; then
14513 as_ln_s=ln
14514 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014517else
14518 as_ln_s='cp -p'
14519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14521rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523
14524# as_fn_mkdir_p
14525# -------------
14526# Create "$as_dir" as a directory, including parents if necessary.
14527as_fn_mkdir_p ()
14528{
14529
14530 case $as_dir in #(
14531 -*) as_dir=./$as_dir;;
14532 esac
14533 test -d "$as_dir" || eval $as_mkdir_p || {
14534 as_dirs=
14535 while :; do
14536 case $as_dir in #(
14537 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14538 *) as_qdir=$as_dir;;
14539 esac
14540 as_dirs="'$as_qdir' $as_dirs"
14541 as_dir=`$as_dirname -- "$as_dir" ||
14542$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14543 X"$as_dir" : 'X\(//\)[^/]' \| \
14544 X"$as_dir" : 'X\(//\)$' \| \
14545 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14546$as_echo X"$as_dir" |
14547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14548 s//\1/
14549 q
14550 }
14551 /^X\(\/\/\)[^/].*/{
14552 s//\1/
14553 q
14554 }
14555 /^X\(\/\/\)$/{
14556 s//\1/
14557 q
14558 }
14559 /^X\(\/\).*/{
14560 s//\1/
14561 q
14562 }
14563 s/.*/./; q'`
14564 test -d "$as_dir" && break
14565 done
14566 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014567 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014568
14569
14570} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014571if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014573else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014574 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014575 as_mkdir_p=false
14576fi
14577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578if test -x / >/dev/null 2>&1; then
14579 as_test_x='test -x'
14580else
14581 if ls -dL / >/dev/null 2>&1; then
14582 as_ls_L_option=L
14583 else
14584 as_ls_L_option=
14585 fi
14586 as_test_x='
14587 eval sh -c '\''
14588 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 case $1 in #(
14592 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 ???[sx]*):;;*)false;;esac;fi
14596 '\'' sh
14597 '
14598fi
14599as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014602as_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 +000014603
14604# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014605as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014609## ----------------------------------- ##
14610## Main body of $CONFIG_STATUS script. ##
14611## ----------------------------------- ##
14612_ASEOF
14613test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14616# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014617# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618# values after options handling.
14619ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014620This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014621generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
14623 CONFIG_FILES = $CONFIG_FILES
14624 CONFIG_HEADERS = $CONFIG_HEADERS
14625 CONFIG_LINKS = $CONFIG_LINKS
14626 CONFIG_COMMANDS = $CONFIG_COMMANDS
14627 $ $0 $@
14628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629on `(hostname || uname -n) 2>/dev/null | sed 1q`
14630"
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632_ACEOF
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634case $ac_config_files in *"
14635"*) set x $ac_config_files; shift; ac_config_files=$*;;
14636esac
14637
14638case $ac_config_headers in *"
14639"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14640esac
14641
14642
14643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014644# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014645config_files="$ac_config_files"
14646config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
Matthias Kloseb9621712010-04-24 17:59:49 +000014650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014651ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014652\`$as_me' instantiates files and other configuration actions
14653from templates according to the current configuration. Unless the files
14654and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
Matthias Kloseb9621712010-04-24 17:59:49 +000014656Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014657
14658 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 --config print configuration, then exit
14661 -q, --quiet, --silent
14662 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 -d, --debug don't remove temporary files
14664 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 --file=FILE[:TEMPLATE]
14666 instantiate the configuration file FILE
14667 --header=FILE[:TEMPLATE]
14668 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014669
14670Configuration files:
14671$config_files
14672
14673Configuration headers:
14674$config_headers
14675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14680ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014681ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014682python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014683configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014686Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014687This config.status script is free software; the Free Software Foundation
14688gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689
14690ac_pwd='$ac_pwd'
14691srcdir='$srcdir'
14692INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010014693MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014694test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014695_ACEOF
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14698# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014699ac_need_defaults=:
14700while test $# != 0
14701do
14702 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014703 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14705 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014706 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014708 --*=)
14709 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14710 ac_optarg=
14711 ac_shift=:
14712 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014714 ac_option=$1
14715 ac_optarg=$2
14716 ac_shift=shift
14717 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 esac
14719
Skip Montanaro6dead952003-09-25 14:50:04 +000014720 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014722 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14723 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 $as_echo "$ac_cs_version"; exit ;;
14726 --config | --confi | --conf | --con | --co | --c )
14727 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 debug=: ;;
14730 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014731 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 case $ac_optarg in
14733 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014734 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 esac
14736 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014737 ac_need_defaults=false;;
14738 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014739 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 case $ac_optarg in
14741 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14742 esac
14743 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745 --he | --h)
14746 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014747 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014748Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014751 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14752 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14753 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
14755 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014756 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014757Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014761
14762 esac
14763 shift
14764done
14765
Skip Montanaro6dead952003-09-25 14:50:04 +000014766ac_configure_extra_args=
14767
14768if $ac_cs_silent; then
14769 exec 6>/dev/null
14770 ac_configure_extra_args="$ac_configure_extra_args --silent"
14771fi
14772
14773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014775if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14777 shift
14778 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14779 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014782fi
14783
Martin v. Löwis11437992002-04-12 09:54:03 +000014784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014785cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786exec 5>>config.log
14787{
14788 echo
14789 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14790## Running $as_me. ##
14791_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800
14801# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014802for ac_config_target in $ac_config_targets
14803do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804 case $ac_config_target in
14805 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14806 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14807 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014808 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14809 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14811 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014812 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014813 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014814
Victor Stinnere0be4232011-10-25 13:06:09 +020014815 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 esac
14817done
14818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820# If the user did not use the arguments to specify the items to instantiate,
14821# then the envvar interface is used. Set only those that are not.
14822# We use the long form for the default assignment because of an extremely
14823# bizarre bug on SunOS 4.1.3.
14824if $ac_need_defaults; then
14825 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14826 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14827fi
14828
Skip Montanaro6dead952003-09-25 14:50:04 +000014829# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014831# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832# Hook for its removal unless debugging.
14833# Note that there is a small window in which the directory will not be cleaned:
14834# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014835$debug ||
14836{
Victor Stinnere0be4232011-10-25 13:06:09 +020014837 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020014839 : "${ac_tmp:=$tmp}"
14840 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014843}
Martin v. Löwis11437992002-04-12 09:54:03 +000014844# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020014848 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014849} ||
14850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 tmp=./conf$$-$RANDOM
14852 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014853} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020014854ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856# Set up the scripts for CONFIG_FILES section.
14857# No need to generate them if there are no CONFIG_FILES.
14858# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861
14862ac_cr=`echo X | tr X '\015'`
14863# On cygwin, bash can eat \r inside `` if the user requested igncr.
14864# But we know of no other shell where ac_cr would be empty at this
14865# point, so we can use a bashism as a fallback.
14866if test "x$ac_cr" = x; then
14867 eval ac_cr=\$\'\\r\'
14868fi
14869ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14870if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014871 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014872else
14873 ac_cs_awk_cr=$ac_cr
14874fi
14875
Victor Stinnere0be4232011-10-25 13:06:09 +020014876echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014877_ACEOF
14878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{
14881 echo "cat >conf$$subs.awk <<_ACEOF" &&
14882 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14883 echo "_ACEOF"
14884} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014885 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14886ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887ac_delim='%!_!# '
14888for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014890 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14893 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 break
14895 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014896 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 else
14898 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014899 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900done
Matthias Kloseb9621712010-04-24 17:59:49 +000014901rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020014904cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906sed -n '
14907h
14908s/^/S["/; s/!.*/"]=/
14909p
14910g
14911s/^[^!]*!//
14912:repl
14913t repl
14914s/'"$ac_delim"'$//
14915t delim
14916:nl
14917h
14918s/\(.\{148\}\)..*/\1/
14919t more1
14920s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14921p
14922n
14923b repl
14924:more1
14925s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14926p
14927g
14928s/.\{148\}//
14929t nl
14930:delim
14931h
14932s/\(.\{148\}\)..*/\1/
14933t more2
14934s/["\\]/\\&/g; s/^/"/; s/$/"/
14935p
14936b
14937:more2
14938s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14939p
14940g
14941s/.\{148\}//
14942t delim
14943' <conf$$subs.awk | sed '
14944/^[^""]/{
14945 N
14946 s/\n//
14947}
14948' >>$CONFIG_STATUS || ac_write_fail=1
14949rm -f conf$$subs.awk
14950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14951_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020014952cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 for (key in S) S_is_set[key] = 1
14954 FS = ""
14955
14956}
14957{
14958 line = $ 0
14959 nfields = split(line, field, "@")
14960 substed = 0
14961 len = length(field[1])
14962 for (i = 2; i < nfields; i++) {
14963 key = field[i]
14964 keylen = length(key)
14965 if (S_is_set[key]) {
14966 value = S[key]
14967 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14968 len += length(value) + length(field[++i])
14969 substed = 1
14970 } else
14971 len += 1 + keylen
14972 }
14973
14974 print line
14975}
14976
14977_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014979cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14980if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14981 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14982else
14983 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020014984fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014985 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014986_ACEOF
14987
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014988# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14989# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990# trailing colons and then remove the whole line if VPATH becomes empty
14991# (actually we leave an empty line to preserve line numbers).
14992if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014993 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14994h
14995s///
14996s/^/:/
14997s/[ ]*$/:/
14998s/:\$(srcdir):/:/g
14999s/:\${srcdir}:/:/g
15000s/:@srcdir@:/:/g
15001s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015003x
15004s/\(=[ ]*\).*/\1/
15005G
15006s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007s/^[^=]*=[ ]*$//
15008}'
15009fi
15010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015012fi # test -n "$CONFIG_FILES"
15013
Matthias Kloseb9621712010-04-24 17:59:49 +000015014# Set up the scripts for CONFIG_HEADERS section.
15015# No need to generate them if there are no CONFIG_HEADERS.
15016# This happens for instance with `./config.status Makefile'.
15017if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015018cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015019BEGIN {
15020_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022# Transform confdefs.h into an awk script `defines.awk', embedded as
15023# here-document in config.status, that substitutes the proper values into
15024# config.h.in to produce config.h.
15025
15026# Create a delimiter string that does not exist in confdefs.h, to ease
15027# handling of long lines.
15028ac_delim='%!_!# '
15029for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015030 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15031 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015032 break
15033 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015034 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 else
15036 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15037 fi
15038done
15039
15040# For the awk script, D is an array of macro values keyed by name,
15041# likewise P contains macro parameters if any. Preserve backslash
15042# newline sequences.
15043
15044ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15045sed -n '
15046s/.\{148\}/&'"$ac_delim"'/g
15047t rset
15048:rset
15049s/^[ ]*#[ ]*define[ ][ ]*/ /
15050t def
15051d
15052:def
15053s/\\$//
15054t bsnl
15055s/["\\]/\\&/g
15056s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15057D["\1"]=" \3"/p
15058s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15059d
15060:bsnl
15061s/["\\]/\\&/g
15062s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15063D["\1"]=" \3\\\\\\n"\\/p
15064t cont
15065s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15066t cont
15067d
15068:cont
15069n
15070s/.\{148\}/&'"$ac_delim"'/g
15071t clear
15072:clear
15073s/\\$//
15074t bsnlc
15075s/["\\]/\\&/g; s/^/"/; s/$/"/p
15076d
15077:bsnlc
15078s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15079b cont
15080' <confdefs.h | sed '
15081s/'"$ac_delim"'/"\\\
15082"/g' >>$CONFIG_STATUS || ac_write_fail=1
15083
15084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15085 for (key in D) D_is_set[key] = 1
15086 FS = ""
15087}
15088/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15089 line = \$ 0
15090 split(line, arg, " ")
15091 if (arg[1] == "#") {
15092 defundef = arg[2]
15093 mac1 = arg[3]
15094 } else {
15095 defundef = substr(arg[1], 2)
15096 mac1 = arg[2]
15097 }
15098 split(mac1, mac2, "(") #)
15099 macro = mac2[1]
15100 prefix = substr(line, 1, index(line, defundef) - 1)
15101 if (D_is_set[macro]) {
15102 # Preserve the white space surrounding the "#".
15103 print prefix "define", macro P[macro] D[macro]
15104 next
15105 } else {
15106 # Replace #undef with comments. This is necessary, for example,
15107 # in the case of _POSIX_SOURCE, which is predefined and required
15108 # on some systems where configure will not decide to define it.
15109 if (defundef == "undef") {
15110 print "/*", prefix defundef, macro, "*/"
15111 next
15112 }
15113 }
15114}
15115{ print }
15116_ACAWK
15117_ACEOF
15118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015119 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015120fi # test -n "$CONFIG_HEADERS"
15121
15122
15123eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15124shift
15125for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126do
15127 case $ac_tag in
15128 :[FHLC]) ac_mode=$ac_tag; continue;;
15129 esac
15130 case $ac_mode$ac_tag in
15131 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015132 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133 :[FH]-) ac_tag=-:-;;
15134 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15135 esac
15136 ac_save_IFS=$IFS
15137 IFS=:
15138 set x $ac_tag
15139 IFS=$ac_save_IFS
15140 shift
15141 ac_file=$1
15142 shift
15143
15144 case $ac_mode in
15145 :L) ac_source=$1;;
15146 :[FH])
15147 ac_file_inputs=
15148 for ac_f
15149 do
15150 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015151 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 *) # Look for the file first in the build tree, then in the source tree
15153 # (if the path is not absolute). The absolute path cannot be DOS-style,
15154 # because $ac_f cannot contain `:'.
15155 test -f "$ac_f" ||
15156 case $ac_f in
15157 [\\/$]*) false;;
15158 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15159 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015160 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15163 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164 done
15165
15166 # Let's still pretend it is `configure' which instantiates (i.e., don't
15167 # use $as_me), people would be surprised to read:
15168 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 configure_input='Generated from '`
15170 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15171 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 if test x"$ac_file" != x-; then
15173 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15175$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 # Neutralize special characters interpreted by sed in replacement strings.
15178 case $configure_input in #(
15179 *\&* | *\|* | *\\* )
15180 ac_sed_conf_input=`$as_echo "$configure_input" |
15181 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15182 *) ac_sed_conf_input=$configure_input;;
15183 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184
15185 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015186 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15187 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 esac
15189 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 esac
15191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015193$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015194 X"$ac_file" : 'X\(//\)[^/]' \| \
15195 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015197$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15199 s//\1/
15200 q
15201 }
15202 /^X\(\/\/\)[^/].*/{
15203 s//\1/
15204 q
15205 }
15206 /^X\(\/\/\)$/{
15207 s//\1/
15208 q
15209 }
15210 /^X\(\/\).*/{
15211 s//\1/
15212 q
15213 }
15214 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_builddir=.
15217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218case "$ac_dir" in
15219.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15220*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 case $ac_top_builddir_sub in
15225 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15226 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15227 esac ;;
15228esac
15229ac_abs_top_builddir=$ac_pwd
15230ac_abs_builddir=$ac_pwd$ac_dir_suffix
15231# for backward compatibility:
15232ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
15234case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237 ac_top_srcdir=$ac_top_builddir_sub
15238 ac_abs_top_srcdir=$ac_pwd ;;
15239 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241 ac_top_srcdir=$srcdir
15242 ac_abs_top_srcdir=$srcdir ;;
15243 *) # Relative name.
15244 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15245 ac_top_srcdir=$ac_top_build_prefix$srcdir
15246 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015247esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251 case $ac_mode in
15252 :F)
15253 #
15254 # CONFIG_FILE
15255 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
15257 case $INSTALL in
15258 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015261 ac_MKDIR_P=$MKDIR_P
15262 case $MKDIR_P in
15263 [\\/$]* | ?:[\\/]* ) ;;
15264 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15265 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015266_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269# If the template does not know about datarootdir, expand it.
15270# FIXME: This hack should be removed a few years after 2.60.
15271ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015272ac_sed_dataroot='
15273/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274 p
15275 q
15276}
15277/@datadir@/p
15278/@docdir@/p
15279/@infodir@/p
15280/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015281/@mandir@/p'
15282case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283*datarootdir*) ac_datarootdir_seen=yes;;
15284*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15286$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289 ac_datarootdir_hack='
15290 s&@datadir@&$datadir&g
15291 s&@docdir@&$docdir&g
15292 s&@infodir@&$infodir&g
15293 s&@localedir@&$localedir&g
15294 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296esac
15297_ACEOF
15298
15299# Neutralize VPATH when `$srcdir' = `.'.
15300# Shell code in configure.ac might set extrasub.
15301# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15303ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015304$extrasub
15305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015307:t
15308/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015309s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015311s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312s&@srcdir@&$ac_srcdir&;t t
15313s&@abs_srcdir@&$ac_abs_srcdir&;t t
15314s&@top_srcdir@&$ac_top_srcdir&;t t
15315s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15316s&@builddir@&$ac_builddir&;t t
15317s&@abs_builddir@&$ac_abs_builddir&;t t
15318s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15319s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015320s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015322"
Victor Stinnere0be4232011-10-25 13:06:09 +020015323eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15324 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015327 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15328 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15329 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015331which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015332$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015333which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015334
Victor Stinnere0be4232011-10-25 13:06:09 +020015335 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015337 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15338 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015340 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341 ;;
15342 :H)
15343 #
15344 # CONFIG_HEADER
15345 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 {
15348 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015349 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15350 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015351 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015352 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15354$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015357 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015358 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 fi
15360 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015362 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015363 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367
15368 esac
15369
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015370
15371 case $ac_file$ac_mode in
15372 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15373
15374 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375done # for ac_tag
15376
Guido van Rossum627b2d71993-12-24 10:39:16 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015379_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015380ac_clean_files=$ac_clean_files_save
15381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015383 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
15386# configure is writing to config.log, and then calls config.status.
15387# config.status does its own redirection, appending to config.log.
15388# Unfortunately, on DOS this fails, as config.log is still kept open
15389# by configure, so config.status won't be able to write to it; its
15390# output is simply discarded. So we exec the FD to /dev/null,
15391# effectively closing config.log, so it can be properly (re)opened and
15392# appended to by config.status. When coming back to configure, we
15393# need to make the FD available again.
15394if test "$no_create" != yes; then
15395 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015396 ac_config_status_args=
15397 test "$silent" = yes &&
15398 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015400 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 exec 5>>config.log
15402 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15403 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015404 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015405fi
15406if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15408$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015409fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015410
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015411
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015412echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015413if test ! -f Modules/Setup
15414then
15415 cp $srcdir/Modules/Setup.dist Modules/Setup
15416fi
15417
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015418echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015419if test ! -f Modules/Setup.local
15420then
15421 echo "# Edit this file for local setup changes" >Modules/Setup.local
15422fi
15423
15424echo "creating Makefile"
15425$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15426 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015427 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015428mv config.c Modules