blob: 7c83bb4a962380c9be229283744e19e78295e533 [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 :
Matthias Klose96350132012-03-15 20:42:23 +010010857
10858if test "${enable_ipv6+set}" = set; then
10859 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
10860else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010861 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010010862fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010865/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010866
10867#include <sys/types.h>
10868#include <netdb.h>
10869#include <string.h>
10870#include <sys/socket.h>
10871#include <netinet/in.h>
10872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010873int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010874{
10875 int passive, gaierr, inet4 = 0, inet6 = 0;
10876 struct addrinfo hints, *ai, *aitop;
10877 char straddr[INET6_ADDRSTRLEN], strport[16];
10878
10879 for (passive = 0; passive <= 1; passive++) {
10880 memset(&hints, 0, sizeof(hints));
10881 hints.ai_family = AF_UNSPEC;
10882 hints.ai_flags = passive ? AI_PASSIVE : 0;
10883 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010884 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010885 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10886 (void)gai_strerror(gaierr);
10887 goto bad;
10888 }
10889 for (ai = aitop; ai; ai = ai->ai_next) {
10890 if (ai->ai_addr == NULL ||
10891 ai->ai_addrlen == 0 ||
10892 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10893 straddr, sizeof(straddr), strport, sizeof(strport),
10894 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10895 goto bad;
10896 }
10897 switch (ai->ai_family) {
10898 case AF_INET:
10899 if (strcmp(strport, "54321") != 0) {
10900 goto bad;
10901 }
10902 if (passive) {
10903 if (strcmp(straddr, "0.0.0.0") != 0) {
10904 goto bad;
10905 }
10906 } else {
10907 if (strcmp(straddr, "127.0.0.1") != 0) {
10908 goto bad;
10909 }
10910 }
10911 inet4++;
10912 break;
10913 case AF_INET6:
10914 if (strcmp(strport, "54321") != 0) {
10915 goto bad;
10916 }
10917 if (passive) {
10918 if (strcmp(straddr, "::") != 0) {
10919 goto bad;
10920 }
10921 } else {
10922 if (strcmp(straddr, "::1") != 0) {
10923 goto bad;
10924 }
10925 }
10926 inet6++;
10927 break;
10928 case AF_UNSPEC:
10929 goto bad;
10930 break;
10931 default:
10932 /* another family support? */
10933 break;
10934 }
10935 }
10936 }
10937
10938 if (!(inet4 == 0 || inet4 == 2))
10939 goto bad;
10940 if (!(inet6 == 0 || inet6 == 2))
10941 goto bad;
10942
10943 if (aitop)
10944 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010945 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946
10947 bad:
10948 if (aitop)
10949 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010950 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951}
10952
Martin v. Löwis11437992002-04-12 09:54:03 +000010953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010954if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010955 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010963fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010964
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10968$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10969
Mark Dickinson2df5d282009-12-31 21:22:50 +000010970if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010971then
10972 if test $ipv6 = yes
10973 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010974 echo 'Fatal: You must get working getaddrinfo() function.'
10975 echo ' or you can specify "--disable-ipv6"'.
10976 exit 1
10977 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010978else
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010981
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010982fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010983
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010984for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010985do :
10986 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020010987if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010989#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010990_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010991
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010992fi
10993done
10994
Michael W. Hudson54241132001-12-07 15:38:26 +000010995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10998$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010999if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011001else
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004#include <sys/types.h>
11005#include <sys/time.h>
11006#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
Martin v. Löwis11437992002-04-12 09:54:03 +000011008int
11009main ()
11010{
11011if ((struct tm *) 0)
11012return 0;
11013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11025$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011026if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011027
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029
11030fi
11031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11033$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036else
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011039#include <sys/types.h>
11040#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042int
11043main ()
11044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045struct tm tm;
11046 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053 ac_cv_struct_tm=time.h
11054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11060$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011061if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064
11065fi
11066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067ac_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 +000011068#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
Matthias Kloseb9621712010-04-24 17:59:49 +000011070"
Victor Stinnere0be4232011-10-25 13:06:09 +020011071if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
11073cat >>confdefs.h <<_ACEOF
11074#define HAVE_STRUCT_TM_TM_ZONE 1
11075_ACEOF
11076
11077
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011078fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083
11084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11086"
Victor Stinnere0be4232011-10-25 13:06:09 +020011087if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089else
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091fi
11092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011094#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095_ACEOF
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11098$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101else
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011104#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105#if !HAVE_DECL_TZNAME
11106extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Martin v. Löwis11437992002-04-12 09:54:03 +000011109int
11110main ()
11111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011117if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011118 ac_cv_var_tzname=yes
11119else
Matthias Kloseb9621712010-04-24 17:59:49 +000011120 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011122rm -f core conftest.err conftest.$ac_objext \
11123 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11126$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011127 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131 fi
11132fi
11133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134ac_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 +020011135if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
11137cat >>confdefs.h <<_ACEOF
11138#define HAVE_STRUCT_STAT_ST_RDEV 1
11139_ACEOF
11140
11141
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011142fi
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144ac_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 +020011145if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011146
Martin v. Löwis11437992002-04-12 09:54:03 +000011147cat >>confdefs.h <<_ACEOF
11148#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11149_ACEOF
11150
11151
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011152fi
11153
Matthias Kloseb9621712010-04-24 17:59:49 +000011154ac_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 +020011155if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011156
11157cat >>confdefs.h <<_ACEOF
11158#define HAVE_STRUCT_STAT_ST_FLAGS 1
11159_ACEOF
11160
11161
11162fi
11163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164ac_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 +020011165if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011166
11167cat >>confdefs.h <<_ACEOF
11168#define HAVE_STRUCT_STAT_ST_GEN 1
11169_ACEOF
11170
11171
11172fi
11173
Matthias Kloseb9621712010-04-24 17:59:49 +000011174ac_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 +020011175if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011176
11177cat >>confdefs.h <<_ACEOF
11178#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11179_ACEOF
11180
11181
11182fi
11183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184ac_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 +020011185if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187cat >>confdefs.h <<_ACEOF
11188#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11189_ACEOF
11190
11191
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011193
11194else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011196 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11198 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011199esac
11200
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011201fi
11202
Michael W. Hudson54241132001-12-07 15:38:26 +000011203
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11206$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011207if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011209else
Matthias Kloseb159a552010-04-25 21:00:44 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011213#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223 ac_cv_header_time_altzone=yes
11224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229fi
11230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11232$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236
11237fi
11238
Guido van Rossumda88dad1995-01-26 00:46:29 +000011239was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11241$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011244
11245#include <sys/types.h>
11246#include <sys/select.h>
11247#include <sys/time.h>
11248
Martin v. Löwis11437992002-04-12 09:54:03 +000011249int
11250main ()
11251{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252;
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ;
11254 return 0;
11255}
11256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011258
11259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011261
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011262 was_it_defined=yes
11263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11267$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11270$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011271if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011273else
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011276#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011280struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011286 ac_cv_struct_addrinfo=yes
11287else
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11291fi
11292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11294$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011295if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011298
11299fi
11300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11302$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011303if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011308
11309# include <sys/types.h>
11310# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011311int
11312main ()
11313{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011314struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011320 ac_cv_struct_sockaddr_storage=yes
11321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11325fi
11326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11328$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011329if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011332
11333fi
11334
Guido van Rossum627b2d71993-12-24 10:39:16 +000011335# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011336
Matthias Kloseb9621712010-04-24 17:59:49 +000011337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11338$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011339if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011341else
Matthias Kloseb9621712010-04-24 17:59:49 +000011342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011344$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011345int
11346main ()
11347{
11348static int test_array [1 - 2 * !(((char) -1) < 0)];
11349test_array [0] = 0
11350
11351 ;
11352 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011353}
Martin v. Löwis11437992002-04-12 09:54:03 +000011354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011356 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011357else
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11363$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011364if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366
11367fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11370$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011371if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376
Martin v. Löwis11437992002-04-12 09:54:03 +000011377int
11378main ()
11379{
11380/* FIXME: Include the comments suggested by Paul. */
11381#ifndef __cplusplus
11382 /* Ultrix mips cc rejects this. */
11383 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 char const *const *pcpcc;
11387 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 /* NEC SVR4.0.2 mips cc rejects this. */
11389 struct point {int x, y;};
11390 static struct point const zero = {0,0};
11391 /* AIX XL C 1.02.0.0 rejects this.
11392 It does not let you subtract one const X* pointer from another in
11393 an arm of an if-expression whose if-part is not a constant
11394 expression */
11395 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398 ++pcpcc;
11399 ppc = (char**) pcpcc;
11400 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 { /* SCO 3.2v4 cc rejects this. */
11402 char *t;
11403 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011407 }
11408 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11409 int x[] = {25, 17};
11410 const int *foo = &x[0];
11411 ++foo;
11412 }
11413 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11414 typedef const int *iptr;
11415 iptr p = 0;
11416 ++p;
11417 }
11418 { /* AIX XL C 1.02.0.0 rejects this saying
11419 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11420 struct s { int j; const int *ap[3]; };
11421 struct s *b; b->j = 5;
11422 }
11423 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11424 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ;
11431 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011432}
Martin v. Löwis11437992002-04-12 09:54:03 +000011433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435 ac_cv_c_const=yes
11436else
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11442$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446
11447fi
11448
Michael W. Hudson54241132001-12-07 15:38:26 +000011449
Guido van Rossumda88dad1995-01-26 00:46:29 +000011450works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11452$as_echo_n "checking for working volatile... " >&6; }
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011454/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011455
Martin v. Löwis11437992002-04-12 09:54:03 +000011456int
11457main ()
11458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011459volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011465 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466else
Skip Montanaro6dead952003-09-25 14:50:04 +000011467
Matthias Kloseb9621712010-04-24 17:59:49 +000011468$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011470
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11474$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011475
Guido van Rossumda88dad1995-01-26 00:46:29 +000011476works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11478$as_echo_n "checking for working signed char... " >&6; }
11479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011481
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
11484{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011485signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011491 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011492else
Skip Montanaro6dead952003-09-25 14:50:04 +000011493
Matthias Kloseb9621712010-04-24 17:59:49 +000011494$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011495
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011496
Guido van Rossum7f43da71994-08-01 12:15:30 +000011497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11500$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011501
Guido van Rossumda88dad1995-01-26 00:46:29 +000011502have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11504$as_echo_n "checking for prototypes... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011507int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
Matthias Kloseb159a552010-04-25 21:00:44 +000011520 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11524$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011525
Guido van Rossumda88dad1995-01-26 00:46:29 +000011526works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11528$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011531
11532#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011533int foo(int x, ...) {
11534 va_list va;
11535 va_start(va, x);
11536 va_arg(va, int);
11537 va_arg(va, char *);
11538 va_arg(va, double);
11539 return 0;
11540}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542int
11543main ()
11544{
Guido van Rossum90eea071996-08-30 20:58:57 +000011545return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ;
11547 return 0;
11548}
11549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
11552
Matthias Kloseb9621712010-04-24 17:59:49 +000011553$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011555 works=yes
11556
Guido van Rossum627b2d71993-12-24 10:39:16 +000011557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11560$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011561
Martin v. Löwisd6320502004-08-12 13:45:08 +000011562# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11564$as_echo_n "checking for socketpair... " >&6; }
11565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011566/* end confdefs.h. */
11567
11568#include <sys/types.h>
11569#include <sys/socket.h>
11570
11571int
11572main ()
11573{
11574void *x=socketpair
11575 ;
11576 return 0;
11577}
11578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011582
Matthias Kloseb159a552010-04-25 21:00:44 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011588
11589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011591
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011592# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11594$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597#include <sys/types.h>
11598#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011599int
11600main ()
11601{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011602struct sockaddr x;
11603x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if ac_fn_c_try_compile "$LINENO"; then :
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11610$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011613
11614else
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11616$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011617
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011620
Guido van Rossumda88dad1995-01-26 00:46:29 +000011621va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11623$as_echo_n "checking whether va_list is an array... " >&6; }
11624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011625/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
11627#ifdef HAVE_STDARG_PROTOTYPES
11628#include <stdarg.h>
11629#else
11630#include <varargs.h>
11631#endif
11632
Martin v. Löwis11437992002-04-12 09:54:03 +000011633int
11634main ()
11635{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011636va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_compile "$LINENO"; then :
11642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643else
Skip Montanaro6dead952003-09-25 14:50:04 +000011644
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011647
Guido van Rossumda88dad1995-01-26 00:46:29 +000011648 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11653$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011655# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011656
11657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011659if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11664$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011665 OLD_CFLAGS=$CFLAGS
11666 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011669
11670# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672int
11673main ()
11674{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011675
11676 char *name;
11677 struct hostent *he, *res;
11678 char buffer[2048];
11679 int buflen = 2048;
11680 int h_errnop;
11681
11682 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
11684 ;
11685 return 0;
11686}
11687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011691
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11696$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011697
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011698else
Skip Montanaro6dead952003-09-25 14:50:04 +000011699
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11703$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011705/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011707# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Martin v. Löwis11437992002-04-12 09:54:03 +000011709int
11710main ()
11711{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011712
11713 char *name;
11714 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011715 char buffer[2048];
11716 int buflen = 2048;
11717 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011718
Matthias Kloseb159a552010-04-25 21:00:44 +000011719 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011720
11721 ;
11722 return 0;
11723}
11724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729
Matthias Kloseb159a552010-04-25 21:00:44 +000011730$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011731
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11733$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011735else
Skip Montanaro6dead952003-09-25 14:50:04 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11740$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11742/* end confdefs.h. */
11743
11744# include <netdb.h>
11745
11746int
11747main ()
11748{
11749
11750 char *name;
11751 struct hostent *he;
11752 struct hostent_data data;
11753
11754 (void) gethostbyname_r(name, he, &data);
11755
11756 ;
11757 return 0;
11758}
11759_ACEOF
11760if ac_fn_c_try_compile "$LINENO"; then :
11761
11762 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11763
11764
11765$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11766
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11768$as_echo "yes" >&6; }
11769
11770else
11771
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011780
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011783 CFLAGS=$OLD_CFLAGS
11784
11785else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011786
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 for ac_func in gethostbyname
11788do :
11789 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020011790if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011793_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011795fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011796done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011797
Michael W. Hudson54241132001-12-07 15:38:26 +000011798
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011799fi
11800
Michael W. Hudson54241132001-12-07 15:38:26 +000011801
11802
11803
11804
11805
11806
Guido van Rossum627b2d71993-12-24 10:39:16 +000011807# checks for system services
11808# (none yet)
11809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011811ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11816$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819else
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011821LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825/* Override any GCC internal prototype to avoid an error.
11826 Use char because int might match the return type of a GCC
11827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011831char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011847LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11850$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 cat >>confdefs.h <<_ACEOF
11853#define HAVE_LIBIEEE 1
11854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011856 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857
Guido van Rossum627b2d71993-12-24 10:39:16 +000011858fi
11859
Michael W. Hudson54241132001-12-07 15:38:26 +000011860
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011861fi
11862
Michael W. Hudson54241132001-12-07 15:38:26 +000011863
Guido van Rossum7f253911997-05-09 02:42:48 +000011864# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11866$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011869if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011870 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011871if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011872then
11873
Matthias Kloseb9621712010-04-24 17:59:49 +000011874$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11877$as_echo "yes" >&6; }
11878else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11879$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011880fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11883$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884fi
11885
Guido van Rossum7f253911997-05-09 02:42:48 +000011886
Guido van Rossum7f43da71994-08-01 12:15:30 +000011887# check for --with-libm=...
11888
Guido van Rossum563e7081996-09-10 18:20:48 +000011889case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011890Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011891*) LIBM=-lm
11892esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11894$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011898 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011899if test "$withval" = no
11900then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11902$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011903elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011904then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11906$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011907else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011908fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11911$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011912fi
11913
Guido van Rossum7f43da71994-08-01 12:15:30 +000011914
11915# check for --with-libc=...
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11918$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011921if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011923if test "$withval" = no
11924then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11926$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011927elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011928then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11930$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011931else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011932fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11935$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011936fi
11937
Guido van Rossum7f43da71994-08-01 12:15:30 +000011938
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011939# **************************************************
11940# * Check for various properties of floating point *
11941# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11944$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011945if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011947else
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011950 ac_cv_little_endian_double=no
11951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011953/* end confdefs.h. */
11954
11955#include <string.h>
11956int main() {
11957 double x = 9006104071832581.0;
11958 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11959 return 0;
11960 else
11961 return 1;
11962}
11963
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011966 ac_cv_little_endian_double=yes
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011972fi
11973
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011974fi
11975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11977$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011978if test "$ac_cv_little_endian_double" = yes
11979then
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011982
11983fi
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11986$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011987if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011989else
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011992 ac_cv_big_endian_double=no
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011995/* end confdefs.h. */
11996
11997#include <string.h>
11998int main() {
11999 double x = 9006104071832581.0;
12000 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12001 return 0;
12002 else
12003 return 1;
12004}
12005
12006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012008 ac_cv_big_endian_double=yes
12009else
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12013 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012014fi
12015
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012016fi
12017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12019$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012020if test "$ac_cv_big_endian_double" = yes
12021then
12022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012024
12025fi
12026
12027# Some ARM platforms use a mixed-endian representation for doubles.
12028# While Python doesn't currently have full support for these platforms
12029# (see e.g., issue 1762561), we can at least make sure that float <-> string
12030# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12032$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012033if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012035else
12036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012038 ac_cv_mixed_endian_double=no
12039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012041/* end confdefs.h. */
12042
12043#include <string.h>
12044int main() {
12045 double x = 9006104071832581.0;
12046 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12047 return 0;
12048 else
12049 return 1;
12050}
12051
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012054 ac_cv_mixed_endian_double=yes
12055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012060fi
12061
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012062fi
12063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12065$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012066if test "$ac_cv_mixed_endian_double" = yes
12067then
12068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012070
12071fi
12072
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012073# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012074# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012075# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012076# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012077# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012078# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012079
12080# This inline assembler syntax may also work for suncc and icc,
12081# so we try it on all platforms.
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12084$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012086/* end confdefs.h. */
12087
12088int
12089main ()
12090{
12091
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012092 unsigned short cw;
12093 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12094 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012095
12096 ;
12097 return 0;
12098}
12099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012101 have_gcc_asm_for_x87=yes
12102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012104fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12107$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012108if test "$have_gcc_asm_for_x87" = yes
12109then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012112
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012115# Detect whether system arithmetic is subject to x87-style double
12116# rounding issues. The result of this test has little meaning on non
12117# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12118# mode is round-to-nearest and double rounding issues are present, and
12119# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12121$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012122# $BASECFLAGS may affect the result
12123ac_save_cc="$CC"
12124CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012126 ac_cv_x87_double_rounding=no
12127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012129/* end confdefs.h. */
12130
12131#include <stdlib.h>
12132#include <math.h>
12133int main() {
12134 volatile double x, y, z;
12135 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12136 x = 0.99999999999999989; /* 1-2**-53 */
12137 y = 1./x;
12138 if (y != 1.)
12139 exit(0);
12140 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12141 x = 1e16;
12142 y = 2.99999;
12143 z = x + y;
12144 if (z != 1e16+4.)
12145 exit(0);
12146 /* both tests show evidence of double rounding */
12147 exit(1);
12148}
12149
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012152 ac_cv_x87_double_rounding=no
12153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012158fi
12159
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012160CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12162$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012163if test "$ac_cv_x87_double_rounding" = yes
12164then
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012167
12168fi
12169
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012170# ************************************
12171# * Check for mathematical functions *
12172# ************************************
12173
12174LIBS_SAVE=$LIBS
12175LIBS="$LIBS $LIBM"
12176
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012177for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12178do :
12179 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12180ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012181if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012182 cat >>confdefs.h <<_ACEOF
12183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12184_ACEOF
12185
12186fi
12187done
12188
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012189for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012190do :
12191 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12192ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012193if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012194 cat >>confdefs.h <<_ACEOF
12195#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12196_ACEOF
12197
12198fi
12199done
12200
12201ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12202"
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012204 ac_have_decl=1
12205else
12206 ac_have_decl=0
12207fi
12208
12209cat >>confdefs.h <<_ACEOF
12210#define HAVE_DECL_ISINF $ac_have_decl
12211_ACEOF
12212ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12213"
Victor Stinnere0be4232011-10-25 13:06:09 +020012214if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012215 ac_have_decl=1
12216else
12217 ac_have_decl=0
12218fi
12219
12220cat >>confdefs.h <<_ACEOF
12221#define HAVE_DECL_ISNAN $ac_have_decl
12222_ACEOF
12223ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12224"
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012226 ac_have_decl=1
12227else
12228 ac_have_decl=0
12229fi
12230
12231cat >>confdefs.h <<_ACEOF
12232#define HAVE_DECL_ISFINITE $ac_have_decl
12233_ACEOF
12234
12235
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012236# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12237# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12239$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012242else
12243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012245 ac_cv_tanh_preserves_zero_sign=no
12246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012248/* end confdefs.h. */
12249
12250#include <math.h>
12251#include <stdlib.h>
12252int main() {
12253 /* return 0 if either negative zeros don't exist
12254 on this platform or if negative zeros exist
12255 and tanh(-0.) == -0. */
12256 if (atan2(0., -1.) == atan2(-0., -1.) ||
12257 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12258 else exit(1);
12259}
12260
12261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012263 ac_cv_tanh_preserves_zero_sign=yes
12264else
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012269fi
12270
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012271fi
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12274$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012275if test "$ac_cv_tanh_preserves_zero_sign" = yes
12276then
12277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012279
12280fi
12281
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012282if test "$ac_cv_func_log1p" = yes
12283then
12284 # On some versions of AIX, log1p(-0.) returns 0. instead of
12285 # -0. See issue #9920.
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12287$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012288 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012289 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012290else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012291
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012292 if test "$cross_compiling" = yes; then :
12293 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012294else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12296/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012297
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012298 #include <math.h>
12299 #include <stdlib.h>
12300 int main() {
12301 /* Fail if the signs of log1p(-0.) and -0. can be
12302 distinguished. */
12303 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12304 return 0;
12305 else
12306 return 1;
12307 }
12308
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012309_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012310if ac_fn_c_try_run "$LINENO"; then :
12311 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012312else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012313 ac_cv_log1p_drops_zero_sign=yes
12314fi
12315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012317fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012318
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012319fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012320
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12322$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12323fi
12324if test "$ac_cv_log1p_drops_zero_sign" = yes
12325then
12326
12327$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12328
12329fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012330
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012331LIBS=$LIBS_SAVE
12332
Mark Dickinsona614f042009-11-28 12:48:43 +000012333# For multiprocessing module, check that sem_open
12334# actually works. For FreeBSD versions <= 7.2,
12335# the kernel module that provides POSIX semaphores
12336# isn't loaded by default, so an attempt to call
12337# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12339$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012342else
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012344 ac_cv_posix_semaphores_enabled=yes
12345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012347/* end confdefs.h. */
12348
12349#include <unistd.h>
12350#include <fcntl.h>
12351#include <stdio.h>
12352#include <semaphore.h>
12353#include <sys/stat.h>
12354
12355int main(void) {
12356 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12357 if (a == SEM_FAILED) {
12358 perror("sem_open");
12359 return 1;
12360 }
12361 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012362 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012363 return 0;
12364}
12365
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012368 ac_cv_posix_semaphores_enabled=yes
12369else
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12373 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012374fi
12375
12376
Mark Dickinsona614f042009-11-28 12:48:43 +000012377fi
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12380$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012381if test $ac_cv_posix_semaphores_enabled = no
12382then
12383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012385
12386fi
12387
Mark Dickinson10683072009-04-18 21:18:19 +000012388# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12390$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012395 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012398/* end confdefs.h. */
12399
12400#include <unistd.h>
12401#include <fcntl.h>
12402#include <stdio.h>
12403#include <semaphore.h>
12404#include <sys/stat.h>
12405
12406int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012407 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012408 int count;
12409 int res;
12410 if(a==SEM_FAILED){
12411 perror("sem_open");
12412 return 1;
12413
12414 }
12415 res = sem_getvalue(a, &count);
12416 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012417 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012418 return res==-1 ? 1 : 0;
12419}
12420
Mark Dickinson10683072009-04-18 21:18:19 +000012421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012423 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012424else
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12428 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012429fi
12430
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012431
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012432fi
12433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12435$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012436if test $ac_cv_broken_sem_getvalue = yes
12437then
12438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012440
12441fi
12442
Mark Dickinsonbd792642009-03-18 20:06:12 +000012443# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12445$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012446# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012448 enableval=$enable_big_digits; case $enable_big_digits in
12449yes)
12450 enable_big_digits=30 ;;
12451no)
12452 enable_big_digits=15 ;;
1245315|30)
12454 ;;
12455*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012456 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 +000012457esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12459$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012460
12461cat >>confdefs.h <<_ACEOF
12462#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12463_ACEOF
12464
12465
12466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12468$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012469fi
12470
12471
Guido van Rossumef2255b2000-03-10 22:30:29 +000012472# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012473ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012474if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
12476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012479 wchar_h="yes"
12480
Guido van Rossumef2255b2000-03-10 22:30:29 +000012481else
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012483
12484fi
12485
Michael W. Hudson54241132001-12-07 15:38:26 +000012486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012488# determine wchar_t size
12489if test "$wchar_h" = yes
12490then
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12493# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12494# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12496$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012497if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12501"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503else
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 if test "$ac_cv_type_wchar_t" = yes; then
12505 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012507as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012508See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509 else
12510 ac_cv_sizeof_wchar_t=0
12511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012513
Martin v. Löwis11437992002-04-12 09:54:03 +000012514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12516$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517
12518
12519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012521#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012522_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523
Michael W. Hudson54241132001-12-07 15:38:26 +000012524
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012525fi
12526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12528$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012529have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012531/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012532
12533#include <tcl.h>
12534#if TCL_UTF_MAX != 6
12535# error "NOT UCS4_TCL"
12536#endif
12537int
12538main ()
12539{
12540
12541 ;
12542 return 0;
12543}
12544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012546
12547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012549
12550 have_ucs4_tcl=yes
12551
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12555$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012556
Skip Montanaro6dead952003-09-25 14:50:04 +000012557# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012558if test "$wchar_h" = yes
12559then
12560 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12562$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012563 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012565else
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012568 ac_cv_wchar_t_signed=yes
12569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012572
12573 #include <wchar.h>
12574 int main()
12575 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012576 /* Success: exit code 0 */
12577 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012578 }
12579
12580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012582 ac_cv_wchar_t_signed=yes
12583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012588fi
12589
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012590fi
12591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12593$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594fi
12595
Georg Brandl52d168a2008-01-07 18:10:24 +000012596# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012597if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012598 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012599then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012600 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012603
Georg Brandl52d168a2008-01-07 18:10:24 +000012604else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012605 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012606fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12608$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012609
12610# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12612$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 ac_cv_c_bigendian=unknown
12617 # See if we're dealing with a universal compiler.
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619/* end confdefs.h. */
12620#ifndef __APPLE_CC__
12621 not a universal capable compiler
12622 #endif
12623 typedef int dummy;
12624
Skip Montanaro6dead952003-09-25 14:50:04 +000012625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626if ac_fn_c_try_compile "$LINENO"; then :
12627
12628 # Check for potential -arch flags. It is not universal unless
12629 # there are at least two -arch flags with different values.
12630 ac_arch=
12631 ac_prev=
12632 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12633 if test -n "$ac_prev"; then
12634 case $ac_word in
12635 i?86 | x86_64 | ppc | ppc64)
12636 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12637 ac_arch=$ac_word
12638 else
12639 ac_cv_c_bigendian=universal
12640 break
12641 fi
12642 ;;
12643 esac
12644 ac_prev=
12645 elif test "x$ac_word" = "x-arch"; then
12646 ac_prev=arch
12647 fi
12648 done
12649fi
12650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12651 if test $ac_cv_c_bigendian = unknown; then
12652 # See if sys/param.h defines the BYTE_ORDER macro.
12653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012655#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012657
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Matthias Kloseb9621712010-04-24 17:59:49 +000012661#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12662 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12663 && LITTLE_ENDIAN)
12664 bogus endian macros
12665 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
12667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012672 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012681#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 not big endian
12683 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
12685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012690 ac_cv_c_bigendian=yes
12691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012695fi
12696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12697 fi
12698 if test $ac_cv_c_bigendian = unknown; then
12699 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012702#include <limits.h>
12703
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Matthias Kloseb9621712010-04-24 17:59:49 +000012707#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12708 bogus endian macros
12709 #endif
12710
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
12716 # It does; now see whether it defined to _BIG_ENDIAN or not.
12717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12718/* end confdefs.h. */
12719#include <limits.h>
12720
12721int
12722main ()
12723{
12724#ifndef _BIG_ENDIAN
12725 not big endian
12726 #endif
12727
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12738fi
12739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12740 fi
12741 if test $ac_cv_c_bigendian = unknown; then
12742 # Compile a test program.
12743 if test "$cross_compiling" = yes; then :
12744 # Try to guess by grepping values from an object file.
12745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746/* end confdefs.h. */
12747short int ascii_mm[] =
12748 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12749 short int ascii_ii[] =
12750 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12751 int use_ascii (int i) {
12752 return ascii_mm[i] + ascii_ii[i];
12753 }
12754 short int ebcdic_ii[] =
12755 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12756 short int ebcdic_mm[] =
12757 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12758 int use_ebcdic (int i) {
12759 return ebcdic_mm[i] + ebcdic_ii[i];
12760 }
12761 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763int
12764main ()
12765{
12766return use_ascii (foo) == use_ebcdic (foo);
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771if ac_fn_c_try_compile "$LINENO"; then :
12772 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12773 ac_cv_c_bigendian=yes
12774 fi
12775 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12776 if test "$ac_cv_c_bigendian" = unknown; then
12777 ac_cv_c_bigendian=no
12778 else
12779 # finding both strings is unlikely to happen, but who knows?
12780 ac_cv_c_bigendian=unknown
12781 fi
12782 fi
12783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 /* Are we little or big endian? From Harbison&Steele. */
12794 union
12795 {
12796 long int l;
12797 char c[sizeof (long int)];
12798 } u;
12799 u.l = 1;
12800 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801
12802 ;
12803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012804}
Martin v. Löwis11437992002-04-12 09:54:03 +000012805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012807 ac_cv_c_bigendian=no
12808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12818$as_echo "$ac_cv_c_bigendian" >&6; }
12819 case $ac_cv_c_bigendian in #(
12820 yes)
12821 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12822;; #(
12823 no)
12824 ;; #(
12825 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 ;; #(
12830 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012831 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020012832 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012834
Michael W. Hudson54241132001-12-07 15:38:26 +000012835
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012836# ABI version string for Python extension modules. This appears between the
12837# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12838# from the following attributes which affect the ABI of this Python build (in
12839# this order):
12840#
12841# * The Python implementation (always 'cpython-' for us)
12842# * The major and minor version numbers
12843# * --with-pydebug (adds a 'd')
12844# * --with-pymalloc (adds a 'm')
12845# * --with-wide-unicode (adds a 'u')
12846#
12847# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012848# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12849# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012850
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12852$as_echo_n "checking ABIFLAGS... " >&6; }
12853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12854$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12856$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012857SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12859$as_echo "$SOABI" >&6; }
12860
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12862$as_echo_n "checking LDVERSION... " >&6; }
12863LDVERSION='$(VERSION)$(ABIFLAGS)'
12864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12865$as_echo "$LDVERSION" >&6; }
12866
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012867# SO is the extension of shared libraries `(including the dot!)
12868# -- usually .so, .sl on HP-UX, .dll on Cygwin
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12870$as_echo_n "checking SO... " >&6; }
12871if test -z "$SO"
12872then
12873 case $ac_sys_system in
12874 hp*|HP*)
12875 case `uname -m` in
12876 ia64) SO=.so;;
12877 *) SO=.sl;;
12878 esac
12879 ;;
12880 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012881 Linux*|GNU*)
12882 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012883 *) SO=.so;;
12884 esac
12885else
12886 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012887 echo
12888 echo '====================================================================='
12889 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012890 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012891 echo '+ Do you really mean to change the extension for shared libraries? +'
12892 echo '+ Continuing in 10 seconds to let you to ponder. +'
12893 echo '+ +'
12894 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012895 sleep 10
12896fi
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12898$as_echo "$SO" >&6; }
12899
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012900# Check whether right shifting a negative integer extends the sign bit
12901# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12903$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012906else
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012909 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012910else
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012912/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012913
12914int main()
12915{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012916 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012917}
12918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012920if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012921 ac_cv_rshift_extends_sign=yes
12922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012927fi
12928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929fi
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12932$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012933if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012934then
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012937
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012938fi
12939
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012940# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12942$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012943if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012945else
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012949#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012953
12954 FILE *f = fopen("/dev/null", "r");
12955 flockfile(f);
12956 getc_unlocked(f);
12957 funlockfile(f);
12958
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 ;
12960 return 0;
12961}
12962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012964 ac_cv_have_getc_unlocked=yes
12965else
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 ac_cv_have_getc_unlocked=no
12967fi
12968rm -f core conftest.err conftest.$ac_objext \
12969 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12973$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012974if test "$ac_cv_have_getc_unlocked" = yes
12975then
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012978
12979fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012980
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012981# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012982# save the value of LIBS so we don't actually link Python with readline
12983LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012984
Gregory P. Smith18820942008-09-07 06:24:49 +000012985# On some systems we need to link readline to a termcap compatible
12986# library. NOTE: Keep the precedence of listed libraries synchronised
12987# with setup.py.
12988py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12990$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012991for py_libtermcap in "" ncursesw ncurses curses termcap; do
12992 if test -z "$py_libtermcap"; then
12993 READLINE_LIBS="-lreadline"
12994 else
12995 READLINE_LIBS="-lreadline -l$py_libtermcap"
12996 fi
12997 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012999/* end confdefs.h. */
13000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001/* Override any GCC internal prototype to avoid an error.
13002 Use char because int might match the return type of a GCC
13003 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013004#ifdef __cplusplus
13005extern "C"
13006#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013007char readline ();
13008int
13009main ()
13010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013012 ;
13013 return 0;
13014}
13015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013017 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019rm -f core conftest.err conftest.$ac_objext \
13020 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013021 if test $py_cv_lib_readline = yes; then
13022 break
13023 fi
13024done
13025# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13026#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013027if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13029$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013030else
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13032$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013035
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013036fi
13037
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013038# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13040$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013041if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013043else
13044 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013045LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013047/* end confdefs.h. */
13048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049/* Override any GCC internal prototype to avoid an error.
13050 Use char because int might match the return type of a GCC
13051 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052#ifdef __cplusplus
13053extern "C"
13054#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013055char rl_callback_handler_install ();
13056int
13057main ()
13058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060 ;
13061 return 0;
13062}
13063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065 ac_cv_lib_readline_rl_callback_handler_install=yes
13066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013069rm -f core conftest.err conftest.$ac_objext \
13070 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071LIBS=$ac_check_lib_save_LIBS
13072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13074$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013075if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013078
13079fi
13080
13081
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013082# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013085#include <readline/readline.h>
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013088 have_readline=yes
13089else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013090 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013091
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013092fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013093rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013094if test $have_readline = yes
13095then
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013098#include <readline/readline.h>
13099
13100_ACEOF
13101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013105
13106fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013107rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013110/* end confdefs.h. */
13111#include <readline/readline.h>
13112
13113_ACEOF
13114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013118
13119fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013120rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013121
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013122fi
13123
Martin v. Löwis0daad592001-09-30 21:09:59 +000013124# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13126$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013127if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013129else
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013131LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135/* Override any GCC internal prototype to avoid an error.
13136 Use char because int might match the return type of a GCC
13137 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013138#ifdef __cplusplus
13139extern "C"
13140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013141char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013142int
13143main ()
13144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ;
13147 return 0;
13148}
13149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013155rm -f core conftest.err conftest.$ac_objext \
13156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013157LIBS=$ac_check_lib_save_LIBS
13158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13160$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013161if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013164
Martin v. Löwis0daad592001-09-30 21:09:59 +000013165fi
13166
Michael W. Hudson54241132001-12-07 15:38:26 +000013167
Thomas Wouters89d996e2007-09-08 17:39:28 +000013168# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13170$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013171if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013173else
13174 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013175LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013177/* end confdefs.h. */
13178
13179/* Override any GCC internal prototype to avoid an error.
13180 Use char because int might match the return type of a GCC
13181 builtin and then its argument prototype would still apply. */
13182#ifdef __cplusplus
13183extern "C"
13184#endif
13185char rl_completion_display_matches_hook ();
13186int
13187main ()
13188{
13189return rl_completion_display_matches_hook ();
13190 ;
13191 return 0;
13192}
13193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013194if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013195 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013199rm -f core conftest.err conftest.$ac_objext \
13200 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013201LIBS=$ac_check_lib_save_LIBS
13202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13204$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013205if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013208
13209fi
13210
13211
Martin v. Löwis0daad592001-09-30 21:09:59 +000013212# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13214$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013215if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013217else
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013219LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223/* Override any GCC internal prototype to avoid an error.
13224 Use char because int might match the return type of a GCC
13225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013226#ifdef __cplusplus
13227extern "C"
13228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013229char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013230int
13231main ()
13232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 ;
13235 return 0;
13236}
13237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013243rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013245LIBS=$ac_check_lib_save_LIBS
13246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13248$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013252
Guido van Rossum353ae582001-07-10 16:45:32 +000013253fi
13254
Jack Jansendd19cf82001-12-06 22:36:17 +000013255
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013256# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013258/* end confdefs.h. */
13259#include <readline/readline.h>
13260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013261if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013262 have_readline=yes
13263else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013264 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013265
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013266fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013267rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013268if test $have_readline = yes
13269then
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013271/* end confdefs.h. */
13272#include <readline/readline.h>
13273
13274_ACEOF
13275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013279
13280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013281rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013282
13283fi
13284
Martin v. Löwis82bca632006-02-10 20:49:30 +000013285# End of readline checks: restore LIBS
13286LIBS=$LIBS_no_readline
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13289$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013290if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013292else
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013295 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013299
13300int main()
13301{
13302 int val1 = nice(1);
13303 if (val1 != -1 && val1 == nice(2))
13304 exit(0);
13305 exit(1);
13306}
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013310 ac_cv_broken_nice=yes
13311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013316fi
13317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13321$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013322if test "$ac_cv_broken_nice" = yes
13323then
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013326
13327fi
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13330$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013331if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333else
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013335 ac_cv_broken_poll=no
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013338/* end confdefs.h. */
13339
13340#include <poll.h>
13341
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342int main()
13343{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013344 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013345 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013346
13347 close (42);
13348
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013350 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013351 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013352 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013353 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013354 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013355 return 1;
13356}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013357
13358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013360 ac_cv_broken_poll=yes
13361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368fi
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13371$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013372if test "$ac_cv_broken_poll" = yes
13373then
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013376
13377fi
13378
Brett Cannon43802422005-02-10 20:48:03 +000013379# 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 +000013380# (which is not required by ISO C or UNIX spec) and/or if we support
13381# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013382ac_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 +000013383#include <$ac_cv_struct_tm>
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385"
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013387
13388cat >>confdefs.h <<_ACEOF
13389#define HAVE_STRUCT_TM_TM_ZONE 1
13390_ACEOF
13391
13392
13393fi
13394
13395if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013398
13399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13401"
Victor Stinnere0be4232011-10-25 13:06:09 +020013402if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406fi
13407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013409#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410_ACEOF
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13413$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013414if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013418/* end confdefs.h. */
13419#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420#if !HAVE_DECL_TZNAME
13421extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013422#endif
13423
13424int
13425main ()
13426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013428 ;
13429 return 0;
13430}
13431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013433 ac_cv_var_tzname=yes
13434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013437rm -f core conftest.err conftest.$ac_objext \
13438 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13441$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013442 if test $ac_cv_var_tzname = yes; then
13443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013445
13446 fi
13447fi
13448
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013449
Martin v. Löwis1d459062005-03-14 21:23:33 +000013450# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13452$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013453if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013454 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013455else
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013458 ac_cv_working_tzset=no
13459else
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013462
13463#include <stdlib.h>
13464#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013465#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013466
13467#if HAVE_TZNAME
13468extern char *tzname[];
13469#endif
13470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013471int main()
13472{
Brett Cannon18367812003-09-19 00:59:16 +000013473 /* Note that we need to ensure that not only does tzset(3)
13474 do 'something' with localtime, but it works as documented
13475 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013476 This includes making sure that tzname is set properly if
13477 tm->tm_zone does not exist since it is the alternative way
13478 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013479
13480 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013481 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013482 */
13483
Martin v. Löwis1d459062005-03-14 21:23:33 +000013484 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013485 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13486
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013487 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013488 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013489 if (localtime(&groundhogday)->tm_hour != 0)
13490 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013491#if HAVE_TZNAME
13492 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13493 if (strcmp(tzname[0], "UTC") ||
13494 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13495 exit(1);
13496#endif
Brett Cannon18367812003-09-19 00:59:16 +000013497
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013498 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013499 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013500 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013501 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013502#if HAVE_TZNAME
13503 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13504 exit(1);
13505#endif
Brett Cannon18367812003-09-19 00:59:16 +000013506
13507 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13508 tzset();
13509 if (localtime(&groundhogday)->tm_hour != 11)
13510 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013511#if HAVE_TZNAME
13512 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13513 exit(1);
13514#endif
13515
13516#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013517 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13518 exit(1);
13519 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13520 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013521#endif
Brett Cannon18367812003-09-19 00:59:16 +000013522
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013523 exit(0);
13524}
13525
13526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013528 ac_cv_working_tzset=yes
13529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013534fi
13535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536fi
13537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13539$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013540if test "$ac_cv_working_tzset" = yes
13541then
13542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013544
13545fi
13546
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013547# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13549$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013550if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013552else
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013554/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013555#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013556int
13557main ()
13558{
13559
13560struct stat st;
13561st.st_mtim.tv_nsec = 1;
13562
13563 ;
13564 return 0;
13565}
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013568 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573fi
13574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13576$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013577if test "$ac_cv_stat_tv_nsec" = yes
13578then
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013581
13582fi
13583
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013584# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13586$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013587if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013591/* end confdefs.h. */
13592#include <sys/stat.h>
13593int
13594main ()
13595{
13596
13597struct stat st;
13598st.st_mtimespec.tv_nsec = 1;
13599
13600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013605 ac_cv_stat_tv_nsec2=yes
13606else
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13610fi
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13613$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013614if test "$ac_cv_stat_tv_nsec2" = yes
13615then
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013618
13619fi
13620
Jack Jansen666b1e72001-10-31 12:11:48 +000013621# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13623$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013624if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013629#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013630int
13631main ()
13632{
Jack Jansen666b1e72001-10-31 12:11:48 +000013633
13634 int rtn;
13635 rtn = mvwdelch(0,0,0);
13636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ;
13638 return 0;
13639}
13640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013641if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013642 ac_cv_mvwdelch_is_expression=yes
13643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13650$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013651
13652if test "$ac_cv_mvwdelch_is_expression" = yes
13653then
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013656
13657fi
13658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13660$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013661if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013663else
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013665/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013666#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013667int
13668main ()
13669{
Jack Jansen666b1e72001-10-31 12:11:48 +000013670
13671 WINDOW *w;
13672 w->_flags = 0;
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ;
13675 return 0;
13676}
13677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013678if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013679 ac_cv_window_has_flags=yes
13680else
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13684fi
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13687$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013688
Jack Jansen666b1e72001-10-31 12:11:48 +000013689
13690if test "$ac_cv_window_has_flags" = yes
13691then
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013694
13695fi
13696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13698$as_echo_n "checking for is_term_resized... " >&6; }
13699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013700/* end confdefs.h. */
13701#include <curses.h>
13702int
13703main ()
13704{
13705void *x=is_term_resized
13706 ;
13707 return 0;
13708}
13709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013710if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013713
Matthias Kloseb159a552010-04-25 21:00:44 +000013714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13718$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013719
13720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13724$as_echo_n "checking for resize_term... " >&6; }
13725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013726/* end confdefs.h. */
13727#include <curses.h>
13728int
13729main ()
13730{
13731void *x=resize_term
13732 ;
13733 return 0;
13734}
13735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013736if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013739
Matthias Kloseb159a552010-04-25 21:00:44 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013741$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013742else
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13744$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013745
13746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13750$as_echo_n "checking for resizeterm... " >&6; }
13751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013752/* end confdefs.h. */
13753#include <curses.h>
13754int
13755main ()
13756{
13757void *x=resizeterm
13758 ;
13759 return 0;
13760}
13761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013762if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013765
Matthias Kloseb159a552010-04-25 21:00:44 +000013766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013767$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013768else
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13770$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013771
13772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13776$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013777
13778if test -r /dev/ptmx
13779then
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013784
Thomas Wouters89f507f2006-12-13 04:49:30 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13787$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013788fi
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13791$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013792
13793if test -r /dev/ptc
13794then
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13796$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013799
Thomas Wouters89f507f2006-12-13 04:49:30 +000013800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13802$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013803fi
13804
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013805if test "$have_long_long" = yes
13806then
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13808$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013809 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013811else
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010013813 ac_cv_have_long_long_format="cross -- assuming no"
13814 if test x$GCC = xyes; then
13815 save_CFLAGS=$CFLAGS
13816 CFLAGS="$CFLAGS -Werror -Wformat"
13817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818/* end confdefs.h. */
13819
13820 #include <stdio.h>
13821 #include <stddef.h>
13822
13823int
13824main ()
13825{
13826
13827 char *buffer;
13828 sprintf(buffer, "%lld", (long long)123);
13829 sprintf(buffer, "%lld", (long long)-123);
13830 sprintf(buffer, "%llu", (unsigned long long)123);
13831
13832 ;
13833 return 0;
13834}
13835_ACEOF
13836if ac_fn_c_try_compile "$LINENO"; then :
13837 ac_cv_have_long_long_format=yes
13838
13839fi
13840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13841 CFLAGS=$save_CFLAGS
13842 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013845/* end confdefs.h. */
13846
13847 #include <stdio.h>
13848 #include <stddef.h>
13849 #include <string.h>
13850
13851 #ifdef HAVE_SYS_TYPES_H
13852 #include <sys/types.h>
13853 #endif
13854
13855 int main()
13856 {
13857 char buffer[256];
13858
13859 if (sprintf(buffer, "%lld", (long long)123) < 0)
13860 return 1;
13861 if (strcmp(buffer, "123"))
13862 return 1;
13863
13864 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13865 return 1;
13866 if (strcmp(buffer, "-123"))
13867 return 1;
13868
13869 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13870 return 1;
13871 if (strcmp(buffer, "123"))
13872 return 1;
13873
13874 return 0;
13875 }
13876
13877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013879 ac_cv_have_long_long_format=yes
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013885fi
13886
13887
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013888fi
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13891$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013892fi
13893
Mark Dickinson89d7d412009-12-31 20:50:59 +000013894if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013895then
13896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013898
13899fi
13900
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013901if test $ac_sys_system = Darwin
13902then
13903 LIBS="$LIBS -framework CoreFoundation"
13904fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13907$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013912 ac_cv_have_size_t_format="cross -- assuming yes"
13913
Thomas Wouters477c8d52006-05-27 19:21:47 +000013914else
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013916/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917
Thomas Wouters477c8d52006-05-27 19:21:47 +000013918#include <stdio.h>
13919#include <stddef.h>
13920#include <string.h>
13921
Christian Heimes2c181612007-12-17 20:04:13 +000013922#ifdef HAVE_SYS_TYPES_H
13923#include <sys/types.h>
13924#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013925
13926#ifdef HAVE_SSIZE_T
13927typedef ssize_t Py_ssize_t;
13928#elif SIZEOF_VOID_P == SIZEOF_LONG
13929typedef long Py_ssize_t;
13930#else
13931typedef int Py_ssize_t;
13932#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013933
Christian Heimes2c181612007-12-17 20:04:13 +000013934int main()
13935{
13936 char buffer[256];
13937
Thomas Wouters477c8d52006-05-27 19:21:47 +000013938 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13939 return 1;
13940
Thomas Wouters89f507f2006-12-13 04:49:30 +000013941 if (strcmp(buffer, "123"))
13942 return 1;
13943
13944 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13945 return 1;
13946
13947 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013948 return 1;
13949
13950 return 0;
13951}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013952
Thomas Wouters477c8d52006-05-27 19:21:47 +000013953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013954if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013955 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013956else
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013961fi
13962
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13965$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013966if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013969
13970fi
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013973#ifdef HAVE_SYS_TYPES_H
13974#include <sys/types.h>
13975#endif
13976#ifdef HAVE_SYS_SOCKET_H
13977#include <sys/socket.h>
13978#endif
13979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980"
Victor Stinnere0be4232011-10-25 13:06:09 +020013981if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013982
Martin v. Löwis11437992002-04-12 09:54:03 +000013983else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013986
13987fi
13988
Michael W. Hudson54241132001-12-07 15:38:26 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13991$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013992if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994else
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013996 ac_cv_broken_mbstowcs=no
13997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013999/* end confdefs.h. */
14000
14001#include<stdlib.h>
14002int main() {
14003 size_t len = -1;
14004 const char *str = "text";
14005 len = mbstowcs(NULL, str, 0);
14006 return (len != 4);
14007}
14008
14009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014010if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014011 ac_cv_broken_mbstowcs=no
14012else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014017fi
14018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014019fi
14020
Matthias Kloseb9621712010-04-24 17:59:49 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14022$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014023if test "$ac_cv_broken_mbstowcs" = yes
14024then
14025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014027
14028fi
14029
Antoine Pitroub52ec782009-01-25 16:34:23 +000014030# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14032$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014033
14034# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014035if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014036 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014037if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014038then
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14043$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014044fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014045if test "$withval" = no
14046then
14047
14048$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14051$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014052fi
14053
Antoine Pitrou042b1282010-08-13 21:15:58 +000014054else
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14056$as_echo "no value specified" >&6; }
14057fi
14058
Antoine Pitroub52ec782009-01-25 16:34:23 +000014059
Matthias Kloseb17289e2012-03-15 19:51:34 +010014060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14061$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14062if ${ac_cv_computed_gotos+:} false; then :
14063 $as_echo_n "(cached) " >&6
14064else
14065 if test "$cross_compiling" = yes; then :
14066 if test "${with_computed_gotos+set}" = set; then
14067 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14068 else
14069 ac_cv_computed_gotos=no
14070 fi
14071else
14072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14073/* end confdefs.h. */
14074
14075int main(int argc, char **argv)
14076{
14077 static void *targets[1] = { &&LABEL1 };
14078 goto LABEL2;
14079LABEL1:
14080 return 0;
14081LABEL2:
14082 goto *targets[0];
14083 return 1;
14084}
14085
14086_ACEOF
14087if ac_fn_c_try_run "$LINENO"; then :
14088 ac_cv_computed_gotos=yes
14089else
14090 ac_cv_computed_gotos=no
14091fi
14092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14093 conftest.$ac_objext conftest.beam conftest.$ac_ext
14094fi
14095
14096fi
14097
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14099$as_echo "$ac_cv_computed_gotos" >&6; }
14100case "$ac_cv_computed_gotos" in yes*)
14101
14102$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14103
14104esac
14105
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014106case $ac_sys_system in
14107AIX*)
14108
14109$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14110 ;;
14111esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014112
Michael W. Hudson54241132001-12-07 15:38:26 +000014113
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014114
14115
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014116for h in `(cd $srcdir;echo Python/thread_*.h)`
14117do
14118 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14119done
14120
Michael W. Hudson54241132001-12-07 15:38:26 +000014121
Neal Norwitzd24499d2005-12-18 21:36:39 +000014122SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14124$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014125for dir in $SRCDIRS; do
14126 if test ! -d $dir; then
14127 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014128 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014129done
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14131$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014132
Guido van Rossum627b2d71993-12-24 10:39:16 +000014133# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014134ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014135
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014136ac_config_files="$ac_config_files Modules/ld_so_aix"
14137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014139# This file is a shell script that caches the results of configure
14140# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014141# scripts and configure runs, see configure's option --config-cache.
14142# It is not useful on other systems. If it contains results you don't
14143# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014144#
Martin v. Löwis11437992002-04-12 09:54:03 +000014145# config.status only pays attention to the cache file if you give it
14146# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014147#
Skip Montanaro6dead952003-09-25 14:50:04 +000014148# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014149# loading this file, other *unset* `ac_cv_foo' will be assigned the
14150# following values.
14151
14152_ACEOF
14153
Guido van Rossumf78abae1997-01-21 22:02:36 +000014154# The following way of writing the cache mishandles newlines in values,
14155# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014157# Ultrix sh set writes to stderr and can't be redirected directly,
14158# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159(
14160 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14161 eval ac_val=\$$ac_var
14162 case $ac_val in #(
14163 *${as_nl}*)
14164 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14166$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 esac
14168 case $ac_var in #(
14169 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14171 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172 esac ;;
14173 esac
14174 done
14175
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14178 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 # `set' does not quote correctly, so add quotes: double-quote
14180 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014182 "s/'/'\\\\''/g;
14183 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 *)
14186 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189 esac |
14190 sort
14191) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14197 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14199 :end' >>confcache
14200if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14201 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014202 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14204$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014205 if test ! -f "$cache_file" || test -h "$cache_file"; then
14206 cat confcache >"$cache_file"
14207 else
14208 case $cache_file in #(
14209 */* | ?:*)
14210 mv -f confcache "$cache_file"$$ &&
14211 mv -f "$cache_file"$$ "$cache_file" ;; #(
14212 *)
14213 mv -f confcache "$cache_file" ;;
14214 esac
14215 fi
14216 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014217 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14219$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014220 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014221fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014222rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014224test "x$prefix" = xNONE && prefix=$ac_default_prefix
14225# Let make expand exec_prefix.
14226test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014228DEFS=-DHAVE_CONFIG_H
14229
Skip Montanaro6dead952003-09-25 14:50:04 +000014230ac_libobjs=
14231ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014232U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014233for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14234 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14238 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14240 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014241done
14242LIBOBJS=$ac_libobjs
14243
14244LTLIBOBJS=$ac_ltlibobjs
14245
14246
Martin v. Löwis11437992002-04-12 09:54:03 +000014247
Matthias Kloseb9621712010-04-24 17:59:49 +000014248
Victor Stinnere0be4232011-10-25 13:06:09 +020014249: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014250ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014251ac_clean_files_save=$ac_clean_files
14252ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014253{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14254$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14255as_write_fail=0
14256cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014257#! $SHELL
14258# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014259# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014260# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014261# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014262
Martin v. Löwis11437992002-04-12 09:54:03 +000014263debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014264ac_cs_recheck=false
14265ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014266
Matthias Kloseb9621712010-04-24 17:59:49 +000014267SHELL=\${CONFIG_SHELL-$SHELL}
14268export SHELL
14269_ASEOF
14270cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14271## -------------------- ##
14272## M4sh Initialization. ##
14273## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275# Be more Bourne compatible
14276DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014277if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014278 emulate sh
14279 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014281 # is contrary to our usage. Disable this feature.
14282 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 case `(set -o) 2>/dev/null` in #(
14286 *posix*) :
14287 set -o posix ;; #(
14288 *) :
14289 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014290esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014291fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014292
14293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294as_nl='
14295'
14296export as_nl
14297# Printing a long string crashes Solaris 7 /usr/bin/printf.
14298as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14299as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14300as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14301# Prefer a ksh shell builtin over an external printf program on Solaris,
14302# but without wasting forks for bash or zsh.
14303if test -z "$BASH_VERSION$ZSH_VERSION" \
14304 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14305 as_echo='print -r --'
14306 as_echo_n='print -rn --'
14307elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14308 as_echo='printf %s\n'
14309 as_echo_n='printf %s'
14310else
14311 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14312 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14313 as_echo_n='/usr/ucb/echo -n'
14314 else
14315 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14316 as_echo_n_body='eval
14317 arg=$1;
14318 case $arg in #(
14319 *"$as_nl"*)
14320 expr "X$arg" : "X\\(.*\\)$as_nl";
14321 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14322 esac;
14323 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14324 '
14325 export as_echo_n_body
14326 as_echo_n='sh -c $as_echo_n_body as_echo'
14327 fi
14328 export as_echo_body
14329 as_echo='sh -c $as_echo_body as_echo'
14330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
14332# The user is always right.
14333if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 PATH_SEPARATOR=:
14335 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14336 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14337 PATH_SEPARATOR=';'
14338 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341
14342# IFS
14343# We need space, tab and new line, in precisely that order. Quoting is
14344# there to prevent editors from complaining about space-tab.
14345# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14346# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347IFS=" "" $as_nl"
14348
14349# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014350as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014351case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 *[\\/]* ) as_myself=$0 ;;
14353 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014354for as_dir in $PATH
14355do
14356 IFS=$as_save_IFS
14357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362 ;;
14363esac
14364# We did not find ourselves, most probably we were run as `sh COMMAND'
14365# in which case we are not to be found in the path.
14366if test "x$as_myself" = x; then
14367 as_myself=$0
14368fi
14369if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14371 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372fi
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374# Unset variables that we do not need and which cause bugs (e.g. in
14375# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14376# suppresses any "Segmentation fault" message there. '((' could
14377# trigger a bug in pdksh 5.2.14.
14378for as_var in BASH_ENV ENV MAIL MAILPATH
14379do eval test x\${$as_var+set} = xset \
14380 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381done
14382PS1='$ '
14383PS2='> '
14384PS4='+ '
14385
14386# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014387LC_ALL=C
14388export LC_ALL
14389LANGUAGE=C
14390export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392# CDPATH.
14393(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14394
14395
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014396# as_fn_error STATUS ERROR [LINENO LOG_FD]
14397# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014398# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14399# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014400# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014401as_fn_error ()
14402{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014403 as_status=$1; test $as_status -eq 0 && as_status=1
14404 if test "$4"; then
14405 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14406 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014408 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 as_fn_exit $as_status
14410} # as_fn_error
14411
14412
14413# as_fn_set_status STATUS
14414# -----------------------
14415# Set $? to STATUS, without forking.
14416as_fn_set_status ()
14417{
14418 return $1
14419} # as_fn_set_status
14420
14421# as_fn_exit STATUS
14422# -----------------
14423# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14424as_fn_exit ()
14425{
14426 set +e
14427 as_fn_set_status $1
14428 exit $1
14429} # as_fn_exit
14430
14431# as_fn_unset VAR
14432# ---------------
14433# Portably unset VAR.
14434as_fn_unset ()
14435{
14436 { eval $1=; unset $1;}
14437}
14438as_unset=as_fn_unset
14439# as_fn_append VAR VALUE
14440# ----------------------
14441# Append the text in VALUE to the end of the definition contained in VAR. Take
14442# advantage of any shell optimizations that allow amortized linear growth over
14443# repeated appends, instead of the typical quadratic growth present in naive
14444# implementations.
14445if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14446 eval 'as_fn_append ()
14447 {
14448 eval $1+=\$2
14449 }'
14450else
14451 as_fn_append ()
14452 {
14453 eval $1=\$$1\$2
14454 }
14455fi # as_fn_append
14456
14457# as_fn_arith ARG...
14458# ------------------
14459# Perform arithmetic evaluation on the ARGs, and store the result in the
14460# global $as_val. Take advantage of shells that can avoid forks. The arguments
14461# must be portable across $(()) and expr.
14462if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14463 eval 'as_fn_arith ()
14464 {
14465 as_val=$(( $* ))
14466 }'
14467else
14468 as_fn_arith ()
14469 {
14470 as_val=`expr "$@" || test $? -eq 1`
14471 }
14472fi # as_fn_arith
14473
14474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475if expr a : '\(a\)' >/dev/null 2>&1 &&
14476 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14477 as_expr=expr
14478else
14479 as_expr=false
14480fi
14481
14482if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14483 as_basename=basename
14484else
14485 as_basename=false
14486fi
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14489 as_dirname=dirname
14490else
14491 as_dirname=false
14492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494as_me=`$as_basename -- "$0" ||
14495$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14496 X"$0" : 'X\(//\)$' \| \
14497 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499 sed '/^.*\/\([^/][^/]*\)\/*$/{
14500 s//\1/
14501 q
14502 }
14503 /^X\/\(\/\/\)$/{
14504 s//\1/
14505 q
14506 }
14507 /^X\/\(\/\).*/{
14508 s//\1/
14509 q
14510 }
14511 s/.*/./; q'`
14512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513# Avoid depending upon Character Ranges.
14514as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14515as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14516as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14517as_cr_digits='0123456789'
14518as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519
14520ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014521case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 xy) ECHO_C='\c';;
14526 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14527 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 esac;;
14529*)
14530 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014531esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534if test -d conf$$.dir; then
14535 rm -f conf$$.dir/conf$$.file
14536else
14537 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014540if (echo >conf$$.file) 2>/dev/null; then
14541 if ln -s conf$$.file conf$$ 2>/dev/null; then
14542 as_ln_s='ln -s'
14543 # ... but there are two gotchas:
14544 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14545 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14546 # In both cases, we have to default to `cp -p'.
14547 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14548 as_ln_s='cp -p'
14549 elif ln conf$$.file conf$$ 2>/dev/null; then
14550 as_ln_s=ln
14551 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014554else
14555 as_ln_s='cp -p'
14556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14558rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560
14561# as_fn_mkdir_p
14562# -------------
14563# Create "$as_dir" as a directory, including parents if necessary.
14564as_fn_mkdir_p ()
14565{
14566
14567 case $as_dir in #(
14568 -*) as_dir=./$as_dir;;
14569 esac
14570 test -d "$as_dir" || eval $as_mkdir_p || {
14571 as_dirs=
14572 while :; do
14573 case $as_dir in #(
14574 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14575 *) as_qdir=$as_dir;;
14576 esac
14577 as_dirs="'$as_qdir' $as_dirs"
14578 as_dir=`$as_dirname -- "$as_dir" ||
14579$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14580 X"$as_dir" : 'X\(//\)[^/]' \| \
14581 X"$as_dir" : 'X\(//\)$' \| \
14582 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14583$as_echo X"$as_dir" |
14584 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14585 s//\1/
14586 q
14587 }
14588 /^X\(\/\/\)[^/].*/{
14589 s//\1/
14590 q
14591 }
14592 /^X\(\/\/\)$/{
14593 s//\1/
14594 q
14595 }
14596 /^X\(\/\).*/{
14597 s//\1/
14598 q
14599 }
14600 s/.*/./; q'`
14601 test -d "$as_dir" && break
14602 done
14603 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014604 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014605
14606
14607} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014608if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014610else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014611 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014612 as_mkdir_p=false
14613fi
14614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615if test -x / >/dev/null 2>&1; then
14616 as_test_x='test -x'
14617else
14618 if ls -dL / >/dev/null 2>&1; then
14619 as_ls_L_option=L
14620 else
14621 as_ls_L_option=
14622 fi
14623 as_test_x='
14624 eval sh -c '\''
14625 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 case $1 in #(
14629 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632 ???[sx]*):;;*)false;;esac;fi
14633 '\'' sh
14634 '
14635fi
14636as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014639as_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 +000014640
14641# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014642as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014643
14644
Martin v. Löwis11437992002-04-12 09:54:03 +000014645exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014646## ----------------------------------- ##
14647## Main body of $CONFIG_STATUS script. ##
14648## ----------------------------------- ##
14649_ASEOF
14650test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14653# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014654# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655# values after options handling.
14656ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014657This file was extended by python $as_me 3.3, which was
Victor Stinnere0be4232011-10-25 13:06:09 +020014658generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014659
14660 CONFIG_FILES = $CONFIG_FILES
14661 CONFIG_HEADERS = $CONFIG_HEADERS
14662 CONFIG_LINKS = $CONFIG_LINKS
14663 CONFIG_COMMANDS = $CONFIG_COMMANDS
14664 $ $0 $@
14665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666on `(hostname || uname -n) 2>/dev/null | sed 1q`
14667"
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669_ACEOF
14670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671case $ac_config_files in *"
14672"*) set x $ac_config_files; shift; ac_config_files=$*;;
14673esac
14674
14675case $ac_config_headers in *"
14676"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14677esac
14678
14679
14680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014681# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010014682config_files="$ac_config_files"
14683config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014688ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014689\`$as_me' instantiates files and other configuration actions
14690from templates according to the current configuration. Unless the files
14691and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
14695 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 --config print configuration, then exit
14698 -q, --quiet, --silent
14699 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 -d, --debug don't remove temporary files
14701 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 --file=FILE[:TEMPLATE]
14703 instantiate the configuration file FILE
14704 --header=FILE[:TEMPLATE]
14705 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
14707Configuration files:
14708$config_files
14709
14710Configuration headers:
14711$config_headers
14712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14717ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014718ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014719python config.status 3.3
Victor Stinnere0be4232011-10-25 13:06:09 +020014720configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014722
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014723Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014724This config.status script is free software; the Free Software Foundation
14725gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726
14727ac_pwd='$ac_pwd'
14728srcdir='$srcdir'
14729INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010014730MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000014731test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014732_ACEOF
14733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14735# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014736ac_need_defaults=:
14737while test $# != 0
14738do
14739 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014740 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14742 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014743 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014745 --*=)
14746 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14747 ac_optarg=
14748 ac_shift=:
14749 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014751 ac_option=$1
14752 ac_optarg=$2
14753 ac_shift=shift
14754 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014755 esac
14756
Skip Montanaro6dead952003-09-25 14:50:04 +000014757 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014759 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14760 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 $as_echo "$ac_cs_version"; exit ;;
14763 --config | --confi | --conf | --con | --co | --c )
14764 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 debug=: ;;
14767 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014768 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 case $ac_optarg in
14770 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014771 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 esac
14773 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014774 ac_need_defaults=false;;
14775 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014776 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 case $ac_optarg in
14778 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14779 esac
14780 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782 --he | --h)
14783 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014784 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014785Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014788 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14789 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14790 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014791
14792 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014793 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014794Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014798
14799 esac
14800 shift
14801done
14802
Skip Montanaro6dead952003-09-25 14:50:04 +000014803ac_configure_extra_args=
14804
14805if $ac_cs_silent; then
14806 exec 6>/dev/null
14807 ac_configure_extra_args="$ac_configure_extra_args --silent"
14808fi
14809
14810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014812if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14814 shift
14815 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14816 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014819fi
14820
Martin v. Löwis11437992002-04-12 09:54:03 +000014821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823exec 5>>config.log
14824{
14825 echo
14826 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14827## Running $as_me. ##
14828_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837
14838# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014839for ac_config_target in $ac_config_targets
14840do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841 case $ac_config_target in
14842 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14843 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14844 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014845 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14846 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14848 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014849 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014850 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851
Victor Stinnere0be4232011-10-25 13:06:09 +020014852 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 esac
14854done
14855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856
Martin v. Löwis11437992002-04-12 09:54:03 +000014857# If the user did not use the arguments to specify the items to instantiate,
14858# then the envvar interface is used. Set only those that are not.
14859# We use the long form for the default assignment because of an extremely
14860# bizarre bug on SunOS 4.1.3.
14861if $ac_need_defaults; then
14862 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14863 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14864fi
14865
Skip Montanaro6dead952003-09-25 14:50:04 +000014866# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014868# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869# Hook for its removal unless debugging.
14870# Note that there is a small window in which the directory will not be cleaned:
14871# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014872$debug ||
14873{
Victor Stinnere0be4232011-10-25 13:06:09 +020014874 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020014876 : "${ac_tmp:=$tmp}"
14877 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014880}
Martin v. Löwis11437992002-04-12 09:54:03 +000014881# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014882
Martin v. Löwis11437992002-04-12 09:54:03 +000014883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020014885 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014886} ||
14887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888 tmp=./conf$$-$RANDOM
14889 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014890} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020014891ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Matthias Kloseb9621712010-04-24 17:59:49 +000014893# Set up the scripts for CONFIG_FILES section.
14894# No need to generate them if there are no CONFIG_FILES.
14895# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898
14899ac_cr=`echo X | tr X '\015'`
14900# On cygwin, bash can eat \r inside `` if the user requested igncr.
14901# But we know of no other shell where ac_cr would be empty at this
14902# point, so we can use a bashism as a fallback.
14903if test "x$ac_cr" = x; then
14904 eval ac_cr=\$\'\\r\'
14905fi
14906ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14907if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014908 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014909else
14910 ac_cs_awk_cr=$ac_cr
14911fi
14912
Victor Stinnere0be4232011-10-25 13:06:09 +020014913echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014914_ACEOF
14915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917{
14918 echo "cat >conf$$subs.awk <<_ACEOF" &&
14919 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14920 echo "_ACEOF"
14921} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014922 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14923ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924ac_delim='%!_!# '
14925for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014927 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14930 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 break
14932 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014933 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 else
14935 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937done
Matthias Kloseb9621712010-04-24 17:59:49 +000014938rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939
Matthias Kloseb9621712010-04-24 17:59:49 +000014940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020014941cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014943sed -n '
14944h
14945s/^/S["/; s/!.*/"]=/
14946p
14947g
14948s/^[^!]*!//
14949:repl
14950t repl
14951s/'"$ac_delim"'$//
14952t delim
14953:nl
14954h
14955s/\(.\{148\}\)..*/\1/
14956t more1
14957s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14958p
14959n
14960b repl
14961:more1
14962s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14963p
14964g
14965s/.\{148\}//
14966t nl
14967:delim
14968h
14969s/\(.\{148\}\)..*/\1/
14970t more2
14971s/["\\]/\\&/g; s/^/"/; s/$/"/
14972p
14973b
14974:more2
14975s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14976p
14977g
14978s/.\{148\}//
14979t delim
14980' <conf$$subs.awk | sed '
14981/^[^""]/{
14982 N
14983 s/\n//
14984}
14985' >>$CONFIG_STATUS || ac_write_fail=1
14986rm -f conf$$subs.awk
14987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14988_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020014989cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 for (key in S) S_is_set[key] = 1
14991 FS = ""
14992
14993}
14994{
14995 line = $ 0
14996 nfields = split(line, field, "@")
14997 substed = 0
14998 len = length(field[1])
14999 for (i = 2; i < nfields; i++) {
15000 key = field[i]
15001 keylen = length(key)
15002 if (S_is_set[key]) {
15003 value = S[key]
15004 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15005 len += length(value) + length(field[++i])
15006 substed = 1
15007 } else
15008 len += 1 + keylen
15009 }
15010
15011 print line
15012}
15013
15014_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015016cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15017if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15018 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15019else
15020 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015021fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015022 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023_ACEOF
15024
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015025# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15026# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027# trailing colons and then remove the whole line if VPATH becomes empty
15028# (actually we leave an empty line to preserve line numbers).
15029if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015030 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15031h
15032s///
15033s/^/:/
15034s/[ ]*$/:/
15035s/:\$(srcdir):/:/g
15036s/:\${srcdir}:/:/g
15037s/:@srcdir@:/:/g
15038s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015040x
15041s/\(=[ ]*\).*/\1/
15042G
15043s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044s/^[^=]*=[ ]*$//
15045}'
15046fi
15047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049fi # test -n "$CONFIG_FILES"
15050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051# Set up the scripts for CONFIG_HEADERS section.
15052# No need to generate them if there are no CONFIG_HEADERS.
15053# This happens for instance with `./config.status Makefile'.
15054if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015055cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015056BEGIN {
15057_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058
Matthias Kloseb9621712010-04-24 17:59:49 +000015059# Transform confdefs.h into an awk script `defines.awk', embedded as
15060# here-document in config.status, that substitutes the proper values into
15061# config.h.in to produce config.h.
15062
15063# Create a delimiter string that does not exist in confdefs.h, to ease
15064# handling of long lines.
15065ac_delim='%!_!# '
15066for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015067 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15068 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 break
15070 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015071 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 else
15073 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15074 fi
15075done
15076
15077# For the awk script, D is an array of macro values keyed by name,
15078# likewise P contains macro parameters if any. Preserve backslash
15079# newline sequences.
15080
15081ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15082sed -n '
15083s/.\{148\}/&'"$ac_delim"'/g
15084t rset
15085:rset
15086s/^[ ]*#[ ]*define[ ][ ]*/ /
15087t def
15088d
15089:def
15090s/\\$//
15091t bsnl
15092s/["\\]/\\&/g
15093s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15094D["\1"]=" \3"/p
15095s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15096d
15097:bsnl
15098s/["\\]/\\&/g
15099s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15100D["\1"]=" \3\\\\\\n"\\/p
15101t cont
15102s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15103t cont
15104d
15105:cont
15106n
15107s/.\{148\}/&'"$ac_delim"'/g
15108t clear
15109:clear
15110s/\\$//
15111t bsnlc
15112s/["\\]/\\&/g; s/^/"/; s/$/"/p
15113d
15114:bsnlc
15115s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15116b cont
15117' <confdefs.h | sed '
15118s/'"$ac_delim"'/"\\\
15119"/g' >>$CONFIG_STATUS || ac_write_fail=1
15120
15121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15122 for (key in D) D_is_set[key] = 1
15123 FS = ""
15124}
15125/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15126 line = \$ 0
15127 split(line, arg, " ")
15128 if (arg[1] == "#") {
15129 defundef = arg[2]
15130 mac1 = arg[3]
15131 } else {
15132 defundef = substr(arg[1], 2)
15133 mac1 = arg[2]
15134 }
15135 split(mac1, mac2, "(") #)
15136 macro = mac2[1]
15137 prefix = substr(line, 1, index(line, defundef) - 1)
15138 if (D_is_set[macro]) {
15139 # Preserve the white space surrounding the "#".
15140 print prefix "define", macro P[macro] D[macro]
15141 next
15142 } else {
15143 # Replace #undef with comments. This is necessary, for example,
15144 # in the case of _POSIX_SOURCE, which is predefined and required
15145 # on some systems where configure will not decide to define it.
15146 if (defundef == "undef") {
15147 print "/*", prefix defundef, macro, "*/"
15148 next
15149 }
15150 }
15151}
15152{ print }
15153_ACAWK
15154_ACEOF
15155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015156 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015157fi # test -n "$CONFIG_HEADERS"
15158
15159
15160eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15161shift
15162for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163do
15164 case $ac_tag in
15165 :[FHLC]) ac_mode=$ac_tag; continue;;
15166 esac
15167 case $ac_mode$ac_tag in
15168 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015169 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170 :[FH]-) ac_tag=-:-;;
15171 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15172 esac
15173 ac_save_IFS=$IFS
15174 IFS=:
15175 set x $ac_tag
15176 IFS=$ac_save_IFS
15177 shift
15178 ac_file=$1
15179 shift
15180
15181 case $ac_mode in
15182 :L) ac_source=$1;;
15183 :[FH])
15184 ac_file_inputs=
15185 for ac_f
15186 do
15187 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015188 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 *) # Look for the file first in the build tree, then in the source tree
15190 # (if the path is not absolute). The absolute path cannot be DOS-style,
15191 # because $ac_f cannot contain `:'.
15192 test -f "$ac_f" ||
15193 case $ac_f in
15194 [\\/$]*) false;;
15195 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15196 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015197 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15200 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201 done
15202
15203 # Let's still pretend it is `configure' which instantiates (i.e., don't
15204 # use $as_me), people would be surprised to read:
15205 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 configure_input='Generated from '`
15207 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15208 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209 if test x"$ac_file" != x-; then
15210 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15212$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 # Neutralize special characters interpreted by sed in replacement strings.
15215 case $configure_input in #(
15216 *\&* | *\|* | *\\* )
15217 ac_sed_conf_input=`$as_echo "$configure_input" |
15218 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15219 *) ac_sed_conf_input=$configure_input;;
15220 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221
15222 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015223 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15224 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 esac
15226 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 esac
15228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015230$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015231 X"$ac_file" : 'X\(//\)[^/]' \| \
15232 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015234$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15236 s//\1/
15237 q
15238 }
15239 /^X\(\/\/\)[^/].*/{
15240 s//\1/
15241 q
15242 }
15243 /^X\(\/\/\)$/{
15244 s//\1/
15245 q
15246 }
15247 /^X\(\/\).*/{
15248 s//\1/
15249 q
15250 }
15251 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_builddir=.
15254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255case "$ac_dir" in
15256.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15257*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261 case $ac_top_builddir_sub in
15262 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15263 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15264 esac ;;
15265esac
15266ac_abs_top_builddir=$ac_pwd
15267ac_abs_builddir=$ac_pwd$ac_dir_suffix
15268# for backward compatibility:
15269ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015270
15271case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274 ac_top_srcdir=$ac_top_builddir_sub
15275 ac_abs_top_srcdir=$ac_pwd ;;
15276 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278 ac_top_srcdir=$srcdir
15279 ac_abs_top_srcdir=$srcdir ;;
15280 *) # Relative name.
15281 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15282 ac_top_srcdir=$ac_top_build_prefix$srcdir
15283 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015284esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015286
Martin v. Löwis11437992002-04-12 09:54:03 +000015287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288 case $ac_mode in
15289 :F)
15290 #
15291 # CONFIG_FILE
15292 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015293
15294 case $INSTALL in
15295 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015298 ac_MKDIR_P=$MKDIR_P
15299 case $MKDIR_P in
15300 [\\/$]* | ?:[\\/]* ) ;;
15301 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15302 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015303_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
Matthias Kloseb9621712010-04-24 17:59:49 +000015305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306# If the template does not know about datarootdir, expand it.
15307# FIXME: This hack should be removed a few years after 2.60.
15308ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015309ac_sed_dataroot='
15310/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015311 p
15312 q
15313}
15314/@datadir@/p
15315/@docdir@/p
15316/@infodir@/p
15317/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015318/@mandir@/p'
15319case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320*datarootdir*) ac_datarootdir_seen=yes;;
15321*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15323$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015325cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326 ac_datarootdir_hack='
15327 s&@datadir@&$datadir&g
15328 s&@docdir@&$docdir&g
15329 s&@infodir@&$infodir&g
15330 s&@localedir@&$localedir&g
15331 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333esac
15334_ACEOF
15335
15336# Neutralize VPATH when `$srcdir' = `.'.
15337# Shell code in configure.ac might set extrasub.
15338# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15340ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015341$extrasub
15342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015344:t
15345/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015346s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015348s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349s&@srcdir@&$ac_srcdir&;t t
15350s&@abs_srcdir@&$ac_abs_srcdir&;t t
15351s&@top_srcdir@&$ac_top_srcdir&;t t
15352s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15353s&@builddir@&$ac_builddir&;t t
15354s&@abs_builddir@&$ac_abs_builddir&;t t
15355s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15356s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015357s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015359"
Victor Stinnere0be4232011-10-25 13:06:09 +020015360eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15361 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015364 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15365 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15366 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015368which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015369$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015370which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015371
Victor Stinnere0be4232011-10-25 13:06:09 +020015372 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015374 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15375 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015377 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378 ;;
15379 :H)
15380 #
15381 # CONFIG_HEADER
15382 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 {
15385 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015386 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15387 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015388 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015389 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15391$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015394 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015395 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 fi
15397 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015399 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015400 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404
15405 esac
15406
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015407
15408 case $ac_file$ac_mode in
15409 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15410
15411 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412done # for ac_tag
15413
Guido van Rossum627b2d71993-12-24 10:39:16 +000015414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015416_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015417ac_clean_files=$ac_clean_files_save
15418
Matthias Kloseb9621712010-04-24 17:59:49 +000015419test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015420 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
15423# configure is writing to config.log, and then calls config.status.
15424# config.status does its own redirection, appending to config.log.
15425# Unfortunately, on DOS this fails, as config.log is still kept open
15426# by configure, so config.status won't be able to write to it; its
15427# output is simply discarded. So we exec the FD to /dev/null,
15428# effectively closing config.log, so it can be properly (re)opened and
15429# appended to by config.status. When coming back to configure, we
15430# need to make the FD available again.
15431if test "$no_create" != yes; then
15432 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015433 ac_config_status_args=
15434 test "$silent" = yes &&
15435 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015437 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 exec 5>>config.log
15439 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15440 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015441 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015442fi
15443if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15445$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015446fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015447
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015448
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015449echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015450if test ! -f Modules/Setup
15451then
15452 cp $srcdir/Modules/Setup.dist Modules/Setup
15453fi
15454
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015455echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015456if test ! -f Modules/Setup.local
15457then
15458 echo "# Edit this file for local setup changes" >Modules/Setup.local
15459fi
15460
15461echo "creating Makefile"
15462$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15463 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015464 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015465mv config.c Modules