blob: 72a758e1cff195897ae7c51710f73ccccadcc597 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl3a5508e2011-03-06 10:42:21 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natali97781b02011-07-22 23:43:42 +02004# Generated by GNU Autoconf 2.67 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000095case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116fi
117
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000135
Matthias Klosea0bea5d2010-05-08 10:00:28 +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.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
Charles-François Natali97781b02011-07-22 23:43:42 +0200224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000323 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000363# as_fn_error STATUS ERROR [LINENO LOG_FD]
364# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000367# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000368as_fn_error ()
369{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000374 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000375 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Martin v. Löwiseba40652007-08-30 20:10:57 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000397
Martin v. Löwiseba40652007-08-30 20:10:57 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000402$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000445 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446 { $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 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000457case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000459 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000474 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Martin v. Löwiseba40652007-08-30 20:10:57 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000514 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000515 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000516 case $1 in #(
517 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_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 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000537# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000556PACKAGE_VERSION='2.7'
557PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000590#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000598ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000599SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000600THREADHEADERS
601UNICODE_OBJS
602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100638HAS_HG
639HGBRANCH
640HGTAG
641HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000642SVNVERSION
643ARFLAGS
644AR
645RANLIB
646GNULD
647LINKCC
648RUNSHARED
649INSTSONAME
650LDLIBRARYDIR
651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670EXTRAMACHDEPPATH
671EXTRAPLATDIR
672SGI_ABI
673MACHDEP
674FRAMEWORKINSTALLAPPSPREFIX
675FRAMEWORKUNIXTOOLSPREFIX
676FRAMEWORKALTINSTALLLAST
677FRAMEWORKALTINSTALLFIRST
678FRAMEWORKINSTALLLAST
679FRAMEWORKINSTALLFIRST
680PYTHONFRAMEWORKINSTALLDIR
681PYTHONFRAMEWORKPREFIX
682PYTHONFRAMEWORKDIR
683PYTHONFRAMEWORKIDENTIFIER
684PYTHONFRAMEWORK
685LIPO_32BIT_FLAGS
686ARCH_RUN_32BIT
687UNIVERSALSDK
688CONFIG_ARGS
689SOVERSION
690VERSION
691target_alias
692host_alias
693build_alias
694LIBS
695ECHO_T
696ECHO_N
697ECHO_C
698DEFS
699mandir
700localedir
701libdir
702psdir
703pdfdir
704dvidir
705htmldir
706infodir
707docdir
708oldincludedir
709includedir
710localstatedir
711sharedstatedir
712sysconfdir
713datadir
714datarootdir
715libexecdir
716sbindir
717bindir
718program_transform_name
719prefix
720exec_prefix
721PACKAGE_URL
722PACKAGE_BUGREPORT
723PACKAGE_STRING
724PACKAGE_VERSION
725PACKAGE_TARNAME
726PACKAGE_NAME
727PATH_SEPARATOR
728SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000729ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000730ac_user_opts='
731enable_option_checking
732enable_universalsdk
733with_universal_archs
734with_framework_name
735enable_framework
736with_gcc
737with_cxx_main
738with_suffix
739enable_shared
740enable_profiling
741with_pydebug
742enable_toolbox_glue
743with_libs
744with_system_expat
745with_system_ffi
746with_dbmliborder
747with_signal_module
748with_dec_threads
749with_threads
750with_thread
751with_pth
752enable_ipv6
753with_doc_strings
754with_tsc
755with_pymalloc
756with_valgrind
757with_wctype_functions
758with_fpectl
759with_libm
760with_libc
761enable_big_digits
762enable_unicode
763'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
772CPP'
773
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776ac_init_help=
777ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000778ac_unrecognized_opts=
779ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# The variables have the same names as the options, with
781# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785no_recursion=
786prefix=NONE
787program_prefix=NONE
788program_suffix=NONE
789program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794x_includes=NONE
795x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000796
797# Installation directory options.
798# These are left unexpanded so users can "make install exec_prefix=/foo"
799# and all the variables that are supposed to be based on exec_prefix
800# by default will actually change.
801# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803bindir='${exec_prefix}/bin'
804sbindir='${exec_prefix}/sbin'
805libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806datarootdir='${prefix}/share'
807datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808sysconfdir='${prefix}/etc'
809sharedstatedir='${prefix}/com'
810localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811includedir='${prefix}/include'
812oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814infodir='${datarootdir}/info'
815htmldir='${docdir}'
816dvidir='${docdir}'
817pdfdir='${docdir}'
818psdir='${docdir}'
819libdir='${exec_prefix}/lib'
820localedir='${datarootdir}/locale'
821mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000824ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000829 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830 ac_prev=
831 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Martin v. Löwiseba40652007-08-30 20:10:57 +0000834 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Martin v. Löwiseba40652007-08-30 20:10:57 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000882 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Martin v. Löwiseba40652007-08-30 20:10:57 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Martin v. Löwiseba40652007-08-30 20:10:57 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001112 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001128 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001168 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Charles-François Natali97781b02011-07-22 23:43:42 +02001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001185 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001202 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001244 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001246 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001315\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001329 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001376 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001384 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001390 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1391 --enable-ipv6 Enable ipv6 (with ipv4) support
1392 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001393 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001394 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001396 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001403 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
1422 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1423 --with(out)-threads[=DIRECTORY]
1424 disable/enable thread support
1425 --with(out)-thread[=DIRECTORY]
1426 deprecated; use --with(out)-threads
1427 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001429 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001431 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with-fpectl enable SIGFPE catching
1434 --with-libm=STRING math library
1435 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 CPP C preprocessor
1446
1447Use these variables to override the choices made by `configure' or to help
1448it to find libraries and programs with nonstandard names/locations.
1449
Georg Brandl464432d2009-05-20 18:24:08 +00001450Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
1454
1455if test "$ac_init_help" = "recursive"; then
1456 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001458 test -d "$ac_dir" ||
1459 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_builddir=.
1462
Martin v. Löwiseba40652007-08-30 20:10:57 +00001463case "$ac_dir" in
1464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001466 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001467 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001468 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001469 case $ac_top_builddir_sub in
1470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472 esac ;;
1473esac
1474ac_abs_top_builddir=$ac_pwd
1475ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476# for backward compatibility:
1477ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001482 ac_top_srcdir=$ac_top_builddir_sub
1483 ac_abs_top_srcdir=$ac_pwd ;;
1484 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001486 ac_top_srcdir=$srcdir
1487 ac_abs_top_srcdir=$srcdir ;;
1488 *) # Relative name.
1489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490 ac_top_srcdir=$ac_top_build_prefix$srcdir
1491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001492esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001494
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 cd "$ac_dir" || { ac_status=$?; continue; }
1496 # Check for guested configure.
1497 if test -f "$ac_srcdir/configure.gnu"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500 elif test -f "$ac_srcdir/configure"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001504 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505 fi || ac_status=$?
1506 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 done
1508fi
1509
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001511if $ac_init_version; then
1512 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001513python configure 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +02001514generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001516Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517This configure script is free software; the Free Software Foundation
1518gives unlimited permission to copy, distribute and modify it.
1519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001522
1523## ------------------------ ##
1524## Autoconf initialization. ##
1525## ------------------------ ##
1526
1527# ac_fn_c_try_compile LINENO
1528# --------------------------
1529# Try to compile conftest.$ac_ext, and return whether this succeeded.
1530ac_fn_c_try_compile ()
1531{
1532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 rm -f conftest.$ac_objext
1534 if { { ac_try="$ac_compile"
1535case "(($ac_try" in
1536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 *) ac_try_echo=$ac_try;;
1538esac
1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540$as_echo "$ac_try_echo"; } >&5
1541 (eval "$ac_compile") 2>conftest.err
1542 ac_status=$?
1543 if test -s conftest.err; then
1544 grep -v '^ *+' conftest.err >conftest.er1
1545 cat conftest.er1 >&5
1546 mv -f conftest.er1 conftest.err
1547 fi
1548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 test $ac_status = 0; } && {
1550 test -z "$ac_c_werror_flag" ||
1551 test ! -s conftest.err
1552 } && test -s conftest.$ac_objext; then :
1553 ac_retval=0
1554else
1555 $as_echo "$as_me: failed program was:" >&5
1556sed 's/^/| /' conftest.$ac_ext >&5
1557
1558 ac_retval=1
1559fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 as_fn_set_status $ac_retval
1562
1563} # ac_fn_c_try_compile
1564
1565# ac_fn_c_try_cpp LINENO
1566# ----------------------
1567# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1568ac_fn_c_try_cpp ()
1569{
1570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 if { { ac_try="$ac_cpp conftest.$ac_ext"
1572case "(($ac_try" in
1573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1574 *) ac_try_echo=$ac_try;;
1575esac
1576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1577$as_echo "$ac_try_echo"; } >&5
1578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1579 ac_status=$?
1580 if test -s conftest.err; then
1581 grep -v '^ *+' conftest.err >conftest.er1
1582 cat conftest.er1 >&5
1583 mv -f conftest.er1 conftest.err
1584 fi
1585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001586 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001587 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1588 test ! -s conftest.err
1589 }; then :
1590 ac_retval=0
1591else
1592 $as_echo "$as_me: failed program was:" >&5
1593sed 's/^/| /' conftest.$ac_ext >&5
1594
1595 ac_retval=1
1596fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001597 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001598 as_fn_set_status $ac_retval
1599
1600} # ac_fn_c_try_cpp
1601
1602# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1603# -------------------------------------------------------
1604# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1605# the include files in INCLUDES and setting the cache variable VAR
1606# accordingly.
1607ac_fn_c_check_header_mongrel ()
1608{
1609 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Charles-François Natali97781b02011-07-22 23:43:42 +02001610 if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1612$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001613if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001614 $as_echo_n "(cached) " >&6
1615fi
1616eval ac_res=\$$3
1617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1618$as_echo "$ac_res" >&6; }
1619else
1620 # Is the header compilable?
1621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1622$as_echo_n "checking $2 usability... " >&6; }
1623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1624/* end confdefs.h. */
1625$4
1626#include <$2>
1627_ACEOF
1628if ac_fn_c_try_compile "$LINENO"; then :
1629 ac_header_compiler=yes
1630else
1631 ac_header_compiler=no
1632fi
1633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1635$as_echo "$ac_header_compiler" >&6; }
1636
1637# Is the header present?
1638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1639$as_echo_n "checking $2 presence... " >&6; }
1640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1641/* end confdefs.h. */
1642#include <$2>
1643_ACEOF
1644if ac_fn_c_try_cpp "$LINENO"; then :
1645 ac_header_preproc=yes
1646else
1647 ac_header_preproc=no
1648fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001649rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1651$as_echo "$ac_header_preproc" >&6; }
1652
1653# So? What about this header?
1654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1655 yes:no: )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1657$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1659$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1660 ;;
1661 no:yes:* )
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1663$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1665$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1667$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1669$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1671$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001672( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001673## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001674## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001675 ) | sed "s/^/$as_me: WARNING: /" >&2
1676 ;;
1677esac
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1679$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001680if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001681 $as_echo_n "(cached) " >&6
1682else
1683 eval "$3=\$ac_header_compiler"
1684fi
1685eval ac_res=\$$3
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1687$as_echo "$ac_res" >&6; }
1688fi
Charles-François Natali97781b02011-07-22 23:43:42 +02001689 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001690
1691} # ac_fn_c_check_header_mongrel
1692
1693# ac_fn_c_try_run LINENO
1694# ----------------------
1695# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1696# that executables *can* be run.
1697ac_fn_c_try_run ()
1698{
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 if { { ac_try="$ac_link"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_link") 2>&5
1708 ac_status=$?
1709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1710 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1711 { { case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_try") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; }; }; then :
1721 ac_retval=0
1722else
1723 $as_echo "$as_me: program exited with status $ac_status" >&5
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=$ac_status
1728fi
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali97781b02011-07-22 23:43:42 +02001730 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_run
1734
1735# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists and can be compiled using the include files in
1738# INCLUDES, setting the cache variable VAR accordingly.
1739ac_fn_c_check_header_compile ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1743$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001744if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001745 $as_echo_n "(cached) " >&6
1746else
1747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1748/* end confdefs.h. */
1749$4
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_compile "$LINENO"; then :
1753 eval "$3=yes"
1754else
1755 eval "$3=no"
1756fi
1757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1758fi
1759eval ac_res=\$$3
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1761$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001762 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001763
1764} # ac_fn_c_check_header_compile
1765
1766# ac_fn_c_try_link LINENO
1767# -----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_c_try_link ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext conftest$ac_exeext
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_c_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest$ac_exeext && {
1792 test "$cross_compiling" = yes ||
1793 $as_test_x conftest$ac_exeext
1794 }; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
1802 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1803 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1804 # interfere with the next link command; also delete a directory that is
1805 # left behind by Apple's compiler. We do this before executing the actions.
1806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Charles-François Natali97781b02011-07-22 23:43:42 +02001807 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001808 as_fn_set_status $ac_retval
1809
1810} # ac_fn_c_try_link
1811
1812# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1813# -------------------------------------------
1814# Tests whether TYPE exists after having included INCLUDES, setting cache
1815# variable VAR accordingly.
1816ac_fn_c_check_type ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001821if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 eval "$3=no"
1825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826/* end confdefs.h. */
1827$4
1828int
1829main ()
1830{
1831if (sizeof ($2))
1832 return 0;
1833 ;
1834 return 0;
1835}
1836_ACEOF
1837if ac_fn_c_try_compile "$LINENO"; then :
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof (($2)))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851
1852else
1853 eval "$3=yes"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001862 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001863
1864} # ac_fn_c_check_type
1865
1866# ac_fn_c_find_uintX_t LINENO BITS VAR
1867# ------------------------------------
1868# Finds an unsigned integer type with width BITS, setting cache variable VAR
1869# accordingly.
1870ac_fn_c_find_uintX_t ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1874$as_echo_n "checking for uint$2_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001875if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=no"
1879 # Order is important - never check a type that is potentially smaller
1880 # than half of the expected target width.
1881 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1882 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$ac_includes_default
1886int
1887main ()
1888{
1889static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1890test_array [0] = 0
1891
1892 ;
1893 return 0;
1894}
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 case $ac_type in #(
1898 uint$2_t) :
1899 eval "$3=yes" ;; #(
1900 *) :
1901 eval "$3=\$ac_type" ;;
1902esac
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001905 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001928if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001939 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001940int
1941main ()
1942{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001943static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001954 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001955int
1956main ()
1957{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001958static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001979 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02001989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Charles-François Natali97781b02011-07-22 23:43:42 +02002166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002179if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002247if eval "test \"\${$4+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002292
2293} # ac_fn_c_check_member
2294
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002306if eval "test \"\${$3+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02002337 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338
2339} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Martin v. Löwis174440b2008-10-03 08:59:41 +00002344It was created by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +02002345generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002381 $as_echo "PATH: $as_dir"
2382 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002483 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002485 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002506 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Charles-François Natali97781b02011-07-22 23:43:42 +02002603See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
Georg Brandlbcd64a32009-03-31 21:45:18 +00002697if test "$prefix" != "/"; then
2698 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2699fi
2700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002704# We don't use PACKAGE_ variables, and they cause conflicts
2705# with other autoconf-based packages that include Python.h
2706grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2707rm confdefs.h
2708mv confdefs.h.new confdefs.h
2709
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002710
Martin v. Löwis174440b2008-10-03 08:59:41 +00002711VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002712
Martin v. Löwis1142de32002-03-29 16:28:31 +00002713
2714SOVERSION=1.0
2715
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002716# The later defininition of _XOPEN_SOURCE disables certain features
2717# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2718
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002719$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002720
2721
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2724# them.
2725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002727
2728
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2731# them.
2732
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002733$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002734
2735
Martin v. Löwisd6320502004-08-12 13:45:08 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002739$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002740
2741
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002742# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2743# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2744# them.
2745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002746$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002747
2748
2749
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002750define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002751
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002752# Arguments passed to configure.
2753
2754CONFIG_ARGS="$ac_configure_args"
2755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2757$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002758# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002759if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002761 case $enableval in
2762 yes)
2763 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002764 if test ! -d "${enableval}"
2765 then
2766 enableval=/
2767 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002768 ;;
2769 esac
2770 case $enableval in
2771 no)
2772 UNIVERSALSDK=
2773 enable_universalsdk=
2774 ;;
2775 *)
2776 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002777 if test ! -d "${UNIVERSALSDK}"
2778 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002779 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002780 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002781 ;;
2782 esac
2783
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002784
Ronald Oussoren988117f2006-04-29 11:31:35 +00002785else
2786
2787 UNIVERSALSDK=
2788 enable_universalsdk=
2789
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002791
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002792if test -n "${UNIVERSALSDK}"
2793then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2795$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2798$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002799fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002800
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002802
2803
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002804UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2807$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002808
2809# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002810if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002811 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2813$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002814 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002815 if test "${enable_universalsdk}" ; then
2816 :
2817 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002818 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002819 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002820
2821else
2822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2824$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002825
2826fi
2827
2828
2829
2830
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002831
2832# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002833if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002834 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002835 if test "${enable_framework}"; then
2836 :
2837 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002838 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002839 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002840 PYTHONFRAMEWORK=${withval}
2841 PYTHONFRAMEWORKDIR=${withval}.framework
2842 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2843
2844else
2845
2846 PYTHONFRAMEWORK=Python
2847 PYTHONFRAMEWORKDIR=Python.framework
2848 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2849
2850fi
2851
Martin v. Löwiseba40652007-08-30 20:10:57 +00002852# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002853if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002854 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002855 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002857 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 esac
2859 case $enableval in
2860 no)
2861 PYTHONFRAMEWORK=
2862 PYTHONFRAMEWORKDIR=no-framework
2863 PYTHONFRAMEWORKPREFIX=
2864 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002865 FRAMEWORKINSTALLFIRST=
2866 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002867 FRAMEWORKALTINSTALLFIRST=
2868 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002869 if test "x${prefix}" = "xNONE"; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2871 else
2872 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002874 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002875 ;;
2876 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002877 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002878 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002879 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002880 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002881 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2882 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002883 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002884
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002885 if test "x${prefix}" = "xNONE" ; then
2886 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002887
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002888 else
2889 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2890 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002891
2892 case "${enableval}" in
2893 /System*)
2894 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2895 if test "${prefix}" = "NONE" ; then
2896 # See below
2897 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2898 fi
2899 ;;
2900
2901 /Library*)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 ;;
2904
2905 */Library/Frameworks)
2906 MDIR="`dirname "${enableval}"`"
2907 MDIR="`dirname "${MDIR}"`"
2908 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2909
2910 if test "${prefix}" = "NONE"; then
2911 # User hasn't specified the
2912 # --prefix option, but wants to install
2913 # the framework in a non-default location,
2914 # ensure that the compatibility links get
2915 # installed relative to that prefix as well
2916 # instead of in /usr/local.
2917 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2918 fi
2919 ;;
2920
2921 *)
2922 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2923 ;;
2924 esac
2925
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002927
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002928 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002929 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002930 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002931
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002933
Martin v. Löwiseba40652007-08-30 20:10:57 +00002934 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002935
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002936 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2937
2938 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2939
Jack Jansene578a632001-08-15 01:27:14 +00002940 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Guido van Rossum563e7081996-09-10 18:20:48 +00002942else
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Jack Jansene578a632001-08-15 01:27:14 +00002944 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002945 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002946 PYTHONFRAMEWORKPREFIX=
2947 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002948 FRAMEWORKINSTALLFIRST=
2949 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002950 FRAMEWORKALTINSTALLFIRST=
2951 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002952 if test "x${prefix}" = "xNONE" ; then
2953 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2954 else
2955 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2956 fi
Jack Jansene578a632001-08-15 01:27:14 +00002957 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002959
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960fi
2961
Michael W. Hudson54241132001-12-07 15:38:26 +00002962
2963
2964
2965
Jack Jansene578a632001-08-15 01:27:14 +00002966
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002967
2968
Ronald Oussoren5b787322006-06-06 19:50:24 +00002969
2970
2971
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002972
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002973
Jack Jansene578a632001-08-15 01:27:14 +00002974##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002975## AS_HELP_STRING([--with-dyld],
2976## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002977##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978# Set name for machine-dependent library files
2979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2981$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002982if test -z "$MACHDEP"
2983then
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002985 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002986 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002989 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002990 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002991 ac_md_system=`echo $ac_sys_system |
2992 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2993 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002994 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002995 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002996
Guido van Rossum07397971997-04-29 21:49:50 +00002997 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02002998 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002999 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003000 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003001 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003002 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003003 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003004 esac
3005fi
Guido van Rossum91922671997-10-09 20:24:13 +00003006
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003007# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3008# disable features if it is defined, without any means to access these
3009# features as extensions. For these systems, we skip the definition of
3010# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3011# some feature, make sure there is no alternative way to access this
3012# feature. Also, when using wildcards, make sure you have verified the
3013# need for not defining _XOPEN_SOURCE on all systems matching the
3014# wildcard, and that the wildcard does not include future systems
3015# (which may remove their limitations).
3016case $ac_sys_system/$ac_sys_release in
3017 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3018 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003019 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003020 # In addition, Stefan Krah confirms that issue #1244610 exists through
3021 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003022 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003023 define_xopen_source=no
3024 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3025 # also defined. This can be overridden by defining _BSD_SOURCE
3026 # As this has a different meaning on Linux, only define it on OpenBSD
3027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003028$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003029
3030 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003031 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003032 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3033 # also defined. This can be overridden by defining _BSD_SOURCE
3034 # As this has a different meaning on Linux, only define it on OpenBSD
3035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003037
3038 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003039 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3040 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3041 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003042 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003043 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003044 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3045 # request to enable features supported by the standard as a request
3046 # to disable features not supported by the standard. The best way
3047 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3048 # entirely and define __EXTENSIONS__ instead.
3049 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003050 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003051 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3052 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003053 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003054 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003055 define_xopen_source=no;;
3056 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003057 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003058 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003059 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003060 # On FreeBSD 4, the math functions C89 does not cover are never defined
3061 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3062 FreeBSD/4.*)
3063 define_xopen_source=no;;
3064 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3065 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3066 # identifies itself as Darwin/7.*
3067 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3068 # disables platform specific features beyond repair.
3069 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3070 # has no effect, don't bother defining them
3071 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003072 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003073 Darwin/1[0-9].*)
3074 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003075 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3076 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3077 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003078 AIX/4)
3079 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003080 AIX/5)
3081 if test `uname -r` -eq 1; then
3082 define_xopen_source=no
3083 fi
3084 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003085 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3086 # defining NI_NUMERICHOST.
3087 QNX/6.3.2)
3088 define_xopen_source=no
3089 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091esac
3092
3093if test $define_xopen_source = yes
3094then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003095
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003096$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003097
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
3099 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3100 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3101 # several APIs are not declared. Since this is also needed in some
3102 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003104$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
3106
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003108$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
3110
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003111fi
3112
Guido van Rossum91922671997-10-09 20:24:13 +00003113#
3114# SGI compilers allow the specification of the both the ABI and the
3115# ISA on the command line. Depending on the values of these switches,
3116# different and often incompatable code will be generated.
3117#
3118# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3119# thus supply support for various ABI/ISA combinations. The MACHDEP
3120# variable is also adjusted.
3121#
3122
3123if test ! -z "$SGI_ABI"
3124then
3125 CC="cc $SGI_ABI"
3126 LDFLAGS="$SGI_ABI $LDFLAGS"
3127 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3130$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003131
Jack Jansen83f898c2002-12-30 22:23:40 +00003132# And add extra plat-mac for darwin
3133
Jack Jansen7b59b422003-03-17 15:44:10 +00003134
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3136$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003137if test -z "$EXTRAPLATDIR"
3138then
3139 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003140 darwin)
3141 EXTRAPLATDIR="\$(PLATMACDIRS)"
3142 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3143 ;;
3144 *)
3145 EXTRAPLATDIR=""
3146 EXTRAMACHDEPPATH=""
3147 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003148 esac
3149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3151$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003152
Jack Jansen6b08a402004-06-03 12:41:45 +00003153# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3154# it may influence the way we can build extensions, so distutils
3155# needs to check it
3156
Ronald Oussoren988117f2006-04-29 11:31:35 +00003157
Jack Jansen6b08a402004-06-03 12:41:45 +00003158CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003159EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3162$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003163ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3165$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003166
Guido van Rossum627b2d71993-12-24 10:39:16 +00003167# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003168
3169# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3170# for debug/optimization stuff. BASECFLAGS is for flags that are required
3171# just to get things to compile and link. Users are free to override OPT
3172# when running configure or make. The build should not break if they do.
3173# BASECFLAGS should generally not be messed with, however.
3174
3175# XXX shouldn't some/most/all of this code be merged with the stuff later
3176# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3178$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003179
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003181if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003183 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003184 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003185 without_gcc=yes;;
3186 yes) CC=gcc
3187 without_gcc=no;;
3188 *) CC=$withval
3189 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003190 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003193 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003194 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003195 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003196 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003197 case $BE_HOST_CPU in
3198 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003199 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003200 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003201 BASECFLAGS="$BASECFLAGS -export pragma"
3202 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003203 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003204 ;;
3205 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003206 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003208 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003209 ;;
3210 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003211 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 ;;
3213 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003214 AR="\$(srcdir)/Modules/ar_beos"
3215 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003216 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003217 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003218 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219fi
3220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3222$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
Guido van Rossum8b131c51995-03-09 14:10:13 +00003224# If the user switches compilers, we can't believe the cache
3225if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3226then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003227 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003228(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003229fi
3230
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003231# If the user set CFLAGS, use this instead of the automatically
3232# determined setting
3233preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003234ac_ext=c
3235ac_cpp='$CPP $CPPFLAGS'
3236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239if test -n "$ac_tool_prefix"; then
3240 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3241set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3243$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003244if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003245 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003246else
3247 if test -n "$CC"; then
3248 ac_cv_prog_CC="$CC" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003255 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256 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 +00003257 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003258 $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 +00003259 break 2
3260 fi
3261done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003262 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
Jack Jansendd19cf82001-12-06 22:36:17 +00003265fi
3266fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003267CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003268if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3270$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3273$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003274fi
3275
Martin v. Löwiseba40652007-08-30 20:10:57 +00003276
Martin v. Löwis11437992002-04-12 09:54:03 +00003277fi
3278if test -z "$ac_cv_prog_CC"; then
3279 ac_ct_CC=$CC
3280 # Extract the first word of "gcc", so it can be a program name with args.
3281set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3283$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003284if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003286else
3287 if test -n "$ac_ct_CC"; then
3288 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3289else
3290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291for as_dir in $PATH
3292do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003295 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296 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 +00003297 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003298 $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 +00003299 break 2
3300 fi
3301done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003302 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003304
3305fi
3306fi
3307ac_ct_CC=$ac_cv_prog_ac_ct_CC
3308if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3310$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3313$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003314fi
3315
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316 if test "x$ac_ct_CC" = x; then
3317 CC=""
3318 else
3319 case $cross_compiling:$ac_tool_warned in
3320yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3322$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003323ac_tool_warned=yes ;;
3324esac
3325 CC=$ac_ct_CC
3326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
3328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003329fi
3330
Jack Jansendd19cf82001-12-06 22:36:17 +00003331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003332 if test -n "$ac_tool_prefix"; then
3333 # 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 +00003334set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3336$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003337if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003338 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003339else
3340 if test -n "$CC"; then
3341 ac_cv_prog_CC="$CC" # Let the user override the test.
3342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3344for as_dir in $PATH
3345do
3346 IFS=$as_save_IFS
3347 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349 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 +00003350 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351 $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 +00003352 break 2
3353 fi
3354done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003355 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003357
3358fi
3359fi
3360CC=$ac_cv_prog_CC
3361if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3363$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3366$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003367fi
3368
Martin v. Löwiseba40652007-08-30 20:10:57 +00003369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003371fi
3372if test -z "$CC"; then
3373 # Extract the first word of "cc", so it can be a program name with args.
3374set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003377if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003379else
3380 if test -n "$CC"; then
3381 ac_cv_prog_CC="$CC" # Let the user override the test.
3382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 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 +00003391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3392 ac_prog_rejected=yes
3393 continue
3394 fi
3395 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003396 $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 +00003397 break 2
3398 fi
3399done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003403if test $ac_prog_rejected = yes; then
3404 # We found a bogon in the path, so make sure we never use it.
3405 set dummy $ac_cv_prog_CC
3406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408 # We chose a different compiler from the bogus one.
3409 # However, it has the same basename, so the bogon will be chosen
3410 # first if we set CC to just the basename; use the full file name.
3411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413 fi
3414fi
3415fi
3416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3420$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424fi
3425
Martin v. Löwiseba40652007-08-30 20:10:57 +00003426
Martin v. Löwis11437992002-04-12 09:54:03 +00003427fi
3428if test -z "$CC"; then
3429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 do
3432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3435$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003436if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003437 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003438else
3439 if test -n "$CC"; then
3440 ac_cv_prog_CC="$CC" # Let the user override the test.
3441else
Martin v. Löwis11437992002-04-12 09:54:03 +00003442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443for as_dir in $PATH
3444do
3445 IFS=$as_save_IFS
3446 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003448 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 +00003449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003450 $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 +00003451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003453done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003454 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003456
3457fi
3458fi
3459CC=$ac_cv_prog_CC
3460if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3462$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3465$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003466fi
3467
Martin v. Löwiseba40652007-08-30 20:10:57 +00003468
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 test -n "$CC" && break
3470 done
3471fi
3472if test -z "$CC"; then
3473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003475do
3476 # Extract the first word of "$ac_prog", so it can be a program name with args.
3477set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3479$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003481 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003482else
3483 if test -n "$ac_ct_CC"; then
3484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3485else
3486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487for as_dir in $PATH
3488do
3489 IFS=$as_save_IFS
3490 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003492 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 +00003493 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003494 $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 +00003495 break 2
3496 fi
3497done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003498 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003500
Martin v. Löwis11437992002-04-12 09:54:03 +00003501fi
3502fi
3503ac_ct_CC=$ac_cv_prog_ac_ct_CC
3504if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3506$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3509$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 test -n "$ac_ct_CC" && break
3514done
Michael W. Hudson54241132001-12-07 15:38:26 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 if test "x$ac_ct_CC" = x; then
3517 CC=""
3518 else
3519 case $cross_compiling:$ac_tool_warned in
3520yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523ac_tool_warned=yes ;;
3524esac
3525 CC=$ac_ct_CC
3526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527fi
3528
3529fi
3530
3531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003534as_fn_error $? "no acceptable C compiler found in \$PATH
Charles-François Natali97781b02011-07-22 23:43:42 +02003535See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003536
3537# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003538$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3539set X $ac_compile
3540ac_compiler=$2
3541for ac_option in --version -v -V -qversion; do
3542 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003543case "(($ac_try" in
3544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545 *) ac_try_echo=$ac_try;;
3546esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3548$as_echo "$ac_try_echo"; } >&5
3549 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003551 if test -s conftest.err; then
3552 sed '10a\
3553... rest of stderr output deleted ...
3554 10q' conftest.err >conftest.er1
3555 cat conftest.er1 >&5
3556 fi
3557 rm -f conftest.er1 conftest.err
3558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }
3560done
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003563/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003564
Martin v. Löwis11437992002-04-12 09:54:03 +00003565int
3566main ()
3567{
3568
3569 ;
3570 return 0;
3571}
3572_ACEOF
3573ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003574ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003575# Try to create an executable without -o first, disregard a.out.
3576# It will help us diagnose broken compilers, and finding out an intuition
3577# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3579$as_echo_n "checking whether the C compiler works... " >&6; }
3580ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3581
3582# The possible output files:
3583ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3584
Martin v. Löwiseba40652007-08-30 20:10:57 +00003585ac_rmfiles=
3586for ac_file in $ac_files
3587do
3588 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3591 esac
3592done
3593rm -f $ac_rmfiles
3594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003595if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3601$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3605 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3607# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3608# in a Makefile. We should not override ac_cv_exeext if it was cached,
3609# so that the user can short-circuit this test for compilers unknown to
3610# Autoconf.
3611for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003612do
3613 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003616 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003617 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003618 # We found the default executable, but exeext='' is most
3619 # certainly right.
3620 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003621 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003622 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623 then :; else
3624 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3625 fi
3626 # We set ac_cv_exeext here because the later test for it is not
3627 # safe: cross compilers may not add the suffix if given an `-o'
3628 # argument, so we may need to know it at that point already.
3629 # Even if this section looks crufty: it has the advantage of
3630 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003631 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003632 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003633 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 esac
3635done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003636test "$ac_cv_exeext" = no && ac_cv_exeext=
3637
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003638else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639 ac_file=''
3640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641if test -z "$ac_file"; then :
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
3644$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003645sed 's/^/| /' conftest.$ac_ext >&5
3646
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003649as_fn_error 77 "C compiler cannot create executables
Charles-François Natali97781b02011-07-22 23:43:42 +02003650See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651else
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3653$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003654fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3656$as_echo_n "checking for C compiler default output file name... " >&6; }
3657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3658$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003662ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3664$as_echo_n "checking for suffix of executables... " >&6; }
3665if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3671$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3675 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3677# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3678# work properly (i.e., refer to `conftest.exe'), while it won't with
3679# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003680for ac_file in conftest.exe conftest conftest.*; do
3681 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003685 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 * ) break;;
3687 esac
3688done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003692as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Charles-François Natali97781b02011-07-22 23:43:42 +02003693See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003695rm -f conftest conftest$ac_cv_exeext
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3697$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698
3699rm -f conftest.$ac_ext
3700EXEEXT=$ac_cv_exeext
3701ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3703/* end confdefs.h. */
3704#include <stdio.h>
3705int
3706main ()
3707{
3708FILE *f = fopen ("conftest.out", "w");
3709 return ferror (f) || fclose (f) != 0;
3710
3711 ;
3712 return 0;
3713}
Skip Montanaro6dead952003-09-25 14:50:04 +00003714_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003715ac_clean_files="$ac_clean_files conftest.out"
3716# Check that the compiler produces executables we can run. If not, either
3717# the compiler is broken, or we cross compile.
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3719$as_echo_n "checking whether we are cross compiling... " >&6; }
3720if test "$cross_compiling" != yes; then
3721 { { ac_try="$ac_link"
3722case "(($ac_try" in
3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724 *) ac_try_echo=$ac_try;;
3725esac
3726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727$as_echo "$ac_try_echo"; } >&5
3728 (eval "$ac_link") 2>&5
3729 ac_status=$?
3730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3731 test $ac_status = 0; }
3732 if { ac_try='./conftest$ac_cv_exeext'
3733 { { case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
3737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
3739 (eval "$ac_try") 2>&5
3740 ac_status=$?
3741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }; }; then
3743 cross_compiling=no
3744 else
3745 if test "$cross_compiling" = maybe; then
3746 cross_compiling=yes
3747 else
3748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003750as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751If you meant to cross compile, use \`--host'.
Charles-François Natali97781b02011-07-22 23:43:42 +02003752See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003753 fi
3754 fi
3755fi
3756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3757$as_echo "$cross_compiling" >&6; }
3758
3759rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3760ac_clean_files=$ac_clean_files_save
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3762$as_echo_n "checking for suffix of object files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003763if test "${ac_cv_objext+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764 $as_echo_n "(cached) " >&6
3765else
3766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769int
3770main ()
3771{
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
3777rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003778if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779case "(($ac_try" in
3780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3781 *) ac_try_echo=$ac_try;;
3782esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3784$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003786 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3788 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 for ac_file in conftest.o conftest.obj conftest.*; do
3790 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3794 break;;
3795 esac
3796done
3797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003799sed 's/^/| /' conftest.$ac_ext >&5
3800
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003803as_fn_error $? "cannot compute suffix of object files: cannot compile
Charles-François Natali97781b02011-07-22 23:43:42 +02003804See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003806rm -f conftest.$ac_cv_objext conftest.$ac_ext
3807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3809$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810OBJEXT=$ac_cv_objext
3811ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3813$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003814if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820int
3821main ()
3822{
3823#ifndef __GNUC__
3824 choke me
3825#endif
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_compiler_gnu=yes
3833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003837ac_cv_c_compiler_gnu=$ac_compiler_gnu
3838
3839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3841$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3842if test $ac_compiler_gnu = yes; then
3843 GCC=yes
3844else
3845 GCC=
3846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003847ac_test_CFLAGS=${CFLAGS+set}
3848ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3850$as_echo_n "checking whether $CC accepts -g... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003851if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 ac_save_c_werror_flag=$ac_c_werror_flag
3855 ac_c_werror_flag=yes
3856 ac_cv_prog_cc_g=no
3857 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861int
3862main ()
3863{
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003870 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003872 CFLAGS=""
3873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874/* end confdefs.h. */
3875
3876int
3877main ()
3878{
3879
3880 ;
3881 return 0;
3882}
3883_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886else
3887 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003890/* end confdefs.h. */
3891
3892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3908 ac_c_werror_flag=$ac_save_c_werror_flag
3909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3911$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003914elif test $ac_cv_prog_cc_g = yes; then
3915 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003916 CFLAGS="-g -O2"
3917 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003918 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003919 fi
3920else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921 if test "$GCC" = yes; then
3922 CFLAGS="-O2"
3923 else
3924 CFLAGS=
3925 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3928$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02003929if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003930 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003931else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003933ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003935/* end confdefs.h. */
3936#include <stdarg.h>
3937#include <stdio.h>
3938#include <sys/types.h>
3939#include <sys/stat.h>
3940/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3941struct buf { int x; };
3942FILE * (*rcsopen) (struct buf *, struct stat *, int);
3943static char *e (p, i)
3944 char **p;
3945 int i;
3946{
3947 return p[i];
3948}
3949static char *f (char * (*g) (char **, int), char **p, ...)
3950{
3951 char *s;
3952 va_list v;
3953 va_start (v,p);
3954 s = g (p, va_arg (v,int));
3955 va_end (v);
3956 return s;
3957}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003958
3959/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3960 function prototypes and stuff, but not '\xHH' hex character constants.
3961 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003962 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003963 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3964 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3967
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3969 inside strings and character constants. */
3970#define FOO(x) 'x'
3971int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3972
Skip Montanaro6dead952003-09-25 14:50:04 +00003973int test (int i, double x);
3974struct s1 {int (*f) (int a);};
3975struct s2 {int (*f) (double a);};
3976int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3977int argc;
3978char **argv;
3979int
3980main ()
3981{
3982return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3983 ;
3984 return 0;
3985}
3986_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3988 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003989do
3990 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003994rm -f core conftest.err conftest.$ac_objext
3995 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003996done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003998CC=$ac_save_CC
3999
4000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001# AC_CACHE_VAL
4002case "x$ac_cv_prog_cc_c89" in
4003 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4005$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4008$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004009 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4012$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004013esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004017
Martin v. Löwis11437992002-04-12 09:54:03 +00004018ac_ext=c
4019ac_cpp='$CPP $CPPFLAGS'
4020ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4021ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4022ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004024if test ! -z "$preset_cflags"
4025then
4026 CFLAGS=$preset_cflags
4027fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004028
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004029
4030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4032$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004033
Martin v. Löwiseba40652007-08-30 20:10:57 +00004034# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004035if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004036 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004037
4038 case $withval in
4039 no) with_cxx_main=no
4040 MAINCC='$(CC)';;
4041 yes) with_cxx_main=yes
4042 MAINCC='$(CXX)';;
4043 *) with_cxx_main=yes
4044 MAINCC=$withval
4045 if test -z "$CXX"
4046 then
4047 CXX=$withval
4048 fi;;
4049 esac
4050else
4051
4052 with_cxx_main=no
4053 MAINCC='$(CC)'
4054
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055fi
4056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4058$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004059
4060preset_cxx="$CXX"
4061if test -z "$CXX"
4062then
4063 case "$CC" in
4064 gcc) # Extract the first word of "g++", so it can be a program name with args.
4065set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4067$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004068if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004070else
4071 case $CXX in
4072 [\\/]* | ?:[\\/]*)
4073 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4074 ;;
4075 *)
4076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in notfound
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004081 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004083 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004085 break 2
4086 fi
4087done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004088 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004089IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004090
4091 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4092 ;;
4093esac
4094fi
4095CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004096if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4098$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004104 ;;
4105 cc) # Extract the first word of "c++", so it can be a program name with args.
4106set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004109if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004111else
4112 case $CXX in
4113 [\\/]* | ?:[\\/]*)
4114 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4115 ;;
4116 *)
4117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in notfound
4119do
4120 IFS=$as_save_IFS
4121 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004124 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004126 break 2
4127 fi
4128done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004130IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004131
4132 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4133 ;;
4134esac
4135fi
4136CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004137if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4139$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004145 ;;
4146 esac
4147 if test "$CXX" = "notfound"
4148 then
4149 CXX=""
4150 fi
4151fi
4152if test -z "$CXX"
4153then
4154 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4155do
4156 # Extract the first word of "$ac_prog", so it can be a program name with args.
4157set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4159$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004160if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004162else
4163 if test -n "$CXX"; then
4164 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4165else
4166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004171 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004173 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004175 break 2
4176 fi
4177done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004180
4181fi
4182fi
4183CXX=$ac_cv_prog_CXX
4184if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4186$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004190fi
4191
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004193 test -n "$CXX" && break
4194done
4195test -n "$CXX" || CXX="notfound"
4196
4197 if test "$CXX" = "notfound"
4198 then
4199 CXX=""
4200 fi
4201fi
4202if test "$preset_cxx" != "$CXX"
4203then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004205
4206 By default, distutils will build C++ extension modules with \"$CXX\".
4207 If this is not intended, then set CXX on the configure command line.
4208 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004209$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004210
4211 By default, distutils will build C++ extension modules with \"$CXX\".
4212 If this is not intended, then set CXX on the configure command line.
4213 " >&2;}
4214fi
4215
4216
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004217# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004218
4219ac_ext=c
4220ac_cpp='$CPP $CPPFLAGS'
4221ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4222ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4223ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4225$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004226# On Suns, sometimes $CPP names a directory.
4227if test -n "$CPP" && test -d "$CPP"; then
4228 CPP=
4229fi
4230if test -z "$CPP"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02004231 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004233else
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 # Double quotes because CPP needs to be expanded
4235 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4236 do
4237 ac_preproc_ok=false
4238for ac_c_preproc_warn_flag in '' yes
4239do
4240 # Use a header file that comes with gcc, so configuring glibc
4241 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004242 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4243 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004244 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#ifdef __STDC__
4249# include <limits.h>
4250#else
4251# include <assert.h>
4252#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004257else
Martin v. Löwis11437992002-04-12 09:54:03 +00004258 # Broken: fails on valid input.
4259continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004260fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004261rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004262
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004267#include <ac_nonexistent.h>
4268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Broken: success on invalid input.
4271continue
4272else
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Passes both tests.
4274ac_preproc_ok=:
4275break
4276fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004277rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
4279done
4280# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004281rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 break
4284fi
4285
4286 done
4287 ac_cv_prog_CPP=$CPP
4288
4289fi
4290 CPP=$ac_cv_prog_CPP
4291else
4292 ac_cv_prog_CPP=$CPP
4293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4295$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296ac_preproc_ok=false
4297for ac_c_preproc_warn_flag in '' yes
4298do
4299 # Use a header file that comes with gcc, so configuring glibc
4300 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004301 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4302 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # On the NeXT, cc -E runs the code through the compiler's parser,
4304 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004306/* end confdefs.h. */
4307#ifdef __STDC__
4308# include <limits.h>
4309#else
4310# include <assert.h>
4311#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004313_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004314if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316else
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 # Broken: fails on valid input.
4318continue
4319fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004320rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004321
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004326#include <ac_nonexistent.h>
4327_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004328if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004329 # Broken: success on invalid input.
4330continue
4331else
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # Passes both tests.
4333ac_preproc_ok=:
4334break
4335fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004336rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004337
4338done
4339# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004340rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341if $ac_preproc_ok; then :
4342
Martin v. Löwis11437992002-04-12 09:54:03 +00004343else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4345$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004346as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Charles-François Natali97781b02011-07-22 23:43:42 +02004347See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004348fi
4349
4350ac_ext=c
4351ac_cpp='$CPP $CPPFLAGS'
4352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354ac_compiler_gnu=$ac_cv_c_compiler_gnu
4355
4356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4358$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004359if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004360 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004362 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364 # Loop through the user's path and test for each of PROGNAME-LIST
4365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004370 for ac_prog in grep ggrep; do
4371 for ac_exec_ext in '' $ac_executable_extensions; do
4372 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4373 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4374# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 # Check for GNU $ac_path_GREP
4376case `"$ac_path_GREP" --version 2>&1` in
4377*GNU*)
4378 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4379*)
4380 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004381 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382 while :
4383 do
4384 cat "conftest.in" "conftest.in" >"conftest.tmp"
4385 mv "conftest.tmp" "conftest.in"
4386 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004387 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4392 # Best one so far, save it but keep looking for a better one
4393 ac_cv_path_GREP="$ac_path_GREP"
4394 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004395 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396 # 10*(2^10) chars as input seems more than enough
4397 test $ac_count -gt 10 && break
4398 done
4399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4400esac
4401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004402 $ac_path_GREP_found && break 3
4403 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004404 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004407 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004408 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004409 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004410else
4411 ac_cv_path_GREP=$GREP
4412fi
4413
Martin v. Löwiseba40652007-08-30 20:10:57 +00004414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4416$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417 GREP="$ac_cv_path_GREP"
4418
4419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4421$as_echo_n "checking for egrep... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004422if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004423 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424else
4425 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4426 then ac_cv_path_EGREP="$GREP -E"
4427 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004428 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004429 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 # Loop through the user's path and test for each of PROGNAME-LIST
4431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4433do
4434 IFS=$as_save_IFS
4435 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004436 for ac_prog in egrep; do
4437 for ac_exec_ext in '' $ac_executable_extensions; do
4438 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4439 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4440# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004441 # Check for GNU $ac_path_EGREP
4442case `"$ac_path_EGREP" --version 2>&1` in
4443*GNU*)
4444 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4445*)
4446 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 while :
4449 do
4450 cat "conftest.in" "conftest.in" >"conftest.tmp"
4451 mv "conftest.tmp" "conftest.in"
4452 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004453 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4455 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4458 # Best one so far, save it but keep looking for a better one
4459 ac_cv_path_EGREP="$ac_path_EGREP"
4460 ac_path_EGREP_max=$ac_count
4461 fi
4462 # 10*(2^10) chars as input seems more than enough
4463 test $ac_count -gt 10 && break
4464 done
4465 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4466esac
4467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004468 $ac_path_EGREP_found && break 3
4469 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004471 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004472IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004474 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004476else
4477 ac_cv_path_EGREP=$EGREP
4478fi
4479
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 fi
4481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4483$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004485
4486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4488$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004489if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490 $as_echo_n "(cached) " >&6
4491else
4492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004493/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004494#include <stdlib.h>
4495#include <stdarg.h>
4496#include <string.h>
4497#include <float.h>
4498
4499int
4500main ()
4501{
4502
4503 ;
4504 return 0;
4505}
4506_ACEOF
4507if ac_fn_c_try_compile "$LINENO"; then :
4508 ac_cv_header_stdc=yes
4509else
4510 ac_cv_header_stdc=no
4511fi
4512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4513
4514if test $ac_cv_header_stdc = yes; then
4515 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517/* end confdefs.h. */
4518#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004519
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004520_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004522 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004526fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004527rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529fi
4530
4531if test $ac_cv_header_stdc = yes; then
4532 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h. */
4535#include <stdlib.h>
4536
4537_ACEOF
4538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4539 $EGREP "free" >/dev/null 2>&1; then :
4540
4541else
4542 ac_cv_header_stdc=no
4543fi
4544rm -f conftest*
4545
4546fi
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4550 if test "$cross_compiling" = yes; then :
4551 :
4552else
4553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4554/* end confdefs.h. */
4555#include <ctype.h>
4556#include <stdlib.h>
4557#if ((' ' & 0x0FF) == 0x020)
4558# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4559# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4560#else
4561# define ISLOWER(c) \
4562 (('a' <= (c) && (c) <= 'i') \
4563 || ('j' <= (c) && (c) <= 'r') \
4564 || ('s' <= (c) && (c) <= 'z'))
4565# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4566#endif
4567
4568#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4569int
4570main ()
4571{
4572 int i;
4573 for (i = 0; i < 256; i++)
4574 if (XOR (islower (i), ISLOWER (i))
4575 || toupper (i) != TOUPPER (i))
4576 return 2;
4577 return 0;
4578}
4579_ACEOF
4580if ac_fn_c_try_run "$LINENO"; then :
4581
4582else
4583 ac_cv_header_stdc=no
4584fi
4585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4586 conftest.$ac_objext conftest.beam conftest.$ac_ext
4587fi
4588
4589fi
4590fi
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4592$as_echo "$ac_cv_header_stdc" >&6; }
4593if test $ac_cv_header_stdc = yes; then
4594
4595$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4596
4597fi
4598
4599# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4600for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4601 inttypes.h stdint.h unistd.h
4602do :
4603 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4604ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4605"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004606if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004607 cat >>confdefs.h <<_ACEOF
4608#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4609_ACEOF
4610
4611fi
4612
4613done
4614
4615
4616
4617 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02004618if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004619 MINIX=yes
4620else
4621 MINIX=
4622fi
4623
4624
4625 if test "$MINIX" = yes; then
4626
4627$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4628
4629
4630$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4631
4632
4633$as_echo "#define _MINIX 1" >>confdefs.h
4634
4635 fi
4636
4637
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4639$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004640if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004641 $as_echo_n "(cached) " >&6
4642else
4643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644/* end confdefs.h. */
4645
4646# define __EXTENSIONS__ 1
4647 $ac_includes_default
4648int
4649main ()
4650{
4651
4652 ;
4653 return 0;
4654}
4655_ACEOF
4656if ac_fn_c_try_compile "$LINENO"; then :
4657 ac_cv_safe_to_define___extensions__=yes
4658else
4659 ac_cv_safe_to_define___extensions__=no
4660fi
4661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4662fi
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4664$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4665 test $ac_cv_safe_to_define___extensions__ = yes &&
4666 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4667
4668 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4669
4670 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4671
4672 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4673
4674 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4675
4676
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004677
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004678# Check for unsupported systems
4679case $ac_sys_system/$ac_sys_release in
4680atheos*|Linux*/1*)
4681 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4682 echo See README for details.
4683 exit 1;;
4684esac
4685
4686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4688$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004689
4690# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004691if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692 withval=$with_suffix;
4693 case $withval in
4694 no) EXEEXT=;;
4695 yes) EXEEXT=.exe;;
4696 *) EXEEXT=$withval;;
4697 esac
4698fi
4699
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4701$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004702
4703# Test whether we're running on a non-case-sensitive system, in which
4704# case we give a warning if no ext is given
4705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4707$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004708if test ! -d CaseSensitiveTestDir; then
4709mkdir CaseSensitiveTestDir
4710fi
4711
4712if test -d casesensitivetestdir
4713then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4715$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716 BUILDEXEEXT=.exe
4717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004720 BUILDEXEEXT=$EXEEXT
4721fi
4722rmdir CaseSensitiveTestDir
4723
4724case $MACHDEP in
4725bsdos*)
4726 case $CC in
4727 gcc) CC="$CC -D_HAVE_BSDI";;
4728 esac;;
4729esac
4730
4731case $ac_sys_system in
4732hp*|HP*)
4733 case $CC in
4734 cc|*/cc) CC="$CC -Ae";;
4735 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004736SunOS*)
4737 # Some functions have a prototype only with that define, e.g. confstr
4738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004739$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740
4741 ;;
4742esac
4743
4744
4745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4747$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004748if test -z "$LIBRARY"
4749then
4750 LIBRARY='libpython$(VERSION).a'
4751fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4753$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004754
4755# LDLIBRARY is the name of the library to link against (as opposed to the
4756# name of the library into which to insert object files). BLDLIBRARY is also
4757# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4758# is blank as the main program is not linked directly against LDLIBRARY.
4759# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4760# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4761# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4762# DLLLIBRARY is the shared (i.e., DLL) library.
4763#
4764# RUNSHARED is used to run shared python without installed libraries
4765#
4766# INSTSONAME is the name of the shared library that will be use to install
4767# on the system - some systems like version suffix, others don't
4768
4769
4770
4771
4772
4773
4774LDLIBRARY="$LIBRARY"
4775BLDLIBRARY='$(LDLIBRARY)'
4776INSTSONAME='$(LDLIBRARY)'
4777DLLLIBRARY=''
4778LDLIBRARYDIR=''
4779RUNSHARED=''
4780
4781# LINKCC is the command that links the python executable -- default is $(CC).
4782# If CXX is set, and if it is needed to link a main function that was
4783# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4784# python might then depend on the C++ runtime
4785# This is altered for AIX in order to build the export list before
4786# linking.
4787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4789$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004790if test -z "$LINKCC"
4791then
4792 LINKCC='$(PURIFY) $(MAINCC)'
4793 case $ac_sys_system in
4794 AIX*)
4795 exp_extra="\"\""
4796 if test $ac_sys_release -ge 5 -o \
4797 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4798 exp_extra="."
4799 fi
4800 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004801 QNX*)
4802 # qcc must be used because the other compilers do not
4803 # support -N.
4804 LINKCC=qcc;;
4805 esac
4806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4808$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004809
4810# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4811# make sure we default having it set to "no": this is used by
4812# distutils.unixccompiler to know if it should add --enable-new-dtags
4813# to linker command lines, and failing to detect GNU ld simply results
4814# in the same bahaviour as before.
4815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4817$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818ac_prog=ld
4819if test "$GCC" = yes; then
4820 ac_prog=`$CC -print-prog-name=ld`
4821fi
4822case `"$ac_prog" -V 2>&1 < /dev/null` in
4823 *GNU*)
4824 GNULD=yes;;
4825 *)
4826 GNULD=no;;
4827esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4829$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004830
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004834if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004835 enableval=$enable_shared;
4836fi
4837
4838
4839if test -z "$enable_shared"
4840then
4841 case $ac_sys_system in
4842 CYGWIN* | atheos*)
4843 enable_shared="yes";;
4844 *)
4845 enable_shared="no";;
4846 esac
4847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4849$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004855 enableval=$enable_profiling; ac_save_cc="$CC"
4856 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004858 ac_enable_profiling="no"
4859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861/* end confdefs.h. */
4862int main() { return 0; }
4863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 ac_enable_profiling="yes"
4866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871fi
4872
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873 CC="$ac_save_cc"
4874fi
4875
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4877$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878
4879case "$ac_enable_profiling" in
4880 "yes")
4881 BASECFLAGS="-pg $BASECFLAGS"
4882 LDFLAGS="-pg $LDFLAGS"
4883 ;;
4884esac
4885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4887$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888
4889# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4890# library that we build, but we do not want to link against it (we
4891# will find it with a -framework option). For this reason there is an
4892# extra variable BLDLIBRARY against which Python and the extension
4893# modules are linked, BLDLIBRARY. This is normally the same as
4894# LDLIBRARY, but empty for MacOSX framework builds.
4895if test "$enable_framework"
4896then
4897 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4898 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4899 BLDLIBRARY=''
4900else
4901 BLDLIBRARY='$(LDLIBRARY)'
4902fi
4903
4904# Other platforms follow
4905if test $enable_shared = "yes"; then
4906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004908
4909 case $ac_sys_system in
4910 BeOS*)
4911 LDLIBRARY='libpython$(VERSION).so'
4912 ;;
4913 CYGWIN*)
4914 LDLIBRARY='libpython$(VERSION).dll.a'
4915 DLLLIBRARY='libpython$(VERSION).dll'
4916 ;;
4917 SunOS*)
4918 LDLIBRARY='libpython$(VERSION).so'
4919 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4920 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4921 INSTSONAME="$LDLIBRARY".$SOVERSION
4922 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 LDLIBRARY='libpython$(VERSION).so'
4925 BLDLIBRARY='-L. -lpython$(VERSION)'
4926 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4927 case $ac_sys_system in
4928 FreeBSD*)
4929 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4930 ;;
4931 esac
4932 INSTSONAME="$LDLIBRARY".$SOVERSION
4933 ;;
4934 hp*|HP*)
4935 case `uname -m` in
4936 ia64)
4937 LDLIBRARY='libpython$(VERSION).so'
4938 ;;
4939 *)
4940 LDLIBRARY='libpython$(VERSION).sl'
4941 ;;
4942 esac
4943 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4944 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4945 ;;
4946 OSF*)
4947 LDLIBRARY='libpython$(VERSION).so'
4948 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4949 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4950 ;;
4951 atheos*)
4952 LDLIBRARY='libpython$(VERSION).so'
4953 BLDLIBRARY='-L. -lpython$(VERSION)'
4954 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4955 ;;
4956 Darwin*)
4957 LDLIBRARY='libpython$(VERSION).dylib'
4958 BLDLIBRARY='-L. -lpython$(VERSION)'
4959 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4960 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004961 AIX*)
4962 LDLIBRARY='libpython$(VERSION).so'
4963 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4964 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965
4966 esac
4967else # shared is disabled
4968 case $ac_sys_system in
4969 CYGWIN*)
4970 BLDLIBRARY='$(LIBRARY)'
4971 LDLIBRARY='libpython$(VERSION).dll.a'
4972 ;;
4973 esac
4974fi
4975
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4977$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004978
4979if test -n "$ac_tool_prefix"; then
4980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4981set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02004984if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004986else
4987 if test -n "$RANLIB"; then
4988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4989else
4990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in $PATH
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4997 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999 break 2
5000 fi
5001done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005003IFS=$as_save_IFS
5004
5005fi
5006fi
5007RANLIB=$ac_cv_prog_RANLIB
5008if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5010$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5013$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014fi
5015
5016
5017fi
5018if test -z "$ac_cv_prog_RANLIB"; then
5019 ac_ct_RANLIB=$RANLIB
5020 # Extract the first word of "ranlib", so it can be a program name with args.
5021set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005024if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005025 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005026else
5027 if test -n "$ac_ct_RANLIB"; then
5028 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5037 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 break 2
5040 fi
5041done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005042 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005043IFS=$as_save_IFS
5044
5045fi
5046fi
5047ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5048if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5050$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054fi
5055
5056 if test "x$ac_ct_RANLIB" = x; then
5057 RANLIB=":"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005063ac_tool_warned=yes ;;
5064esac
5065 RANLIB=$ac_ct_RANLIB
5066 fi
5067else
5068 RANLIB="$ac_cv_prog_RANLIB"
5069fi
5070
5071
5072for ac_prog in ar aal
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005078if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005079 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005080else
5081 if test -n "$AR"; then
5082 ac_cv_prog_AR="$AR" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005089 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 break 2
5094 fi
5095done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005096 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005097IFS=$as_save_IFS
5098
5099fi
5100fi
5101AR=$ac_cv_prog_AR
5102if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5104$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108fi
5109
5110
5111 test -n "$AR" && break
5112done
5113test -n "$AR" || AR="ar"
5114
5115
5116# tweak ARFLAGS only if the user didn't set it on the command line
5117
5118if test -z "$ARFLAGS"
5119then
5120 ARFLAGS="rc"
5121fi
5122
5123
5124# Extract the first word of "svnversion", so it can be a program name with args.
5125set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005128if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130else
5131 if test -n "$SVNVERSION"; then
5132 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5133else
5134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137 IFS=$as_save_IFS
5138 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143 break 2
5144 fi
5145done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005146 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005147IFS=$as_save_IFS
5148
5149 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5150fi
5151fi
5152SVNVERSION=$ac_cv_prog_SVNVERSION
5153if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5155$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005159fi
5160
5161
5162if test $SVNVERSION = found
5163then
5164 SVNVERSION="svnversion \$(srcdir)"
5165else
5166 SVNVERSION="echo Unversioned directory"
5167fi
5168
Georg Brandl3a5508e2011-03-06 10:42:21 +01005169
5170
5171
5172# Extract the first word of "hg", so it can be a program name with args.
5173set dummy hg; ac_word=$2
5174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5175$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005176if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005177 $as_echo_n "(cached) " >&6
5178else
5179 if test -n "$HAS_HG"; then
5180 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5181else
5182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5183for as_dir in $PATH
5184do
5185 IFS=$as_save_IFS
5186 test -z "$as_dir" && as_dir=.
5187 for ac_exec_ext in '' $ac_executable_extensions; do
5188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5189 ac_cv_prog_HAS_HG="found"
5190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5191 break 2
5192 fi
5193done
5194 done
5195IFS=$as_save_IFS
5196
5197 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5198fi
5199fi
5200HAS_HG=$ac_cv_prog_HAS_HG
5201if test -n "$HAS_HG"; then
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5203$as_echo "$HAS_HG" >&6; }
5204else
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206$as_echo "no" >&6; }
5207fi
5208
5209
5210if test $HAS_HG = found
5211then
5212 HGVERSION="hg id -i \$(srcdir)"
5213 HGTAG="hg id -t \$(srcdir)"
5214 HGBRANCH="hg id -b \$(srcdir)"
5215else
5216 HGVERSION=""
5217 HGTAG=""
5218 HGBRANCH=""
5219fi
5220
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005221case $MACHDEP in
5222bsdos*|hp*|HP*)
5223 # install -d does not work on BSDI or HP-UX
5224 if test -z "$INSTALL"
5225 then
5226 INSTALL="${srcdir}/install-sh -c"
5227 fi
5228esac
5229ac_aux_dir=
5230for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005231 if test -f "$ac_dir/install-sh"; then
5232 ac_aux_dir=$ac_dir
5233 ac_install_sh="$ac_aux_dir/install-sh -c"
5234 break
5235 elif test -f "$ac_dir/install.sh"; then
5236 ac_aux_dir=$ac_dir
5237 ac_install_sh="$ac_aux_dir/install.sh -c"
5238 break
5239 elif test -f "$ac_dir/shtool"; then
5240 ac_aux_dir=$ac_dir
5241 ac_install_sh="$ac_aux_dir/shtool install -c"
5242 break
5243 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005244done
5245if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005246 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005247fi
5248
5249# These three variables are undocumented and unsupported,
5250# and are intended to be withdrawn in a future Autoconf release.
5251# They can cause serious problems if a builder's source tree is in a directory
5252# whose full name contains unusual characters.
5253ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5254ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5255ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5256
5257
5258# Find a good install program. We prefer a C program (faster),
5259# so one script is as good as another. But avoid the broken or
5260# incompatible versions:
5261# SysV /etc/install, /usr/sbin/install
5262# SunOS /usr/etc/install
5263# IRIX /sbin/install
5264# AIX /bin/install
5265# AmigaOS /C/install, which installs bootblocks on floppy discs
5266# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5267# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5268# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5269# OS/2's system install, which has a completely different semantic
5270# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005271# Reject install programs that cannot install multiple files.
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5273$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274if test -z "$INSTALL"; then
Charles-François Natali97781b02011-07-22 23:43:42 +02005275if test "${ac_cv_path_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005276 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005277else
5278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281 IFS=$as_save_IFS
5282 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005283 # Account for people who put trailing slashes in PATH elements.
5284case $as_dir/ in #((
5285 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005287 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005288 /usr/ucb/* ) ;;
5289 *)
5290 # OSF1 and SCO ODT 3.0 have their own names for install.
5291 # Don't use installbsd from OSF since it installs stuff as root
5292 # by default.
5293 for ac_prog in ginstall scoinst install; do
5294 for ac_exec_ext in '' $ac_executable_extensions; do
5295 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5296 if test $ac_prog = install &&
5297 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5298 # AIX install. It has an incompatible calling convention.
5299 :
5300 elif test $ac_prog = install &&
5301 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5302 # program-specific install script used by HP pwplus--don't use.
5303 :
5304 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005305 rm -rf conftest.one conftest.two conftest.dir
5306 echo one > conftest.one
5307 echo two > conftest.two
5308 mkdir conftest.dir
5309 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5310 test -s conftest.one && test -s conftest.two &&
5311 test -s conftest.dir/conftest.one &&
5312 test -s conftest.dir/conftest.two
5313 then
5314 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5315 break 3
5316 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317 fi
5318 fi
5319 done
5320 done
5321 ;;
5322esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005323
5324 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325IFS=$as_save_IFS
5326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005327rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328
5329fi
5330 if test "${ac_cv_path_install+set}" = set; then
5331 INSTALL=$ac_cv_path_install
5332 else
5333 # As a last resort, use the slow shell script. Don't cache a
5334 # value for INSTALL within a source directory, because that will
5335 # break other packages using the cache if that directory is
5336 # removed, or if the value is a relative name.
5337 INSTALL=$ac_install_sh
5338 fi
5339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5341$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342
5343# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5344# It thinks the first close brace ends the variable substitution.
5345test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5346
5347test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5348
5349test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5350
5351
5352# Not every filesystem supports hard links
5353
5354if test -z "$LN" ; then
5355 case $ac_sys_system in
5356 BeOS*) LN="ln -s";;
5357 CYGWIN*) LN="ln -s";;
5358 atheos*) LN="ln -s";;
5359 *) LN=ln;;
5360 esac
5361fi
5362
5363# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5365$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366
5367# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005368if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369 withval=$with_pydebug;
5370if test "$withval" != no
5371then
5372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5376$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005378else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380fi
5381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384fi
5385
5386
5387# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5388# merged with this chunk of code?
5389
5390# Optimizer/debugger flags
5391# ------------------------
5392# (The following bit of code is complicated enough - please keep things
5393# indented properly. Just pretend you're editing Python code. ;-)
5394
5395# There are two parallel sets of case statements below, one that checks to
5396# see if OPT was set and one that does BASECFLAGS setting based upon
5397# compiler and platform. BASECFLAGS tweaks need to be made even if the
5398# user set OPT.
5399
5400# tweak OPT based on compiler and platform, only if the user didn't set
5401# it on the command line
5402
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005403if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404then
5405 case $GCC in
5406 yes)
5407 if test "$CC" != 'g++' ; then
5408 STRICT_PROTO="-Wstrict-prototypes"
5409 fi
5410 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5411 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5412 WRAP="-fwrapv"
5413 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005414
5415 # Clang also needs -fwrapv
5416 if test "$CC" = "clang" ; then
5417 WRAP="-fwrapv"
5418 fi
5419
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420 case $ac_cv_prog_cc_g in
5421 yes)
5422 if test "$Py_DEBUG" = 'true' ; then
5423 # Optimization messes up debuggers, so turn it off for
5424 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005425 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426 else
5427 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5428 fi
5429 ;;
5430 *)
5431 OPT="-O3 -Wall $STRICT_PROTO"
5432 ;;
5433 esac
5434 case $ac_sys_system in
5435 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5436 ;;
5437 esac
5438 ;;
5439
5440 *)
5441 OPT="-O"
5442 ;;
5443 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005444fi
5445
5446
5447
5448# The -arch flags for universal builds on OSX
5449UNIVERSAL_ARCH_FLAGS=
5450
5451
5452# tweak BASECFLAGS based on compiler and platform
5453case $GCC in
5454yes)
5455 # Python violates C99 rules, by casting between incompatible
5456 # pointer types. GCC may generate bad code as a result of that,
5457 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5459$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 ac_save_cc="$CC"
5461 CC="$CC -fno-strict-aliasing"
Charles-François Natali97781b02011-07-22 23:43:42 +02005462 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005463 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005467
5468int
5469main ()
5470{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005471
Gregory P. Smith373469a2009-11-01 21:03:38 +00005472 ;
5473 return 0;
5474}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005476if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005477 ac_cv_no_strict_aliasing_ok=yes
5478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005479 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005482fi
5483
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5486$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 if test $ac_cv_no_strict_aliasing_ok = yes
5488 then
5489 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5490 fi
5491
5492 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5493 # support. Without this, treatment of subnormals doesn't follow
5494 # the standard.
5495 case $ac_sys_machine in
5496 alpha*)
5497 BASECFLAGS="$BASECFLAGS -mieee"
5498 ;;
5499 esac
5500
5501 case $ac_sys_system in
5502 SCO_SV*)
5503 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5504 ;;
5505 # is there any other compiler on Darwin besides gcc?
5506 Darwin*)
5507 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5508 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005509 if test "${CC}" = gcc
5510 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5512$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005513 case "${UNIVERSALSDK}" in
5514 */MacOSX10.4u.sdk)
5515 # Build using 10.4 SDK, force usage of gcc when the
5516 # compiler is gcc, otherwise the user will get very
5517 # confusing error messages when building on OSX 10.6
5518 CC=gcc-4.0
5519 CPP=cpp-4.0
5520 ;;
5521 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5523$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524 fi
5525
5526 # Calculate the right deployment target for this build.
5527 #
5528 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5529 if test ${cur_target} '>' 10.2; then
5530 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005531 if test ${enable_universalsdk}; then
5532 if test "${UNIVERSAL_ARCHS}" = "all"; then
5533 # Ensure that the default platform for a
5534 # 4-way universal build is OSX 10.5,
5535 # that's the first OS release where
5536 # 4-way builds make sense.
5537 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005538
5539 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5540 cur_target='10.5'
5541
5542 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5543 cur_target='10.5'
5544
5545 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5546 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005547 fi
5548 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005549 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005550 # On Intel macs default to a deployment
5551 # target of 10.4, that's the first OSX
5552 # release with Intel support.
5553 cur_target="10.4"
5554 fi
5555 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556 fi
5557 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5558
5559 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5560 # environment with a value that is the same as what we'll use
5561 # in the Makefile to ensure that we'll get the same compiler
5562 # environment during configure and build time.
5563 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5564 export MACOSX_DEPLOYMENT_TARGET
5565 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5566
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005567 if test "${enable_universalsdk}"; then
5568 UNIVERSAL_ARCH_FLAGS=""
5569 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5570 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5571 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005572 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005573
5574 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5575 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5576 LIPO_32BIT_FLAGS=""
5577 ARCH_RUN_32BIT="true"
5578
5579 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5580 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5581 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005582 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005583
5584 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5585 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5586 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005587 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005588
5589 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5590 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5591 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005592 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005593
5594 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005595 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005596
5597 fi
5598
5599
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005600 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5601 if test "${UNIVERSALSDK}" != "/"
5602 then
5603 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5604 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5605 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005606 fi
5607
5608 fi
5609
5610
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005611 ;;
5612 OSF*)
5613 BASECFLAGS="$BASECFLAGS -mieee"
5614 ;;
5615 esac
5616 ;;
5617
5618*)
5619 case $ac_sys_system in
5620 OpenUNIX*|UnixWare*)
5621 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5622 ;;
5623 OSF*)
5624 BASECFLAGS="$BASECFLAGS -ieee -std"
5625 ;;
5626 SCO_SV*)
5627 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5628 ;;
5629 esac
5630 ;;
5631esac
5632
5633if test "$Py_DEBUG" = 'true'; then
5634 :
5635else
5636 OPT="-DNDEBUG $OPT"
5637fi
5638
5639if test "$ac_arch_flags"
5640then
5641 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5642fi
5643
5644# disable check for icc since it seems to pass, but generates a warning
5645if test "$CC" = icc
5646then
5647 ac_cv_opt_olimit_ok=no
5648fi
5649
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5651$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005652if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005653 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654else
5655 ac_save_cc="$CC"
5656CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005658/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005659
5660int
5661main ()
5662{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005663
Gregory P. Smith373469a2009-11-01 21:03:38 +00005664 ;
5665 return 0;
5666}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005668if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005669 ac_cv_opt_olimit_ok=yes
5670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005671 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005672
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005673fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005675CC="$ac_save_cc"
5676fi
5677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5679$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680if test $ac_cv_opt_olimit_ok = yes; then
5681 case $ac_sys_system in
5682 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5683 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5684 # environment?
5685 Darwin*)
5686 ;;
5687 *)
5688 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5689 ;;
5690 esac
5691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5693$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005694 if test "${ac_cv_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005695 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005696else
5697 ac_save_cc="$CC"
5698 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005700/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005701
5702int
5703main ()
5704{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005705
Gregory P. Smith373469a2009-11-01 21:03:38 +00005706 ;
5707 return 0;
5708}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711 ac_cv_olimit_ok=yes
5712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005713 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005714
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005715fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005717 CC="$ac_save_cc"
5718fi
5719
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5721$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722 if test $ac_cv_olimit_ok = yes; then
5723 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5724 fi
5725fi
5726
5727# Check whether GCC supports PyArg_ParseTuple format
5728if test "$GCC" = "yes"
5729then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5731$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005732 save_CFLAGS=$CFLAGS
5733 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005735/* end confdefs.h. */
5736
5737 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005738int
5739main ()
5740{
5741
5742 ;
5743 return 0;
5744}
Matthias Klosec511b472010-05-08 11:01:39 +00005745
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005747if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748
Matthias Klosec511b472010-05-08 11:01:39 +00005749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005750$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005751
Matthias Klosec511b472010-05-08 11:01:39 +00005752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005753$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005754
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005755else
Matthias Klosec511b472010-05-08 11:01:39 +00005756
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005758$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759
5760fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5762 CFLAGS=$save_CFLAGS
5763fi
5764
5765# On some compilers, pthreads are available without further options
5766# (e.g. MacOS X). On some of these systems, the compiler will not
5767# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5768# So we have to see first whether pthreads are available without
5769# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5771$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005772if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005773 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005775 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005776 ac_cv_pthread_is_default=no
5777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779/* end confdefs.h. */
5780
5781#include <pthread.h>
5782
5783void* routine(void* p){return NULL;}
5784
5785int main(){
5786 pthread_t p;
5787 if(pthread_create(&p,NULL,routine,NULL)!=0)
5788 return 1;
5789 (void)pthread_detach(p);
5790 return 0;
5791}
5792
5793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795
5796 ac_cv_pthread_is_default=yes
5797 ac_cv_kthread=no
5798 ac_cv_pthread=no
5799
5800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005801 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805fi
5806
5807
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808fi
5809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5811$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005812
5813
5814if test $ac_cv_pthread_is_default = yes
5815then
5816 ac_cv_kpthread=no
5817else
5818# -Kpthread, if available, provides the right #defines
5819# and linker options to make pthread_create available
5820# Some compilers won't report that they do not support -Kpthread,
5821# so we need to run a program to see whether it really made the
5822# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5824$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005825if test "${ac_cv_kpthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827else
5828 ac_save_cc="$CC"
5829CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005830if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831 ac_cv_kpthread=no
5832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834/* end confdefs.h. */
5835
5836#include <pthread.h>
5837
5838void* routine(void* p){return NULL;}
5839
5840int main(){
5841 pthread_t p;
5842 if(pthread_create(&p,NULL,routine,NULL)!=0)
5843 return 1;
5844 (void)pthread_detach(p);
5845 return 0;
5846}
5847
5848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005850 ac_cv_kpthread=yes
5851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005852 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856fi
5857
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005858CC="$ac_save_cc"
5859fi
5860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5862$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005863fi
5864
5865if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5866then
5867# -Kthread, if available, provides the right #defines
5868# and linker options to make pthread_create available
5869# Some compilers won't report that they do not support -Kthread,
5870# so we need to run a program to see whether it really made the
5871# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5873$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005874if test "${ac_cv_kthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876else
5877 ac_save_cc="$CC"
5878CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880 ac_cv_kthread=no
5881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883/* end confdefs.h. */
5884
5885#include <pthread.h>
5886
5887void* routine(void* p){return NULL;}
5888
5889int main(){
5890 pthread_t p;
5891 if(pthread_create(&p,NULL,routine,NULL)!=0)
5892 return 1;
5893 (void)pthread_detach(p);
5894 return 0;
5895}
5896
5897_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005898if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005899 ac_cv_kthread=yes
5900else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005905fi
5906
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907CC="$ac_save_cc"
5908fi
5909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5911$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005912fi
5913
5914if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5915then
5916# -pthread, if available, provides the right #defines
5917# and linker options to make pthread_create available
5918# Some compilers won't report that they do not support -pthread,
5919# so we need to run a program to see whether it really made the
5920# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5922$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005923if test "${ac_cv_thread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005925else
5926 ac_save_cc="$CC"
5927CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005928if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005929 ac_cv_pthread=no
5930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932/* end confdefs.h. */
5933
5934#include <pthread.h>
5935
5936void* routine(void* p){return NULL;}
5937
5938int main(){
5939 pthread_t p;
5940 if(pthread_create(&p,NULL,routine,NULL)!=0)
5941 return 1;
5942 (void)pthread_detach(p);
5943 return 0;
5944}
5945
5946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005947if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005948 ac_cv_pthread=yes
5949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005950 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5953 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954fi
5955
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005956CC="$ac_save_cc"
5957fi
5958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5960$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962
5963# If we have set a CC compiler flag for thread support then
5964# check if it works for CXX, too.
5965ac_cv_cxx_thread=no
5966if test ! -z "$CXX"
5967then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5969$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005970ac_save_cxx="$CXX"
5971
5972if test "$ac_cv_kpthread" = "yes"
5973then
5974 CXX="$CXX -Kpthread"
5975 ac_cv_cxx_thread=yes
5976elif test "$ac_cv_kthread" = "yes"
5977then
5978 CXX="$CXX -Kthread"
5979 ac_cv_cxx_thread=yes
5980elif test "$ac_cv_pthread" = "yes"
5981then
5982 CXX="$CXX -pthread"
5983 ac_cv_cxx_thread=yes
5984fi
5985
5986if test $ac_cv_cxx_thread = yes
5987then
5988 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5989 $CXX -c conftest.$ac_ext 2>&5
5990 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5991 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5992 then
5993 ac_cv_cxx_thread=yes
5994 else
5995 ac_cv_cxx_thread=no
5996 fi
5997 rm -fr conftest*
5998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6000$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001fi
6002CXX="$ac_save_cxx"
6003
6004
6005# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6007$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006008if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006009 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012/* end confdefs.h. */
6013#include <stdlib.h>
6014#include <stdarg.h>
6015#include <string.h>
6016#include <float.h>
6017
6018int
6019main ()
6020{
6021
6022 ;
6023 return 0;
6024}
6025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006026if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006027 ac_cv_header_stdc=yes
6028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006029 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006030fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6032
6033if test $ac_cv_header_stdc = yes; then
6034 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006036/* end confdefs.h. */
6037#include <string.h>
6038
6039_ACEOF
6040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006041 $EGREP "memchr" >/dev/null 2>&1; then :
6042
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043else
6044 ac_cv_header_stdc=no
6045fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006046rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047
6048fi
6049
6050if test $ac_cv_header_stdc = yes; then
6051 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053/* end confdefs.h. */
6054#include <stdlib.h>
6055
6056_ACEOF
6057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058 $EGREP "free" >/dev/null 2>&1; then :
6059
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060else
6061 ac_cv_header_stdc=no
6062fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006063rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064
6065fi
6066
6067if test $ac_cv_header_stdc = yes; then
6068 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006069 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006070 :
6071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073/* end confdefs.h. */
6074#include <ctype.h>
6075#include <stdlib.h>
6076#if ((' ' & 0x0FF) == 0x020)
6077# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6078# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6079#else
6080# define ISLOWER(c) \
6081 (('a' <= (c) && (c) <= 'i') \
6082 || ('j' <= (c) && (c) <= 'r') \
6083 || ('s' <= (c) && (c) <= 'z'))
6084# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6085#endif
6086
6087#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6088int
6089main ()
6090{
6091 int i;
6092 for (i = 0; i < 256; i++)
6093 if (XOR (islower (i), ISLOWER (i))
6094 || toupper (i) != TOUPPER (i))
6095 return 2;
6096 return 0;
6097}
6098_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006099if ac_fn_c_try_run "$LINENO"; then :
6100
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006102 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106fi
6107
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006108fi
6109fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6111$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006112if test $ac_cv_header_stdc = yes; then
6113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006114$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006115
6116fi
6117
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006118for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6119fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006120ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006121shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006122unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006123sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6124sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006125sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006126sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006127sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006128sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006129bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006130do :
6131 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6132ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006133if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006135#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006136_ACEOF
6137
6138fi
6139
Guido van Rossum627b2d71993-12-24 10:39:16 +00006140done
6141
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006143for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006144 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6146$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006147if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006148 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152#include <sys/types.h>
6153#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006154
Martin v. Löwis11437992002-04-12 09:54:03 +00006155int
6156main ()
6157{
6158if ((DIR *) 0)
6159return 0;
6160 ;
6161 return 0;
6162}
6163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006167 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006171eval ac_res=\$$as_ac_Header
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6173$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006174if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006175 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006176#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006177_ACEOF
6178
6179ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182done
6183# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6184if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6186$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006187if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006188 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189else
Martin v. Löwis11437992002-04-12 09:54:03 +00006190 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006193
Martin v. Löwiseba40652007-08-30 20:10:57 +00006194/* Override any GCC internal prototype to avoid an error.
6195 Use char because int might match the return type of a GCC
6196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006197#ifdef __cplusplus
6198extern "C"
6199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006200char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006201int
6202main ()
6203{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006205 ;
6206 return 0;
6207}
6208_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209for ac_lib in '' dir; do
6210 if test -z "$ac_lib"; then
6211 ac_res="none required"
6212 else
6213 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006217 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006218fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006219rm -f core conftest.err conftest.$ac_objext \
6220 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006221 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224done
Charles-François Natali97781b02011-07-22 23:43:42 +02006225if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006226
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227else
6228 ac_cv_search_opendir=no
6229fi
6230rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006231LIBS=$ac_func_search_save_LIBS
6232fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6234$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006235ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006236if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006240
Michael W. Hudson54241132001-12-07 15:38:26 +00006241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6243$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006244if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006246else
6247 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006250
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251/* Override any GCC internal prototype to avoid an error.
6252 Use char because int might match the return type of a GCC
6253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006254#ifdef __cplusplus
6255extern "C"
6256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006257char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006258int
6259main ()
6260{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 ;
6263 return 0;
6264}
6265_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266for ac_lib in '' x; do
6267 if test -z "$ac_lib"; then
6268 ac_res="none required"
6269 else
6270 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006271 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006276rm -f core conftest.err conftest.$ac_objext \
6277 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006278 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281done
Charles-François Natali97781b02011-07-22 23:43:42 +02006282if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283
Martin v. Löwiseba40652007-08-30 20:10:57 +00006284else
6285 ac_cv_search_opendir=no
6286fi
6287rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006288LIBS=$ac_func_search_save_LIBS
6289fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6291$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296fi
6297
6298fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6301$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006302if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006306/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308int
6309main ()
6310{
6311return makedev(0, 0);
6312 ;
6313 return 0;
6314}
6315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317 ac_cv_header_sys_types_h_makedev=yes
6318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006321rm -f core conftest.err conftest.$ac_objext \
6322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323
6324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6326$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006330if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333
6334fi
6335
6336
6337
6338 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006340if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343
6344fi
6345
6346
6347 fi
6348fi
6349
Michael W. Hudson54241132001-12-07 15:38:26 +00006350
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006352for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353do :
6354 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006355#ifdef HAVE_CURSES_H
6356#include <curses.h>
6357#endif
6358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006359"
Charles-François Natali97781b02011-07-22 23:43:42 +02006360if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006361 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006363_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006364
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006365fi
6366
6367done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368
6369
Martin v. Löwis11017b12006-01-14 18:12:57 +00006370# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006371for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372do :
6373 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 +00006374#ifdef HAVE_ASM_TYPES_H
6375#include <asm/types.h>
6376#endif
6377#ifdef HAVE_SYS_SOCKET_H
6378#include <sys/socket.h>
6379#endif
6380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381"
Charles-François Natali97781b02011-07-22 23:43:42 +02006382if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385_ACEOF
6386
6387fi
6388
6389done
6390
6391
Guido van Rossum627b2d71993-12-24 10:39:16 +00006392# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006393was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6395$as_echo_n "checking for clock_t in time.h... " >&6; }
6396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006397/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006402 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006403 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006404else
Martin v. Löwis11437992002-04-12 09:54:03 +00006405
6406
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006407$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006408
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006409
Guido van Rossum627b2d71993-12-24 10:39:16 +00006410fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006411rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6414$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006415
Neal Norwitz11690112002-07-30 01:08:28 +00006416# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6418$as_echo_n "checking for makedev... " >&6; }
6419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006420/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006421
6422#if defined(MAJOR_IN_MKDEV)
6423#include <sys/mkdev.h>
6424#elif defined(MAJOR_IN_SYSMACROS)
6425#include <sys/sysmacros.h>
6426#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006427#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006428#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006429int
6430main ()
6431{
6432 makedev(0, 0)
6433 ;
6434 return 0;
6435}
6436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006437if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006438 ac_cv_has_makedev=yes
6439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006440 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442rm -f core conftest.err conftest.$ac_objext \
6443 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006444if test "$ac_cv_has_makedev" = "no"; then
6445 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006447/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006448
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006449#define _OSF_SOURCE 1
6450#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006451
Neal Norwitz11690112002-07-30 01:08:28 +00006452int
6453main ()
6454{
6455 makedev(0, 0)
6456 ;
6457 return 0;
6458}
6459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006460if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006461 ac_cv_has_makedev=yes
6462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006463 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465rm -f core conftest.err conftest.$ac_objext \
6466 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006467 if test "$ac_cv_has_makedev" = "yes"; then
6468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006470
6471 fi
6472fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6474$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006475if test "$ac_cv_has_makedev" = "yes"; then
6476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006478
6479fi
6480
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6482# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6483# defined, but the compiler does not support pragma redefine_extname,
6484# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6485# structures (such as rlimit64) without declaring them. As a
6486# work-around, disable LFS on such configurations
6487
6488use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6490$as_echo_n "checking Solaris LFS bug... " >&6; }
6491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006493
6494#define _LARGEFILE_SOURCE 1
6495#define _FILE_OFFSET_BITS 64
6496#include <sys/resource.h>
6497
Martin v. Löwis399a6892002-10-04 10:22:02 +00006498int
6499main ()
6500{
6501struct rlimit foo;
6502 ;
6503 return 0;
6504}
6505_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006507 sol_lfs_bug=no
6508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006509 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6513$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006514if test "$sol_lfs_bug" = "yes"; then
6515 use_lfs=no
6516fi
6517
6518if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006519# Two defines needed to enable largefile support on various platforms
6520# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006521case $ac_sys_system/$ac_sys_release in
6522AIX*)
6523
6524$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6525
6526 ;;
6527esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006532$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006533
Martin v. Löwis399a6892002-10-04 10:22:02 +00006534fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006535
Guido van Rossum84e7b241996-08-19 21:59:00 +00006536# Add some code to confdefs.h so that the test for off_t works on SCO
6537cat >> confdefs.h <<\EOF
6538#if defined(SCO_DS)
6539#undef _OFF_T
6540#endif
6541EOF
6542
Guido van Rossumef2255b2000-03-10 22:30:29 +00006543# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006544ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006545if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547else
Martin v. Löwis11437992002-04-12 09:54:03 +00006548
6549cat >>confdefs.h <<_ACEOF
6550#define mode_t int
6551_ACEOF
6552
6553fi
6554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006555ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006556if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558else
Martin v. Löwis11437992002-04-12 09:54:03 +00006559
6560cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006562_ACEOF
6563
6564fi
6565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006567if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006569else
Martin v. Löwis11437992002-04-12 09:54:03 +00006570
6571cat >>confdefs.h <<_ACEOF
6572#define pid_t int
6573_ACEOF
6574
6575fi
6576
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006577
Martin v. Löwis11437992002-04-12 09:54:03 +00006578cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006579#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006580_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006583if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006585else
Martin v. Löwis11437992002-04-12 09:54:03 +00006586
6587cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006589_ACEOF
6590
6591fi
6592
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6594$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006595if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006599/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006601
6602_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006604 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006605 ac_cv_type_uid_t=yes
6606else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006607 ac_cv_type_uid_t=no
6608fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006609rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6613$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006614if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006616$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006617
6618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006619$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006620
6621fi
6622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006623ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6624case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006625 no|yes) ;; #(
6626 *)
6627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006629
6630
6631cat >>confdefs.h <<_ACEOF
6632#define uint32_t $ac_cv_c_uint32_t
6633_ACEOF
6634;;
6635 esac
6636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006637ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6638case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006639 no|yes) ;; #(
6640 *)
6641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006643
6644
6645cat >>confdefs.h <<_ACEOF
6646#define uint64_t $ac_cv_c_uint64_t
6647_ACEOF
6648;;
6649 esac
6650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6652case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006653 no|yes) ;; #(
6654 *)
6655
6656cat >>confdefs.h <<_ACEOF
6657#define int32_t $ac_cv_c_int32_t
6658_ACEOF
6659;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006660esac
6661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006662ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6663case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006664 no|yes) ;; #(
6665 *)
6666
6667cat >>confdefs.h <<_ACEOF
6668#define int64_t $ac_cv_c_int64_t
6669_ACEOF
6670;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006671esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006673ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006674if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006677
6678fi
6679
Jack Jansendd19cf82001-12-06 22:36:17 +00006680
Michael W. Hudson54241132001-12-07 15:38:26 +00006681# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006682# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6688$as_echo_n "checking size of int... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006689if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006692 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 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695 if test "$ac_cv_type_int" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006698as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali97781b02011-07-22 23:43:42 +02006699See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700 else
6701 ac_cv_sizeof_int=0
6702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6707$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708
6709
6710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006712#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006713_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006714
6715
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716# The cast to long int works around a bug in the HP C Compiler
6717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6719# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6721$as_echo_n "checking size of long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006722if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006725 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 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006728 if test "$ac_cv_type_long" = yes; then
6729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006731as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali97781b02011-07-22 23:43:42 +02006732See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733 else
6734 ac_cv_sizeof_long=0
6735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6740$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741
6742
6743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006745#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006746_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006747
6748
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749# The cast to long int works around a bug in the HP C Compiler
6750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6752# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6754$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006755if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758 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 +00006759
Martin v. Löwis11437992002-04-12 09:54:03 +00006760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761 if test "$ac_cv_type_void_p" = yes; then
6762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006764as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali97781b02011-07-22 23:43:42 +02006765See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766 else
6767 ac_cv_sizeof_void_p=0
6768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6773$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774
6775
6776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006778#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006779_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006780
6781
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782# The cast to long int works around a bug in the HP C Compiler
6783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6785# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6787$as_echo_n "checking size of short... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006788if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006789 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006791 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 +00006792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794 if test "$ac_cv_type_short" = yes; then
6795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006797as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali97781b02011-07-22 23:43:42 +02006798See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 else
6800 ac_cv_sizeof_short=0
6801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803
Martin v. Löwis11437992002-04-12 09:54:03 +00006804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6806$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807
6808
6809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813
6814
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815# The cast to long int works around a bug in the HP C Compiler
6816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6818# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6820$as_echo_n "checking size of float... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006821if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824 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 +00006825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827 if test "$ac_cv_type_float" = yes; then
6828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006830as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali97781b02011-07-22 23:43:42 +02006831See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006832 else
6833 ac_cv_sizeof_float=0
6834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6839$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840
6841
6842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006844#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006845_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846
6847
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848# The cast to long int works around a bug in the HP C Compiler
6849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6851# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6853$as_echo_n "checking size of double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006854if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857 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 +00006858
Martin v. Löwis11437992002-04-12 09:54:03 +00006859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860 if test "$ac_cv_type_double" = yes; then
6861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006863as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali97781b02011-07-22 23:43:42 +02006864See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865 else
6866 ac_cv_sizeof_double=0
6867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6872$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873
6874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006877#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006879
6880
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881# The cast to long int works around a bug in the HP C Compiler
6882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6886$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006887if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890 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 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893 if test "$ac_cv_type_fpos_t" = yes; then
6894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006896as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006897See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006898 else
6899 ac_cv_sizeof_fpos_t=0
6900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6905$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906
6907
6908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006910#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006911_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006912
Michael W. Hudson54241132001-12-07 15:38:26 +00006913
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914# The cast to long int works around a bug in the HP C Compiler
6915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6917# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6919$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006920if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006923 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 +00006924
Martin v. Löwis18e16552006-02-15 17:27:45 +00006925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926 if test "$ac_cv_type_size_t" = yes; then
6927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006929as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006930See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931 else
6932 ac_cv_sizeof_size_t=0
6933 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935
Martin v. Löwis18e16552006-02-15 17:27:45 +00006936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6938$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939
6940
6941
Martin v. Löwis18e16552006-02-15 17:27:45 +00006942cat >>confdefs.h <<_ACEOF
6943#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6944_ACEOF
6945
6946
Christian Heimes951cc0f2008-01-31 23:08:23 +00006947# The cast to long int works around a bug in the HP C Compiler
6948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6950# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6952$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006953if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00006957
Christian Heimes951cc0f2008-01-31 23:08:23 +00006958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959 if test "$ac_cv_type_pid_t" = yes; then
6960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006962as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006963See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006964 else
6965 ac_cv_sizeof_pid_t=0
6966 fi
6967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968
Christian Heimes951cc0f2008-01-31 23:08:23 +00006969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6971$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006972
6973
6974
6975cat >>confdefs.h <<_ACEOF
6976#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6977_ACEOF
6978
6979
Michael W. Hudson54241132001-12-07 15:38:26 +00006980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6982$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006983have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987int
6988main ()
6989{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006990long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006991 ;
6992 return 0;
6993}
6994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006996
6997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006998$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007000 have_long_long=yes
7001
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7005$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007006if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007# The cast to long int works around a bug in the HP C Compiler
7008# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7009# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7010# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7012$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007013if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016 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 +00007017
Martin v. Löwis11437992002-04-12 09:54:03 +00007018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019 if test "$ac_cv_type_long_long" = yes; then
7020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007022as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali97781b02011-07-22 23:43:42 +02007023See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007024 else
7025 ac_cv_sizeof_long_long=0
7026 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007028
Martin v. Löwis11437992002-04-12 09:54:03 +00007029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7031$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032
7033
7034
Martin v. Löwis11437992002-04-12 09:54:03 +00007035cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007036#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007037_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007038
Michael W. Hudson54241132001-12-07 15:38:26 +00007039
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007040fi
7041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7043$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007044have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007046/* end confdefs.h. */
7047
7048int
7049main ()
7050{
Matthias Klosec511b472010-05-08 11:01:39 +00007051long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007052 ;
7053 return 0;
7054}
7055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007057
7058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007060
7061 have_long_double=yes
7062
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007063fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7066$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007067if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007068# The cast to long int works around a bug in the HP C Compiler
7069# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7070# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7071# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7073$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007074if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007078
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080 if test "$ac_cv_type_long_double" = yes; then
7081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007083as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali97781b02011-07-22 23:43:42 +02007084See \`config.log' for more details" "$LINENO" 5 ; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007085 else
7086 ac_cv_sizeof_long_double=0
7087 fi
7088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7092$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007093
7094
7095
7096cat >>confdefs.h <<_ACEOF
7097#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7098_ACEOF
7099
7100
7101fi
7102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7104$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007105have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007107/* end confdefs.h. */
7108
7109int
7110main ()
7111{
7112_Bool x; x = (_Bool)0;
7113 ;
7114 return 0;
7115}
7116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007118
7119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007121
7122 have_c99_bool=yes
7123
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7127$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007128if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129# The cast to long int works around a bug in the HP C Compiler
7130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7132# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7134$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007135if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007139
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141 if test "$ac_cv_type__Bool" = yes; then
7142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007144as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali97781b02011-07-22 23:43:42 +02007145See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146 else
7147 ac_cv_sizeof__Bool=0
7148 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007150
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7153$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154
7155
7156
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007157cat >>confdefs.h <<_ACEOF
7158#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7159_ACEOF
7160
7161
7162fi
7163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007165 #include <stdint.h>
7166 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007167 #ifdef HAVE_INTTYPES_H
7168 #include <inttypes.h>
7169 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007170"
Charles-François Natali97781b02011-07-22 23:43:42 +02007171if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007172
7173cat >>confdefs.h <<_ACEOF
7174#define HAVE_UINTPTR_T 1
7175_ACEOF
7176
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177# The cast to long int works around a bug in the HP C Compiler
7178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7180# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7182$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007183if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186 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 +00007187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007189 if test "$ac_cv_type_uintptr_t" = yes; then
7190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007192as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007193See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194 else
7195 ac_cv_sizeof_uintptr_t=0
7196 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198
Martin v. Löwis11437992002-04-12 09:54:03 +00007199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7201$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202
7203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007206#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007210fi
7211
Martin v. Löwisebe26702006-10-02 14:55:51 +00007212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007213# The cast to long int works around a bug in the HP C Compiler
7214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7216# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7218$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007219if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007223#ifdef HAVE_SYS_TYPES_H
7224#include <sys/types.h>
7225#endif
7226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007228
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007230 if test "$ac_cv_type_off_t" = 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;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007233as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007234See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007235 else
7236 ac_cv_sizeof_off_t=0
7237 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7242$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007244
7245
Martin v. Löwis11437992002-04-12 09:54:03 +00007246cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007247#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007248_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007249
Michael W. Hudson54241132001-12-07 15:38:26 +00007250
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7253$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007254if test "$have_long_long" = yes
7255then
7256if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007257 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007258
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7262$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7265$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007266fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007270fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007271
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007272# The cast to long int works around a bug in the HP C Compiler
7273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7275# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7277$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007278if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007282#ifdef HAVE_SYS_TYPES_H
7283#include <sys/types.h>
7284#endif
7285#ifdef HAVE_TIME_H
7286#include <time.h>
7287#endif
7288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007290
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292 if test "$ac_cv_type_time_t" = yes; then
7293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007295as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007296See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007297 else
7298 ac_cv_sizeof_time_t=0
7299 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7304$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007306
7307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007309#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007310_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007311
Michael W. Hudson54241132001-12-07 15:38:26 +00007312
7313
Trent Mick635f6fb2000-08-23 21:33:05 +00007314# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007315ac_save_cc="$CC"
7316if test "$ac_cv_kpthread" = "yes"
7317then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007318elif test "$ac_cv_kthread" = "yes"
7319then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007320elif test "$ac_cv_pthread" = "yes"
7321then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7324$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007325have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007327/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007328
7329 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007330int
7331main ()
7332{
Guido van Rossum12580492000-09-24 16:47:19 +00007333pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 ;
7335 return 0;
7336}
Matthias Klosec511b472010-05-08 11:01:39 +00007337
Martin v. Löwis11437992002-04-12 09:54:03 +00007338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007339if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007340 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7344$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007345if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7349# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7351$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007352if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007356#ifdef HAVE_PTHREAD_H
7357#include <pthread.h>
7358#endif
7359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007361
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007363 if test "$ac_cv_type_pthread_t" = yes; then
7364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007366as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007367See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007368 else
7369 ac_cv_sizeof_pthread_t=0
7370 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007372
Trent Mick635f6fb2000-08-23 21:33:05 +00007373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7375$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007377
7378
Martin v. Löwis11437992002-04-12 09:54:03 +00007379cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007380#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007381_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007382
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007383
Trent Mick635f6fb2000-08-23 21:33:05 +00007384fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007385CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7388$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007391 enableval=$enable_toolbox_glue;
7392fi
Jack Jansene578a632001-08-15 01:27:14 +00007393
7394
7395if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007396then
Jack Jansene578a632001-08-15 01:27:14 +00007397 case $ac_sys_system/$ac_sys_release in
7398 Darwin/*)
7399 enable_toolbox_glue="yes";;
7400 *)
7401 enable_toolbox_glue="no";;
7402 esac
7403fi
7404case "$enable_toolbox_glue" in
7405yes)
Jack Jansene578a632001-08-15 01:27:14 +00007406 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007407 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007408
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007410
7411 ;;
7412*)
Jack Jansene578a632001-08-15 01:27:14 +00007413 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007414 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007415 ;;
7416esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7418$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007419
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007420
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007421
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007422case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007423 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007424 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7425 ;;
7426 Darwin/*)
7427 OTHER_LIBTOOL_OPT=""
7428 ;;
7429esac
7430
7431
Ronald Oussoren25967582009-09-06 10:00:26 +00007432ARCH_RUN_32BIT=""
7433
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007434case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007435 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007436 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7437 if test "${enable_universalsdk}"; then
7438 :
7439 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007440 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007441 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007442 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007444 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007445 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007446 if test ${gcc_version} '<' 4.0
7447 then
7448 LIBTOOL_CRUFT="-lcc_dynamic"
7449 else
7450 LIBTOOL_CRUFT=""
7451 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007453 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007456/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007457
Ronald Oussoren25967582009-09-06 10:00:26 +00007458 #include <unistd.h>
7459 int main(int argc, char*argv[])
7460 {
7461 if (sizeof(long) == 4) {
7462 return 0;
7463 } else {
7464 return 1;
7465 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007466 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007467
Ronald Oussoren25967582009-09-06 10:00:26 +00007468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007470 ac_osx_32bit=yes
7471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007476fi
7477
7478
Ronald Oussoren25967582009-09-06 10:00:26 +00007479 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007480 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007481 i386)
7482 MACOSX_DEFAULT_ARCH="i386"
7483 ;;
7484 ppc)
7485 MACOSX_DEFAULT_ARCH="ppc"
7486 ;;
7487 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007488 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007489 ;;
7490 esac
7491 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007492 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007493 i386)
7494 MACOSX_DEFAULT_ARCH="x86_64"
7495 ;;
7496 ppc)
7497 MACOSX_DEFAULT_ARCH="ppc64"
7498 ;;
7499 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007500 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007501 ;;
7502 esac
7503
7504 #ARCH_RUN_32BIT="true"
7505 fi
7506
7507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007510esac
7511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7513$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007514if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007515then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007516 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007517 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007518 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7523$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007524 if test $enable_shared = "yes"
7525 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007526 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007527 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7530$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007531fi
7532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7534$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007535case $ac_sys_system/$ac_sys_release in
7536 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7541$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007542 ;;
7543 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007546 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007547esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007548
Guido van Rossum0a516c91994-09-12 10:58:40 +00007549# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551
7552
7553
7554
Ronald Oussoren75912852010-04-08 08:13:31 +00007555
Guido van Rossum0a516c91994-09-12 10:58:40 +00007556# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007557# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7559$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560if test -z "$SO"
7561then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007563 hp*|HP*)
7564 case `uname -m` in
7565 ia64) SO=.so;;
7566 *) SO=.sl;;
7567 esac
7568 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007569 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007570 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007571 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007572else
7573 # this might also be a termcap variable, see #610332
7574 echo
7575 echo '====================================================================='
7576 echo '+ +'
7577 echo '+ WARNING: You have set SO in your environment. +'
7578 echo '+ Do you really mean to change the extension for shared libraries? +'
7579 echo '+ Continuing in 10 seconds to let you to ponder. +'
7580 echo '+ +'
7581 echo '====================================================================='
7582 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7585$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007586
Ronald Oussoren79f90492009-01-02 10:44:46 +00007587
Neal Norwitz58e28882006-05-19 07:00:58 +00007588cat >>confdefs.h <<_ACEOF
7589#define SHLIB_EXT "$SO"
7590_ACEOF
7591
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007593# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007594# (Shared libraries in this instance are shared modules to be loaded into
7595# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7597$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598if test -z "$LDSHARED"
7599then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007600 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007601 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007602 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007603 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007604 ;;
7605 BeOS*)
7606 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007607 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007608 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007609 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007610 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007612 if test "$GCC" = "yes" ; then
7613 LDSHARED='$(CC) -shared'
7614 LDCXXSHARED='$(CXX) -shared'
7615 else
7616 LDSHARED='$(CC) -G'
7617 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007618 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007619 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007620 if test "$GCC" = "yes" ; then
7621 LDSHARED='$(CC) -shared'
7622 LDCXXSHARED='$(CXX) -shared'
7623 else
7624 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007625 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007626 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007627 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007628 LDSHARED='$(CC) -bundle'
7629 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007630 if test "$enable_framework" ; then
7631 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007632 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7633 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007634 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007635 else
7636 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007637 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007638 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007639 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007640 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007641 LDSHARED='$(CC) -bundle'
7642 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007643 if test "$enable_framework" ; then
7644 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007645 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7646 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007647 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007648 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007649 # No framework, use the Python app as bundle-loader
7650 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007651 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007652 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007653 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007654 Darwin/*)
7655 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7656 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007657
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007658 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007659 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007660 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007661 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007662 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007663 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7664 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007665 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007666 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007667 LDSHARED='$(CC) -bundle'
7668 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007669 if test "$enable_framework" ; then
7670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007673 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007674 else
7675 # No framework, use the Python app as bundle-loader
7676 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7677 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007678 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007679 fi
7680 fi
7681 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007682 Linux*|GNU*|QNX*)
7683 LDSHARED='$(CC) -shared'
7684 LDCXXSHARED='$(CXX) -shared';;
7685 BSD/OS*/4*)
7686 LDSHARED="gcc -shared"
7687 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007688 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007689 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007690 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007691 LDSHARED='$(CC) -shared'
7692 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007693 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007694 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007695 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007696 OpenBSD*)
7697 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7698 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007699 LDSHARED='$(CC) -shared $(CCSHARED)'
7700 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007701 else
7702 case `uname -r` in
7703 [01].* | 2.[0-7] | 2.[0-7].*)
7704 LDSHARED="ld -Bshareable ${LDFLAGS}"
7705 ;;
7706 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007707 LDSHARED='$(CC) -shared $(CCSHARED)'
7708 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007709 ;;
7710 esac
7711 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007712 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007713 LDSHARED='$(CC) -shared'
7714 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007715 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007716 if test "$GCC" = "yes" ; then
7717 LDSHARED='$(CC) -shared'
7718 LDCXXSHARED='$(CXX) -shared'
7719 else
7720 LDSHARED='$(CC) -G'
7721 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007722 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007723 SCO_SV*)
7724 LDSHARED='$(CC) -Wl,-G,-Bexport'
7725 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7726 CYGWIN*)
7727 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7728 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7729 atheos*)
7730 LDSHARED="gcc -shared"
7731 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732 *) LDSHARED="ld";;
7733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007734fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7736$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007737LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007738BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007739# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007740# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7742$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007743if test -z "$CCSHARED"
7744then
Guido van Rossum07397971997-04-29 21:49:50 +00007745 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007746 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007747 then CCSHARED="-fPIC";
7748 elif test `uname -p` = sparc;
7749 then CCSHARED="-xcode=pic32";
7750 else CCSHARED="-Kpic";
7751 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007752 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007753 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007754 else CCSHARED="+z";
7755 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007756 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007757 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007758 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007759 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007760 if test "$GCC" = "yes"
7761 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007762 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007763 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007764 SCO_SV*)
7765 if test "$GCC" = "yes"
7766 then CCSHARED="-fPIC"
7767 else CCSHARED="-Kpic -belf"
7768 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007769 IRIX*/6*) case $CC in
7770 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007771 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007772 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007773 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7777$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007778# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007779# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7781$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007782if test -z "$LINKFORSHARED"
7783then
Guido van Rossum07397971997-04-29 21:49:50 +00007784 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007785 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007786 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007787 LINKFORSHARED="-Wl,-E -Wl,+s";;
7788# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007789 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007790 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007791 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007793 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7794 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007795 # not used by the core itself but which needs to be in the core so
7796 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007797 # -prebind is no longer used, because it actually seems to give a
7798 # slowdown in stead of a speedup, maybe due to the large number of
7799 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007800
7801 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007802 if test "$enable_framework"
7803 then
Jack Jansenda49e192005-01-07 13:08:22 +00007804 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007805 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007806 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007807 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007808 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007809 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007810 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007811 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7812 then
7813 LINKFORSHARED="-Wl,--export-dynamic"
7814 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007815 SunOS/5*) case $CC in
7816 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007817 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007818 then
7819 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007820 fi;;
7821 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007822 CYGWIN*)
7823 if test $enable_shared = "no"
7824 then
7825 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7826 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007827 QNX*)
7828 # -Wl,-E causes the symbols to be added to the dynamic
7829 # symbol table so that they can be found when a module
7830 # is loaded. -N 2048K causes the stack size to be set
7831 # to 2048 kilobytes so that the stack doesn't overflow
7832 # when running test_compile.py.
7833 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007834 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007835fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7837$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007838
Michael W. Hudson54241132001-12-07 15:38:26 +00007839
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7842$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007843if test ! "$LIBRARY" = "$LDLIBRARY"
7844then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007845 case $ac_sys_system in
7846 CYGWIN*)
7847 # Cygwin needs CCSHARED when building extension DLLs
7848 # but not when building the interpreter DLL.
7849 CFLAGSFORSHARED='';;
7850 *)
7851 CFLAGSFORSHARED='$(CCSHARED)'
7852 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7855$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007856
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007857# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7858# library (with --enable-shared).
7859# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007860# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7861# if it is not required, since it creates a dependency of the shared library
7862# to LIBS. This, in turn, means that applications linking the shared libpython
7863# don't need to link LIBS explicitly. The default should be only changed
7864# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7867$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007868case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007869 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007870 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007871esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7873$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007874
7875
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7878$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007879if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881else
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007883LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887/* Override any GCC internal prototype to avoid an error.
7888 Use char because int might match the return type of a GCC
7889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890#ifdef __cplusplus
7891extern "C"
7892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007893char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007894int
7895main ()
7896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ;
7899 return 0;
7900}
7901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007907rm -f core conftest.err conftest.$ac_objext \
7908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7912$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007913if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 cat >>confdefs.h <<_ACEOF
7915#define HAVE_LIBDL 1
7916_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007918 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920fi
7921 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7923$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007924if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007928LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932/* Override any GCC internal prototype to avoid an error.
7933 Use char because int might match the return type of a GCC
7934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935#ifdef __cplusplus
7936extern "C"
7937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007938char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ;
7944 return 0;
7945}
7946_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7957$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007958if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 cat >>confdefs.h <<_ACEOF
7960#define HAVE_LIBDLD 1
7961_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007963 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965fi
7966 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007967
Ronald Oussoren79f90492009-01-02 10:44:46 +00007968# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007969if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7971$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007972if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007973 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007974else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007975 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007978
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979/* Override any GCC internal prototype to avoid an error.
7980 Use char because int might match the return type of a GCC
7981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982#ifdef __cplusplus
7983extern "C"
7984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007985char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007986int
7987main ()
7988{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 ;
7991 return 0;
7992}
7993_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994for ac_lib in '' pthread rt posix4; do
7995 if test -z "$ac_lib"; then
7996 ac_res="none required"
7997 else
7998 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008001 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02008006 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008007 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009done
Charles-François Natali97781b02011-07-22 23:43:42 +02008010if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012else
8013 ac_cv_search_sem_init=no
8014fi
8015rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008016LIBS=$ac_func_search_save_LIBS
8017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8019$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008023
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008024fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008025 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008026 # posix4 on Solaris 2.6
8027 # pthread (first!) on Linux
8028fi
8029
Martin v. Löwis19d17342003-06-14 21:03:05 +00008030# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8032$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008033if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008035else
8036 ac_check_lib_save_LIBS=$LIBS
8037LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008040
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041/* Override any GCC internal prototype to avoid an error.
8042 Use char because int might match the return type of a GCC
8043 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008044#ifdef __cplusplus
8045extern "C"
8046#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008047char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048int
8049main ()
8050{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008051return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008052 ;
8053 return 0;
8054}
8055_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008057 ac_cv_lib_intl_textdomain=yes
8058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061rm -f core conftest.err conftest.$ac_objext \
8062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008063LIBS=$ac_check_lib_save_LIBS
8064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8066$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008067if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008070
8071fi
8072
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008073
8074# checks for system dependent C++ extensions support
8075case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8077$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008080
Georg Brandl94800df2011-02-25 11:09:02 +00008081 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008085loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ;
8087 return 0;
8088}
Matthias Klosec511b472010-05-08 11:01:39 +00008089
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008092
Matthias Klosec511b472010-05-08 11:01:39 +00008093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
Matthias Klosec511b472010-05-08 11:01:39 +00008096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008098
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008099else
Matthias Klosec511b472010-05-08 11:01:39 +00008100
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008103
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105rm -f core conftest.err conftest.$ac_objext \
8106 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008107 *) ;;
8108esac
8109
Guido van Rossum70c7f481998-03-26 18:44:10 +00008110# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008111# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8113$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008114if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008115 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008116else
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008118LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008121
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122/* Override any GCC internal prototype to avoid an error.
8123 Use char because int might match the return type of a GCC
8124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008125#ifdef __cplusplus
8126extern "C"
8127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008128char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008129int
8130main ()
8131{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ;
8134 return 0;
8135}
8136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8147$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008148if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008149 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008151 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8153$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008154if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156else
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008158LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008161
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162/* Override any GCC internal prototype to avoid an error.
8163 Use char because int might match the return type of a GCC
8164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008165#ifdef __cplusplus
8166extern "C"
8167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008168char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008169int
8170main ()
8171{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ;
8174 return 0;
8175}
8176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182rm -f core conftest.err conftest.$ac_objext \
8183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8187$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008188if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008189 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008190fi
8191 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008192
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008193case "$ac_sys_system" in
8194BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8196$as_echo_n "checking for socket in -lnet... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008197if test "${ac_cv_lib_net_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008199else
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008201LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205/* Override any GCC internal prototype to avoid an error.
8206 Use char because int might match the return type of a GCC
8207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008208#ifdef __cplusplus
8209extern "C"
8210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008211char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008212int
8213main ()
8214{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ;
8217 return 0;
8218}
8219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008223 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008224fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008225rm -f core conftest.err conftest.$ac_objext \
8226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008227LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008228fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8230$as_echo "$ac_cv_lib_net_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008231if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008232 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233fi
8234 # BeOS
8235;;
8236esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008237
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8239$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8245$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008246LIBS="$withval $LIBS"
8247
8248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251fi
8252
Guido van Rossum7f43da71994-08-01 12:15:30 +00008253
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008254if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008255 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8256set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008259if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008261else
8262 case $PKG_CONFIG in
8263 [\\/]* | ?:[\\/]*)
8264 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8265 ;;
8266 *)
8267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270 IFS=$as_save_IFS
8271 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008273 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8274 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008276 break 2
8277 fi
8278done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008280IFS=$as_save_IFS
8281
8282 ;;
8283esac
8284fi
8285PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8286if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8288$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008292fi
8293
8294
8295fi
8296if test -z "$ac_cv_path_PKG_CONFIG"; then
8297 ac_pt_PKG_CONFIG=$PKG_CONFIG
8298 # Extract the first word of "pkg-config", so it can be a program name with args.
8299set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8301$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008302if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008304else
8305 case $ac_pt_PKG_CONFIG in
8306 [\\/]* | ?:[\\/]*)
8307 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8308 ;;
8309 *)
8310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311for as_dir in $PATH
8312do
8313 IFS=$as_save_IFS
8314 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8317 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008319 break 2
8320 fi
8321done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008323IFS=$as_save_IFS
8324
8325 ;;
8326esac
8327fi
8328ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8329if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8331$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8334$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008335fi
8336
8337 if test "x$ac_pt_PKG_CONFIG" = x; then
8338 PKG_CONFIG=""
8339 else
8340 case $cross_compiling:$ac_tool_warned in
8341yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008344ac_tool_warned=yes ;;
8345esac
8346 PKG_CONFIG=$ac_pt_PKG_CONFIG
8347 fi
8348else
8349 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8350fi
8351
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008352
8353# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8355$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008356
8357# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008359 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008360else
8361 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008362fi
8363
8364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8366$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008367
8368# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8370$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008371
8372# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008374 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008375else
8376 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008377fi
8378
8379
8380if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008381 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8382else
8383 LIBFFI_INCLUDEDIR=""
8384fi
8385
8386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8388$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008389
Benjamin Peterson867475c2009-04-29 20:36:25 +00008390# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8392$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008393
8394# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008396 withval=$with_dbmliborder;
8397if test x$with_dbmliborder = xyes
8398then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008399as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008400else
8401 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8402 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8403 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008404 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008405 fi
8406 done
8407fi
8408fi
8409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8411$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008412
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008413# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008414
8415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8417$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008420if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421 withval=$with_signal_module;
8422fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008423
8424
8425if test -z "$with_signal_module"
8426then with_signal_module="yes"
8427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8429$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008430
8431if test "${with_signal_module}" = "yes"; then
8432 USE_SIGNAL_MODULE=""
8433 SIGNAL_OBJS=""
8434else
8435 USE_SIGNAL_MODULE="#"
8436 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8437fi
8438
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008439# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008440
Barry Warsawc0d24d82000-06-29 16:12:00 +00008441USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8444$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008445
Guido van Rossumec2f0731997-01-22 20:54:01 +00008446
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008448if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008449 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8451$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008452LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008453if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008454 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008455fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459fi
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
8462# Templates for things AC_DEFINEd more than once.
8463# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008464
8465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8469$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473 withval=$with_threads;
8474fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008475
8476
Barry Warsawc0d24d82000-06-29 16:12:00 +00008477# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481 withval=$with_thread; with_threads=$with_thread
8482fi
8483
Barry Warsawc0d24d82000-06-29 16:12:00 +00008484
8485if test -z "$with_threads"
8486then with_threads="yes"
8487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8489$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008490
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008491
Barry Warsawc0d24d82000-06-29 16:12:00 +00008492if test "$with_threads" = "no"
8493then
8494 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008495elif test "$ac_cv_pthread_is_default" = yes
8496then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008498
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008499 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008501
8502 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008504elif test "$ac_cv_kpthread" = "yes"
8505then
8506 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008507 if test "$ac_cv_cxx_thread" = "yes"; then
8508 CXX="$CXX -Kpthread"
8509 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008511
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008512 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008513 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008514elif test "$ac_cv_kthread" = "yes"
8515then
8516 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008517 if test "$ac_cv_cxx_thread" = "yes"; then
8518 CXX="$CXX -Kthread"
8519 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008521
8522 posix_threads=yes
8523 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008524elif test "$ac_cv_pthread" = "yes"
8525then
8526 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008527 if test "$ac_cv_cxx_thread" = "yes"; then
8528 CXX="$CXX -pthread"
8529 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008531
8532 posix_threads=yes
8533 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008534else
8535 if test ! -z "$with_threads" -a -d "$with_threads"
8536 then LDFLAGS="$LDFLAGS -L$with_threads"
8537 fi
8538 if test ! -z "$withval" -a -d "$withval"
8539 then LDFLAGS="$LDFLAGS -L$withval"
8540 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008541
8542 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008543 # define _POSIX_THREADS in unistd.h. Some apparently don't
8544 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8546$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008548/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008549
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008550#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008551#ifdef _POSIX_THREADS
8552yes
8553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008554
8555_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008557 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008558 unistd_defines_pthreads=yes
8559else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008560 unistd_defines_pthreads=no
8561fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008562rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8565$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008567 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008568
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008569 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008570if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008577
8578 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008579 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008580else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008583if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008585
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008586 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008587
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008589$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008590
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008591 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008592else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8595$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008596
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008598if test "${with_pth+set}" = set; then :
8599 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8600$as_echo "$withval" >&6; }
8601 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
8603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008604$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008605
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008606 LIBS="-lpth $LIBS"
8607 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8610$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008611
8612 # Just looking for pthread_create in libpthread is not enough:
8613 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8614 # So we really have to include pthread.h, and then link.
8615 _libs=$LIBS
8616 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8618$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008621#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008622
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008623void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008627
8628pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ;
8630 return 0;
8631}
8632_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8636$as_echo "yes" >&6; }
8637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008638
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008639 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008640 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008641else
Martin v. Löwis11437992002-04-12 09:54:03 +00008642
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008643 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali97781b02011-07-22 23:43:42 +02008645if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008647
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008648 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008649 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008650else
Guido van Rossumad678af1998-10-02 14:42:15 +00008651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008652 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008653if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655
8656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008658
8659 THREADOBJ="Python/thread.o"
8660else
8661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008662 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02008663if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
8666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008667$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008668
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008669 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008670else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8673$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008674if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008675 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676else
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008678LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682/* Override any GCC internal prototype to avoid an error.
8683 Use char because int might match the return type of a GCC
8684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008685#ifdef __cplusplus
8686extern "C"
8687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008688char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008689int
8690main ()
8691{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 ;
8694 return 0;
8695}
8696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008700 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008702rm -f core conftest.err conftest.$ac_objext \
8703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008704LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8707$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008708if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008710
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008711 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008712 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008713 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008714else
Greg Steinadf63d62000-07-05 10:38:09 +00008715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8717$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008718if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008720else
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008722LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726/* Override any GCC internal prototype to avoid an error.
8727 Use char because int might match the return type of a GCC
8728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729#ifdef __cplusplus
8730extern "C"
8731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008732char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008733int
8734main ()
8735{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ;
8738 return 0;
8739}
8740_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008744 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008746rm -f core conftest.err conftest.$ac_objext \
8747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8751$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008752if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008755 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008756 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008757 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008758else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8761$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008762if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008763 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008764else
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008766LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770/* Override any GCC internal prototype to avoid an error.
8771 Use char because int might match the return type of a GCC
8772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773#ifdef __cplusplus
8774extern "C"
8775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008776char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 ;
8782 return 0;
8783}
8784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8795$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008796if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008798
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008799 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008800 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008801 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008802else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008803
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8805$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008806if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008808else
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008810LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814/* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817#ifdef __cplusplus
8818extern "C"
8819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008820char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821int
8822main ()
8823{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ;
8826 return 0;
8827}
8828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834rm -f core conftest.err conftest.$ac_objext \
8835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008836LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8839$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008840if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008842
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008843 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008844 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008845 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008846else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008847
Martin v. Löwis130fb172001-07-19 11:00:41 +00008848 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008849fi
8850
Guido van Rossum627b2d71993-12-24 10:39:16 +00008851
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008852fi
8853
Guido van Rossum0be3e491997-05-22 20:33:33 +00008854fi
8855
Guido van Rossum49545951997-12-02 19:28:29 +00008856fi
8857
Guido van Rossumb93a8621998-05-07 13:27:32 +00008858fi
8859
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008860
Michael W. Hudson54241132001-12-07 15:38:26 +00008861fi
8862
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008863
8864fi
8865
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867rm -f core conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869fi
8870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871fi
8872
8873
8874fi
8875
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008876
Michael W. Hudson54241132001-12-07 15:38:26 +00008877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8879$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008880if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008882else
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008884LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008887
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888/* Override any GCC internal prototype to avoid an error.
8889 Use char because int might match the return type of a GCC
8890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891#ifdef __cplusplus
8892extern "C"
8893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008894char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008895int
8896main ()
8897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ;
8900 return 0;
8901}
8902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908rm -f core conftest.err conftest.$ac_objext \
8909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8913$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008914if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008916
Martin v. Löwis130fb172001-07-19 11:00:41 +00008917 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008918 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008919 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008920fi
8921
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008922
Neal Norwitza978ab02002-11-02 16:58:05 +00008923 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8925$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008926if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008928else
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008930LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008933
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934/* Override any GCC internal prototype to avoid an error.
8935 Use char because int might match the return type of a GCC
8936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008937#ifdef __cplusplus
8938extern "C"
8939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008940char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
8943{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ;
8946 return 0;
8947}
8948_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008952 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954rm -f core conftest.err conftest.$ac_objext \
8955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8959$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008960if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008962
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008963 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008964 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008965 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008966fi
8967
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008968 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008969
Martin v. Löwis130fb172001-07-19 11:00:41 +00008970 if test "$USE_THREAD_MODULE" != "#"
8971 then
8972 # If the above checks didn't disable threads, (at least) OSF1
8973 # needs this '-threads' argument during linking.
8974 case $ac_sys_system in
8975 OSF1) LDLAST=-threads;;
8976 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008977 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008978fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008979
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008980if test "$posix_threads" = "yes"; then
8981 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008984
8985 fi
8986
8987 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8988 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008989 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008990$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008991
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008992 ;;
8993 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008995
8996 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008997 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00008999
9000 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009001 esac
9002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9004$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009005 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009009 ac_cv_pthread_system_supported=no
9010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009012/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009013#include <pthread.h>
9014 void *foo(void *parm) {
9015 return NULL;
9016 }
9017 main() {
9018 pthread_attr_t attr;
9019 pthread_t id;
9020 if (pthread_attr_init(&attr)) exit(-1);
9021 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9022 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9023 exit(0);
9024 }
9025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009026if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009027 ac_cv_pthread_system_supported=yes
9028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009033fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009034
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035
Guido van Rossum627b2d71993-12-24 10:39:16 +00009036fi
9037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9039$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009040 if test "$ac_cv_pthread_system_supported" = "yes"; then
9041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043
9044 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009045 for ac_func in pthread_sigmask
9046do :
9047 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali97781b02011-07-22 23:43:42 +02009048if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009049 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009051_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009052 case $ac_sys_system in
9053 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009056
9057 ;;
9058 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059fi
9060done
9061
9062fi
9063
9064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009066
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9068$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009070if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009072 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 ipv6=no
9076 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9078$as_echo "yes" >&6; }
9079 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080
9081 ipv6=yes
9082 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009087
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9089$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090 ipv6=no
9091
9092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009095 /* AF_INET6 available check */
9096#include <sys/types.h>
9097#include <sys/socket.h>
9098main()
9099{
9100 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9101 exit(1);
9102 else
9103 exit(0);
9104}
9105
Martin v. Löwis11437992002-04-12 09:54:03 +00009106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009107if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009108
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009111 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009113else
Matthias Klosec511b472010-05-08 11:01:39 +00009114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9121 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009122fi
9123
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009125if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9127$as_echo_n "checking if RFC2553 API is available... " >&6; }
9128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009130
9131 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009132#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009133int
9134main ()
9135{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009136struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009137 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ;
9139 return 0;
9140}
Matthias Klosec511b472010-05-08 11:01:39 +00009141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009144
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009147 ipv6=yes
9148
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009149else
Matthias Klosec511b472010-05-08 11:01:39 +00009150
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009153 ipv6=no
9154
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009157fi
9158
9159if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009160 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009161
9162fi
9163
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164fi
9165
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009166
9167ipv6type=unknown
9168ipv6lib=none
9169ipv6trylibc=no
9170
9171if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9173$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009174 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9175 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009176 case $i in
9177 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181#include <netinet/in.h>
9182#ifdef IPV6_INRIA_VERSION
9183yes
9184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009187 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009188 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009190rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009191
9192 ;;
9193 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009196
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009197#include <netinet/in.h>
9198#ifdef __KAME__
9199yes
9200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009201_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009203 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009204 ipv6type=$i;
9205 ipv6lib=inet6
9206 ipv6libdir=/usr/local/v6/lib
9207 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009208fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009209rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009210
9211 ;;
9212 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009214/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009215
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009216#include <features.h>
9217#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9218yes
9219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009220_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009223 ipv6type=$i;
9224 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009225fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009226rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009227
9228 ;;
9229 linux-inet6)
9230 if test -d /usr/inet6; then
9231 ipv6type=$i
9232 ipv6lib=inet6
9233 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009234 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009235 fi
9236 ;;
9237 solaris)
9238 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009239 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240 ipv6type=$i
9241 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009242 fi
9243 fi
9244 ;;
9245 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249#include <sys/param.h>
9250#ifdef _TOSHIBA_INET6
9251yes
9252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009256 ipv6type=$i;
9257 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009258 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261
9262 ;;
9263 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009266
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267#include </usr/local/v6/include/sys/v6config.h>
9268#ifdef __V6D__
9269yes
9270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274 ipv6type=$i;
9275 ipv6lib=v6;
9276 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009277 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009279rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280
9281 ;;
9282 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009286#include <sys/param.h>
9287#ifdef _ZETA_MINAMI_INET6
9288yes
9289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009290_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009293 ipv6type=$i;
9294 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009295 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009296fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009297rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298
9299 ;;
9300 esac
9301 if test "$ipv6type" != "unknown"; then
9302 break
9303 fi
9304 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9306$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009307fi
9308
9309if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9310 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9311 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9312 echo "using lib$ipv6lib"
9313 else
9314 if test $ipv6trylibc = "yes"; then
9315 echo "using libc"
9316 else
9317 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9318 echo "You need to fetch lib$ipv6lib.a from appropriate"
9319 echo 'ipv6 kit and compile beforehand.'
9320 exit 1
9321 fi
9322 fi
9323fi
9324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9326$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009328/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009329
9330 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009331int
9332main ()
9333{
9334FSIORefNum fRef = 0
9335 ;
9336 return 0;
9337}
Mark Dickinson0712b562010-05-08 19:13:21 +00009338
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009340if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009341
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009344
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9346$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009347
Mark Dickinson0712b562010-05-08 19:13:21 +00009348else
9349
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
9352
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009353fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9355
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009356# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9358$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009359
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 withval=$with_doc_strings;
9363fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009364
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365
9366if test -z "$with_doc_strings"
9367then with_doc_strings="yes"
9368fi
9369if test "$with_doc_strings" != "no"
9370then
9371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009372$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009373
9374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9376$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009377
Neil Schemenauera35c6882001-02-27 04:45:05 +00009378# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9380$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009381
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009385if test "$withval" != no
9386then
9387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9391$as_echo "yes" >&6; }
9392else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009394fi
9395else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398fi
9399
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009400
9401# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9403$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009404
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009406if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 withval=$with_pymalloc;
9408fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009409
Neil Schemenauera35c6882001-02-27 04:45:05 +00009410
Neil Schemenauer16c22972002-03-22 15:34:49 +00009411if test -z "$with_pymalloc"
9412then with_pymalloc="yes"
9413fi
9414if test "$with_pymalloc" != "no"
9415then
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009418
9419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9421$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009422
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009423# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9425$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009426
9427# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009429 withval=$with_valgrind;
9430else
9431 with_valgrind=no
9432fi
9433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9435$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009436if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02009438if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009441
9442else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009443 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009444
9445fi
9446
9447
9448fi
9449
Barry Warsawef82cd72000-06-30 16:21:01 +00009450# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9452$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009455if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009457if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009458then
9459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9463$as_echo "yes" >&6; }
9464else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9465$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009466fi
9467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470fi
9471
Barry Warsawef82cd72000-06-30 16:21:01 +00009472
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009473# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009474
Guido van Rossum98935bf2001-09-05 19:13:16 +00009475DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009476
Guido van Rossume97ee181999-12-20 21:27:22 +00009477# the dlopen() function means we might want to use dynload_shlib.o. some
9478# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009479for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480do :
9481 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali97781b02011-07-22 23:43:42 +02009482if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009485_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009486
Guido van Rossume97ee181999-12-20 21:27:22 +00009487fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009488done
Guido van Rossume97ee181999-12-20 21:27:22 +00009489
Michael W. Hudson54241132001-12-07 15:38:26 +00009490
Guido van Rossume97ee181999-12-20 21:27:22 +00009491# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9492# loading of modules.
9493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9495$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009496if test -z "$DYNLOADFILE"
9497then
9498 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009499 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9500 if test "$ac_cv_func_dlopen" = yes
9501 then DYNLOADFILE="dynload_shlib.o"
9502 else DYNLOADFILE="dynload_aix.o"
9503 fi
9504 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009505 BeOS*) DYNLOADFILE="dynload_beos.o";;
9506 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009507 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9508 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009509 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009510 *)
9511 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9512 # out any dynamic loading
9513 if test "$ac_cv_func_dlopen" = yes
9514 then DYNLOADFILE="dynload_shlib.o"
9515 else DYNLOADFILE="dynload_stub.o"
9516 fi
9517 ;;
9518 esac
9519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9521$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009522if test "$DYNLOADFILE" != "dynload_stub.o"
9523then
Martin v. Löwis11437992002-04-12 09:54:03 +00009524
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009526
9527fi
9528
Neil Schemenauer4e425612001-06-19 15:44:15 +00009529# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9530
Michael W. Hudson54241132001-12-07 15:38:26 +00009531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9533$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009534if test -z "$MACHDEP_OBJS"
9535then
Jack Jansene578a632001-08-15 01:27:14 +00009536 MACHDEP_OBJS=$extra_machdep_objs
9537else
9538 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9541$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009542
Guido van Rossum627b2d71993-12-24 10:39:16 +00009543# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009544for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9545 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009546 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009547 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009548 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009549 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009550 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009551 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9552 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009553 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009554 setlocale setregid setreuid setresuid setresgid \
9555 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009556 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009557 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009558 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559do :
9560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009565_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009567fi
9568done
9569
Michael W. Hudson54241132001-12-07 15:38:26 +00009570
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009571# For some functions, having a definition is not sufficient, since
9572# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9574$as_echo_n "checking for chroot... " >&6; }
9575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009577#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578int
9579main ()
9580{
9581void *x=chroot
9582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009589
Matthias Klosec511b472010-05-08 11:01:39 +00009590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009595
9596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9599$as_echo_n "checking for link... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009603int
9604main ()
9605{
9606void *x=link
9607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009614
Matthias Klosec511b472010-05-08 11:01:39 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009620
9621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9624$as_echo_n "checking for symlink... " >&6; }
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009627#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009628int
9629main ()
9630{
9631void *x=symlink
9632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
Matthias Klosec511b472010-05-08 11:01:39 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009645
9646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9649$as_echo_n "checking for fchdir... " >&6; }
9650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009652#include <unistd.h>
9653int
9654main ()
9655{
9656void *x=fchdir
9657 ;
9658 return 0;
9659}
9660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009664
Matthias Klosec511b472010-05-08 11:01:39 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009670
9671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9674$as_echo_n "checking for fsync... " >&6; }
9675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009677#include <unistd.h>
9678int
9679main ()
9680{
9681void *x=fsync
9682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009687
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009689
Matthias Klosec511b472010-05-08 11:01:39 +00009690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009695
9696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9699$as_echo_n "checking for fdatasync... " >&6; }
9700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009702#include <unistd.h>
9703int
9704main ()
9705{
9706void *x=fdatasync
9707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
Matthias Klosec511b472010-05-08 11:01:39 +00009715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9719$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009720
9721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9724$as_echo_n "checking for epoll... " >&6; }
9725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009726/* end confdefs.h. */
9727#include <sys/epoll.h>
9728int
9729main ()
9730{
9731void *x=epoll_create
9732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009737
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009739
Matthias Klosec511b472010-05-08 11:01:39 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009745
9746fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9749$as_echo_n "checking for kqueue... " >&6; }
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009751/* end confdefs.h. */
9752
9753#include <sys/types.h>
9754#include <sys/event.h>
9755
9756int
9757main ()
9758{
9759int x=kqueue()
9760 ;
9761 return 0;
9762}
9763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009766$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009767
Matthias Klosec511b472010-05-08 11:01:39 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009769$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009773
9774fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009776# On some systems (eg. FreeBSD 5), we would find a definition of the
9777# functions ctermid_r, setgroups in the library, but no prototype
9778# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9779# address to avoid compiler warnings and potential miscompilations
9780# because of the missing prototypes.
9781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9783$as_echo_n "checking for ctermid_r... " >&6; }
9784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009786
Martin v. Löwisd5843682002-11-21 20:41:28 +00009787#include <stdio.h>
9788
Martin v. Löwisd5843682002-11-21 20:41:28 +00009789int
9790main ()
9791{
9792void* p = ctermid_r
9793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009797if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009798
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009800
Matthias Klosec511b472010-05-08 11:01:39 +00009801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009803else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009806
9807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809
Antoine Pitroub170f172010-09-10 18:47:36 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9811$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009812if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009813 $as_echo_n "(cached) " >&6
9814else
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009817#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009818int
9819main ()
9820{
9821void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009822
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009828 ac_cv_flock_decl=yes
9829else
9830 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009831
9832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009834
Antoine Pitroub170f172010-09-10 18:47:36 +00009835fi
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9837$as_echo "$ac_cv_flock_decl" >&6; }
9838if test "x${ac_cv_flock_decl}" = xyes; then
9839 for ac_func in flock
9840do :
9841 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali97781b02011-07-22 23:43:42 +02009842if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009843 cat >>confdefs.h <<_ACEOF
9844#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009845_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009846
Antoine Pitrou85729812010-09-07 14:55:24 +00009847else
Antoine Pitroub170f172010-09-10 18:47:36 +00009848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009849$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009850if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009851 $as_echo_n "(cached) " >&6
9852else
9853 ac_check_lib_save_LIBS=$LIBS
9854LIBS="-lbsd $LIBS"
9855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856/* end confdefs.h. */
9857
9858/* Override any GCC internal prototype to avoid an error.
9859 Use char because int might match the return type of a GCC
9860 builtin and then its argument prototype would still apply. */
9861#ifdef __cplusplus
9862extern "C"
9863#endif
9864char flock ();
9865int
9866main ()
9867{
9868return flock ();
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873if ac_fn_c_try_link "$LINENO"; then :
9874 ac_cv_lib_bsd_flock=yes
9875else
9876 ac_cv_lib_bsd_flock=no
9877fi
9878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
9880LIBS=$ac_check_lib_save_LIBS
9881fi
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9883$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009884if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009885 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009886
9887
9888$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9889
9890
9891fi
9892
9893
9894fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009895done
9896
Antoine Pitrou85729812010-09-07 14:55:24 +00009897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9900$as_echo_n "checking for getpagesize... " >&6; }
9901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009903
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009904#include <unistd.h>
9905
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009906int
9907main ()
9908{
9909void* p = getpagesize
9910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009917
Matthias Klosec511b472010-05-08 11:01:39 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009923
9924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009926
Charles-François Natali93a11752011-11-27 13:01:35 +01009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9928$as_echo_n "checking for broken unsetenv... " >&6; }
9929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9930/* end confdefs.h. */
9931
9932#include <stdlib.h>
9933
9934int
9935main ()
9936{
9937int res = unsetenv("DUMMY")
9938 ;
9939 return 0;
9940}
9941_ACEOF
9942if ac_fn_c_try_compile "$LINENO"; then :
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945else
9946
9947$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9948
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9950$as_echo "yes" >&6; }
9951
9952fi
9953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9954
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009955for ac_prog in true
9956do
9957 # Extract the first word of "$ac_prog", so it can be a program name with args.
9958set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9960$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009961if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963else
9964 if test -n "$TRUE"; then
9965 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9966else
9967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9968for as_dir in $PATH
9969do
9970 IFS=$as_save_IFS
9971 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973 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 +00009974 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975 $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 +00009976 break 2
9977 fi
9978done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009979 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009980IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009981
9982fi
9983fi
9984TRUE=$ac_cv_prog_TRUE
9985if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9987$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9990$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009991fi
9992
Martin v. Löwiseba40652007-08-30 20:10:57 +00009993
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009994 test -n "$TRUE" && break
9995done
9996test -n "$TRUE" || TRUE="/bin/true"
9997
9998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10000$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010001if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010003else
10004 ac_check_lib_save_LIBS=$LIBS
10005LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010008
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009/* Override any GCC internal prototype to avoid an error.
10010 Use char because int might match the return type of a GCC
10011 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010012#ifdef __cplusplus
10013extern "C"
10014#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010015char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010016int
10017main ()
10018{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010019return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010025 ac_cv_lib_c_inet_aton=yes
10026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029rm -f core conftest.err conftest.$ac_objext \
10030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010031LIBS=$ac_check_lib_save_LIBS
10032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10034$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010035if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010036 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10039$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010040if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010042else
10043 ac_check_lib_save_LIBS=$LIBS
10044LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010047
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048/* Override any GCC internal prototype to avoid an error.
10049 Use char because int might match the return type of a GCC
10050 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010051#ifdef __cplusplus
10052extern "C"
10053#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010054char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010055int
10056main ()
10057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010059 ;
10060 return 0;
10061}
10062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010064 ac_cv_lib_resolv_inet_aton=yes
10065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010066 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068rm -f core conftest.err conftest.$ac_objext \
10069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010070LIBS=$ac_check_lib_save_LIBS
10071fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10073$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010074if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010075 cat >>confdefs.h <<_ACEOF
10076#define HAVE_LIBRESOLV 1
10077_ACEOF
10078
10079 LIBS="-lresolv $LIBS"
10080
10081fi
10082
10083
10084fi
10085
10086
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010087# On Tru64, chflags seems to be present, but calling it will
10088# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10090$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010091if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010092 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010095 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010098/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010099
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010100#include <sys/stat.h>
10101#include <unistd.h>
10102int main(int argc, char*argv[])
10103{
10104 if(chflags(argv[0], 0) != 0)
10105 return 1;
10106 return 0;
10107}
Ned Deily43e10542011-06-27 23:41:53 -070010108
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010109_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010111 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010114fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10116 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010117fi
10118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10122$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010123if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010125if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010126 ac_cv_have_chflags="yes"
10127else
10128 ac_cv_have_chflags="no"
10129fi
10130
10131fi
10132if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010134$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010135
10136fi
10137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10139$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010140if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010144 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010147/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010148
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010149#include <sys/stat.h>
10150#include <unistd.h>
10151int main(int argc, char*argv[])
10152{
10153 if(lchflags(argv[0], 0) != 0)
10154 return 1;
10155 return 0;
10156}
Ned Deily43e10542011-06-27 23:41:53 -070010157
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010160 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166fi
10167
10168
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10171$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010172if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010174if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010175 ac_cv_have_lchflags="yes"
10176else
10177 ac_cv_have_lchflags="no"
10178fi
10179
10180fi
10181if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010184
10185fi
10186
Ronald Oussorenf8752642006-07-06 10:13:35 +000010187case $ac_sys_system/$ac_sys_release in
10188Darwin/*)
10189 _CUR_CFLAGS="${CFLAGS}"
10190 _CUR_LDFLAGS="${LDFLAGS}"
10191 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10192 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10193 ;;
10194esac
10195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10197$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010198if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010200else
10201 ac_check_lib_save_LIBS=$LIBS
10202LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010204/* end confdefs.h. */
10205
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010209#ifdef __cplusplus
10210extern "C"
10211#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010212char inflateCopy ();
10213int
10214main ()
10215{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010216return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010222 ac_cv_lib_z_inflateCopy=yes
10223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010224 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226rm -f core conftest.err conftest.$ac_objext \
10227 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010228LIBS=$ac_check_lib_save_LIBS
10229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10231$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010232if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010235
10236fi
10237
10238
Ronald Oussorenf8752642006-07-06 10:13:35 +000010239case $ac_sys_system/$ac_sys_release in
10240Darwin/*)
10241 CFLAGS="${_CUR_CFLAGS}"
10242 LDFLAGS="${_CUR_LDFLAGS}"
10243 ;;
10244esac
10245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10247$as_echo_n "checking for hstrerror... " >&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öwise9416172003-05-03 10:12:45 +000010251#include <netdb.h>
10252
Martin v. Löwise9416172003-05-03 10:12:45 +000010253int
10254main ()
10255{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010256void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010257 ;
10258 return 0;
10259}
10260_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010264
Matthias Klosec511b472010-05-08 11:01:39 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010270
10271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272rm -f core conftest.err conftest.$ac_objext \
10273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10276$as_echo_n "checking for inet_aton... " >&6; }
10277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010279
Martin v. Löwis86d66262006-02-17 08:40:11 +000010280#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010281#include <sys/socket.h>
10282#include <netinet/in.h>
10283#include <arpa/inet.h>
10284
Martin v. Löwise9416172003-05-03 10:12:45 +000010285int
10286main ()
10287{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010288void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010294
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010296
Matthias Klosec511b472010-05-08 11:01:39 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010302
10303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304rm -f core conftest.err conftest.$ac_objext \
10305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10308$as_echo_n "checking for inet_pton... " >&6; }
10309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010311
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010312#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010313#include <sys/socket.h>
10314#include <netinet/in.h>
10315#include <arpa/inet.h>
10316
Martin v. Löwise9416172003-05-03 10:12:45 +000010317int
10318main ()
10319{
10320void* p = inet_pton
10321 ;
10322 return 0;
10323}
10324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010328
Matthias Klosec511b472010-05-08 11:01:39 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010334
10335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010337
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010338# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10340$as_echo_n "checking for setgroups... " >&6; }
10341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010343
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010344#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010345#ifdef HAVE_GRP_H
10346#include <grp.h>
10347#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010348
Martin v. Löwisd5843682002-11-21 20:41:28 +000010349int
10350main ()
10351{
10352void* p = setgroups
10353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010360
Matthias Klosec511b472010-05-08 11:01:39 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010366
10367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010370# check for openpty and forkpty
10371
10372for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373do :
10374 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010375if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010378_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10382$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010383if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010387LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390
Martin v. Löwiseba40652007-08-30 20:10:57 +000010391/* Override any GCC internal prototype to avoid an error.
10392 Use char because int might match the return type of a GCC
10393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010397char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398int
10399main ()
10400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010411rm -f core conftest.err conftest.$ac_objext \
10412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010413LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10416$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010417if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10422$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010423if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010425else
10426 ac_check_lib_save_LIBS=$LIBS
10427LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010429/* end confdefs.h. */
10430
Martin v. Löwiseba40652007-08-30 20:10:57 +000010431/* Override any GCC internal prototype to avoid an error.
10432 Use char because int might match the return type of a GCC
10433 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010434#ifdef __cplusplus
10435extern "C"
10436#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010437char openpty ();
10438int
10439main ()
10440{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010447 ac_cv_lib_bsd_openpty=yes
10448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010450fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451rm -f core conftest.err conftest.$ac_objext \
10452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010453LIBS=$ac_check_lib_save_LIBS
10454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10456$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010457if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010459 LIBS="$LIBS -lbsd"
10460fi
10461
10462
10463fi
10464
Fred Drake8cef4cf2000-06-28 16:40:38 +000010465
10466fi
10467done
10468
10469for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010470do :
10471 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010472if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010475_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010476
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10479$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010480if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010482else
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488/* Override any GCC internal prototype to avoid an error.
10489 Use char because int might match the return type of a GCC
10490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491#ifdef __cplusplus
10492extern "C"
10493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010494char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495int
10496main ()
10497{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010498return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010505else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010507fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010510LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10513$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010514if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010516 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10519$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010520if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010522else
10523 ac_check_lib_save_LIBS=$LIBS
10524LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010526/* end confdefs.h. */
10527
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528/* Override any GCC internal prototype to avoid an error.
10529 Use char because int might match the return type of a GCC
10530 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010531#ifdef __cplusplus
10532extern "C"
10533#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010534char forkpty ();
10535int
10536main ()
10537{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010539 ;
10540 return 0;
10541}
10542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010544 ac_cv_lib_bsd_forkpty=yes
10545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010547fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010548rm -f core conftest.err conftest.$ac_objext \
10549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010550LIBS=$ac_check_lib_save_LIBS
10551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10553$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010554if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010556 LIBS="$LIBS -lbsd"
10557fi
10558
10559
10560fi
10561
Fred Drake8cef4cf2000-06-28 16:40:38 +000010562
10563fi
10564done
10565
Jack Jansendd19cf82001-12-06 22:36:17 +000010566
Brett Cannonaa5778d2008-03-18 04:09:00 +000010567# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010568for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010569do :
10570 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali97781b02011-07-22 23:43:42 +020010571if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010572 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010574_ACEOF
10575
10576fi
10577done
10578
10579
Michael W. Hudson54241132001-12-07 15:38:26 +000010580# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010581for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010582do :
10583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10584ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010585if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591done
10592
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010594ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali97781b02011-07-22 23:43:42 +020010595if test "x$ac_cv_func_dup2" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010596 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010597
Martin v. Löwis1142de32002-03-29 16:28:31 +000010598else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010599 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010600 *" dup2.$ac_objext "* ) ;;
10601 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010603esac
10604
Martin v. Löwis1142de32002-03-29 16:28:31 +000010605fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010606
10607ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali97781b02011-07-22 23:43:42 +020010608if test "x$ac_cv_func_getcwd" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010609 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10610
10611else
10612 case " $LIBOBJS " in
10613 *" getcwd.$ac_objext "* ) ;;
10614 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10615 ;;
10616esac
10617
10618fi
10619
10620ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali97781b02011-07-22 23:43:42 +020010621if test "x$ac_cv_func_strdup" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010622 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10623
10624else
10625 case " $LIBOBJS " in
10626 *" strdup.$ac_objext "* ) ;;
10627 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10628 ;;
10629esac
10630
10631fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010632
10633
10634for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635do :
10636 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010637if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010644int
10645main ()
10646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010655
Guido van Rossum627b2d71993-12-24 10:39:16 +000010656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010658
Guido van Rossum627b2d71993-12-24 10:39:16 +000010659fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010660done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661
Jack Jansen150753c2003-03-29 22:07:47 +000010662for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663do :
10664 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010665if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010666 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010667#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010670/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010671#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010672int
10673main ()
10674{
10675setpgrp(0,0);
10676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010683
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010686
10687fi
10688done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010689
Thomas Wouters3a584202000-08-05 23:28:51 +000010690for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691do :
10692 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali97781b02011-07-22 23:43:42 +020010693if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010696_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010698/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ;
10705 return 0;
10706}
10707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010708if ac_fn_c_try_compile "$LINENO"; then :
10709
Guido van Rossum627b2d71993-12-24 10:39:16 +000010710else
Skip Montanaro6dead952003-09-25 14:50:04 +000010711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010713
Martin v. Löwis11437992002-04-12 09:54:03 +000010714
Guido van Rossum627b2d71993-12-24 10:39:16 +000010715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010719done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010720
Michael W. Hudson54241132001-12-07 15:38:26 +000010721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10723$as_echo_n "checking for major... " >&6; }
10724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010726
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010727#if defined(MAJOR_IN_MKDEV)
10728#include <sys/mkdev.h>
10729#elif defined(MAJOR_IN_SYSMACROS)
10730#include <sys/sysmacros.h>
10731#else
10732#include <sys/types.h>
10733#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010734
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010735int
10736main ()
10737{
10738
10739 makedev(major(0),minor(0));
10740
10741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010746
10747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010748$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010749
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10751$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010752
10753else
Skip Montanaro6dead952003-09-25 14:50:04 +000010754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010757
10758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759rm -f core conftest.err conftest.$ac_objext \
10760 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010761
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010762# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010763# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10765$as_echo_n "checking for getaddrinfo... " >&6; }
10766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010768
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010769#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010770#include <sys/socket.h>
10771#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010772#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010773
Martin v. Löwis11437992002-04-12 09:54:03 +000010774int
10775main ()
10776{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010777getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010783 have_getaddrinfo=yes
10784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010787rm -f core conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10790$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010791if test $have_getaddrinfo = yes
10792then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10794$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010795 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010798 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010799 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010803
10804#include <sys/types.h>
10805#include <netdb.h>
10806#include <string.h>
10807#include <sys/socket.h>
10808#include <netinet/in.h>
10809
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010810int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010811{
10812 int passive, gaierr, inet4 = 0, inet6 = 0;
10813 struct addrinfo hints, *ai, *aitop;
10814 char straddr[INET6_ADDRSTRLEN], strport[16];
10815
10816 for (passive = 0; passive <= 1; passive++) {
10817 memset(&hints, 0, sizeof(hints));
10818 hints.ai_family = AF_UNSPEC;
10819 hints.ai_flags = passive ? AI_PASSIVE : 0;
10820 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010821 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010822 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10823 (void)gai_strerror(gaierr);
10824 goto bad;
10825 }
10826 for (ai = aitop; ai; ai = ai->ai_next) {
10827 if (ai->ai_addr == NULL ||
10828 ai->ai_addrlen == 0 ||
10829 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10830 straddr, sizeof(straddr), strport, sizeof(strport),
10831 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10832 goto bad;
10833 }
10834 switch (ai->ai_family) {
10835 case AF_INET:
10836 if (strcmp(strport, "54321") != 0) {
10837 goto bad;
10838 }
10839 if (passive) {
10840 if (strcmp(straddr, "0.0.0.0") != 0) {
10841 goto bad;
10842 }
10843 } else {
10844 if (strcmp(straddr, "127.0.0.1") != 0) {
10845 goto bad;
10846 }
10847 }
10848 inet4++;
10849 break;
10850 case AF_INET6:
10851 if (strcmp(strport, "54321") != 0) {
10852 goto bad;
10853 }
10854 if (passive) {
10855 if (strcmp(straddr, "::") != 0) {
10856 goto bad;
10857 }
10858 } else {
10859 if (strcmp(straddr, "::1") != 0) {
10860 goto bad;
10861 }
10862 }
10863 inet6++;
10864 break;
10865 case AF_UNSPEC:
10866 goto bad;
10867 break;
10868 default:
10869 /* another family support? */
10870 break;
10871 }
10872 }
10873 }
10874
10875 if (!(inet4 == 0 || inet4 == 2))
10876 goto bad;
10877 if (!(inet6 == 0 || inet6 == 2))
10878 goto bad;
10879
10880 if (aitop)
10881 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010882 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010883
10884 bad:
10885 if (aitop)
10886 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010887 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010888}
10889
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010892 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010899
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010900fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010901
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010903
Benjamin Peterson75fed812010-11-01 01:47:19 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10905$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10906
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010907if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010908then
10909 if test $ipv6 = yes
10910 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911 echo 'Fatal: You must get working getaddrinfo() function.'
10912 echo ' or you can specify "--disable-ipv6"'.
10913 exit 1
10914 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010915else
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010917$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010918
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010919fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010920
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010921for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922do :
10923 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali97781b02011-07-22 23:43:42 +020010924if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010927_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010928
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929fi
10930done
10931
Michael W. Hudson54241132001-12-07 15:38:26 +000010932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010933# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10935$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010936if test "${ac_cv_header_time+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010941#include <sys/types.h>
10942#include <sys/time.h>
10943#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
10948if ((struct tm *) 0)
10949return 0;
10950 ;
10951 return 0;
10952}
10953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010954if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010955 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010957 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10962$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010963if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010966
10967fi
10968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10970$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010971if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976#include <sys/types.h>
10977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Martin v. Löwis11437992002-04-12 09:54:03 +000010979int
10980main ()
10981{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010982struct tm tm;
10983 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010984 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ;
10986 return 0;
10987}
10988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990 ac_cv_struct_tm=time.h
10991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10997$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010998if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011001
11002fi
11003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004ac_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 +000011005#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007"
Charles-François Natali97781b02011-07-22 23:43:42 +020011008if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011009
11010cat >>confdefs.h <<_ACEOF
11011#define HAVE_STRUCT_TM_TM_ZONE 1
11012_ACEOF
11013
11014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016
Martin v. Löwis11437992002-04-12 09:54:03 +000011017if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020
11021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11023"
Charles-François Natali97781b02011-07-22 23:43:42 +020011024if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028fi
11029
Martin v. Löwiseba40652007-08-30 20:10:57 +000011030cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011032_ACEOF
11033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11035$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011036if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011041#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011042#if !HAVE_DECL_TZNAME
11043extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Martin v. Löwis11437992002-04-12 09:54:03 +000011046int
11047main ()
11048{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011049return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055 ac_cv_var_tzname=yes
11056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011058fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059rm -f core conftest.err conftest.$ac_objext \
11060 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11063$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011064 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068 fi
11069fi
11070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011072if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011073
11074cat >>confdefs.h <<_ACEOF
11075#define HAVE_STRUCT_STAT_ST_RDEV 1
11076_ACEOF
11077
11078
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011079fi
11080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011082if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011083
Martin v. Löwis11437992002-04-12 09:54:03 +000011084cat >>confdefs.h <<_ACEOF
11085#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11086_ACEOF
11087
11088
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011089fi
11090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011092if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011093
11094cat >>confdefs.h <<_ACEOF
11095#define HAVE_STRUCT_STAT_ST_FLAGS 1
11096_ACEOF
11097
11098
11099fi
11100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011102if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011103
11104cat >>confdefs.h <<_ACEOF
11105#define HAVE_STRUCT_STAT_ST_GEN 1
11106_ACEOF
11107
11108
11109fi
11110
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011112if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011113
11114cat >>confdefs.h <<_ACEOF
11115#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11116_ACEOF
11117
11118
11119fi
11120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020011122if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011123
Martin v. Löwis11437992002-04-12 09:54:03 +000011124cat >>confdefs.h <<_ACEOF
11125#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11126_ACEOF
11127
11128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011130
11131else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011133 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11135 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011136esac
11137
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011138fi
11139
Michael W. Hudson54241132001-12-07 15:38:26 +000011140
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11143$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011144if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146else
Matthias Klosec511b472010-05-08 11:01:39 +000011147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011149/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011150#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011151int
11152main ()
11153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011154return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011160 ac_cv_header_time_altzone=yes
11161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011165
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166fi
11167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11169$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
11174fi
11175
Guido van Rossumda88dad1995-01-26 00:46:29 +000011176was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11178$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011181
11182#include <sys/types.h>
11183#include <sys/select.h>
11184#include <sys/time.h>
11185
Martin v. Löwis11437992002-04-12 09:54:03 +000011186int
11187main ()
11188{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189;
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
11196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011199 was_it_defined=yes
11200
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11204$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11207$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011208if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011210else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011213#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011217struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ;
11219 return 0;
11220}
11221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011223 ac_cv_struct_addrinfo=yes
11224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228fi
11229
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11231$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235
11236fi
11237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11239$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011240if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011245
11246# include <sys/types.h>
11247# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011248int
11249main ()
11250{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011251struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011257 ac_cv_struct_sockaddr_storage=yes
11258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11262fi
11263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11265$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011269
11270fi
11271
Guido van Rossum627b2d71993-12-24 10:39:16 +000011272# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11275$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011276if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011281$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011282int
11283main ()
11284{
11285static int test_array [1 - 2 * !(((char) -1) < 0)];
11286test_array [0] = 0
11287
11288 ;
11289 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011290}
Martin v. Löwis11437992002-04-12 09:54:03 +000011291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011293 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11300$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011303
11304fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11307$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011308if test "${ac_cv_c_const+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314int
11315main ()
11316{
11317/* FIXME: Include the comments suggested by Paul. */
11318#ifndef __cplusplus
11319 /* Ultrix mips cc rejects this. */
11320 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011321 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323 char const *const *pcpcc;
11324 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 /* NEC SVR4.0.2 mips cc rejects this. */
11326 struct point {int x, y;};
11327 static struct point const zero = {0,0};
11328 /* AIX XL C 1.02.0.0 rejects this.
11329 It does not let you subtract one const X* pointer from another in
11330 an arm of an if-expression whose if-part is not a constant
11331 expression */
11332 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011333 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335 ++pcpcc;
11336 ppc = (char**) pcpcc;
11337 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 { /* SCO 3.2v4 cc rejects this. */
11339 char *t;
11340 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011341
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011343 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 }
11345 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11346 int x[] = {25, 17};
11347 const int *foo = &x[0];
11348 ++foo;
11349 }
11350 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11351 typedef const int *iptr;
11352 iptr p = 0;
11353 ++p;
11354 }
11355 { /* AIX XL C 1.02.0.0 rejects this saying
11356 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11357 struct s { int j; const int *ap[3]; };
11358 struct s *b; b->j = 5;
11359 }
11360 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11361 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011364 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011365#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011366
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 ;
11368 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011369}
Martin v. Löwis11437992002-04-12 09:54:03 +000011370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372 ac_cv_c_const=yes
11373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011377fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11379$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011382$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383
11384fi
11385
Michael W. Hudson54241132001-12-07 15:38:26 +000011386
Guido van Rossumda88dad1995-01-26 00:46:29 +000011387works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11389$as_echo_n "checking for working volatile... " >&6; }
11390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011402 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011403else
Skip Montanaro6dead952003-09-25 14:50:04 +000011404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011406
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011407
Guido van Rossum627b2d71993-12-24 10:39:16 +000011408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11411$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011412
Guido van Rossumda88dad1995-01-26 00:46:29 +000011413works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11415$as_echo_n "checking for working signed char... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011417/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011422signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011428 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011429else
Skip Montanaro6dead952003-09-25 14:50:04 +000011430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011431$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011432
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011433
Guido van Rossum7f43da71994-08-01 12:15:30 +000011434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11437$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011438
Guido van Rossumda88dad1995-01-26 00:46:29 +000011439have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11441$as_echo_n "checking for prototypes... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011444int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011445int
11446main ()
11447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011448return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011454
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011456
Matthias Klosec511b472010-05-08 11:01:39 +000011457 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11461$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011462
Guido van Rossumda88dad1995-01-26 00:46:29 +000011463works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11465$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011468
11469#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011470int foo(int x, ...) {
11471 va_list va;
11472 va_start(va, x);
11473 va_arg(va, int);
11474 va_arg(va, char *);
11475 va_arg(va, double);
11476 return 0;
11477}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011478
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
11481{
Guido van Rossum90eea071996-08-30 20:58:57 +000011482return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 ;
11484 return 0;
11485}
11486_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
11489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011490$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011492 works=yes
11493
Guido van Rossum627b2d71993-12-24 10:39:16 +000011494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11497$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011498
Martin v. Löwisd6320502004-08-12 13:45:08 +000011499# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11501$as_echo_n "checking for socketpair... " >&6; }
11502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011503/* end confdefs.h. */
11504
11505#include <sys/types.h>
11506#include <sys/socket.h>
11507
11508int
11509main ()
11510{
11511void *x=socketpair
11512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011518$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011519
Matthias Klosec511b472010-05-08 11:01:39 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011525
11526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011528
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011529# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11531$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011534#include <sys/types.h>
11535#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011536int
11537main ()
11538{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011539struct sockaddr x;
11540x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545if ac_fn_c_try_compile "$LINENO"; then :
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11547$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011550
11551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011554
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011557
Guido van Rossumda88dad1995-01-26 00:46:29 +000011558va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11560$as_echo_n "checking whether va_list is an array... " >&6; }
11561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011563
11564#ifdef HAVE_STDARG_PROTOTYPES
11565#include <stdarg.h>
11566#else
11567#include <varargs.h>
11568#endif
11569
Martin v. Löwis11437992002-04-12 09:54:03 +000011570int
11571main ()
11572{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011573va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 ;
11575 return 0;
11576}
11577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578if ac_fn_c_try_compile "$LINENO"; then :
11579
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011580else
Skip Montanaro6dead952003-09-25 14:50:04 +000011581
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Guido van Rossumda88dad1995-01-26 00:46:29 +000011585 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11590$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011592# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
11594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali97781b02011-07-22 23:43:42 +020011596if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11601$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011602 OLD_CFLAGS=$CFLAGS
11603 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011606
11607# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011608
Martin v. Löwis11437992002-04-12 09:54:03 +000011609int
11610main ()
11611{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011612
11613 char *name;
11614 struct hostent *he, *res;
11615 char buffer[2048];
11616 int buflen = 2048;
11617 int h_errnop;
11618
11619 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
11621 ;
11622 return 0;
11623}
11624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011628
Martin v. Löwis11437992002-04-12 09:54:03 +000011629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011630$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11633$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011635else
Skip Montanaro6dead952003-09-25 14:50:04 +000011636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
11639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11640$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646int
11647main ()
11648{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011649
11650 char *name;
11651 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011652 char buffer[2048];
11653 int buflen = 2048;
11654 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011655
Matthias Klosec511b472010-05-08 11:01:39 +000011656 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011657
11658 ;
11659 return 0;
11660}
11661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011664 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011665
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Matthias Klosec511b472010-05-08 11:01:39 +000011667$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11670$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011671
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011672else
Skip Montanaro6dead952003-09-25 14:50:04 +000011673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11677$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11679/* end confdefs.h. */
11680
11681# include <netdb.h>
11682
11683int
11684main ()
11685{
11686
11687 char *name;
11688 struct hostent *he;
11689 struct hostent_data data;
11690
11691 (void) gethostbyname_r(name, he, &data);
11692
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697if ac_fn_c_try_compile "$LINENO"; then :
11698
11699 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11700
11701
11702$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11703
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11705$as_echo "yes" >&6; }
11706
11707else
11708
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011711
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011717
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011720 CFLAGS=$OLD_CFLAGS
11721
11722else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011723
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724 for ac_func in gethostbyname
11725do :
11726 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali97781b02011-07-22 23:43:42 +020011727if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011729#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011730_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011733done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011734
Michael W. Hudson54241132001-12-07 15:38:26 +000011735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011736fi
11737
Michael W. Hudson54241132001-12-07 15:38:26 +000011738
11739
11740
11741
11742
11743
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744# checks for system services
11745# (none yet)
11746
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011748ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali97781b02011-07-22 23:43:42 +020011749if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011750
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11753$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011754if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011756else
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011758LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
Martin v. Löwiseba40652007-08-30 20:10:57 +000011762/* Override any GCC internal prototype to avoid an error.
11763 Use char because int might match the return type of a GCC
11764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011765#ifdef __cplusplus
11766extern "C"
11767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011768char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011769int
11770main ()
11771{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011772return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 ;
11774 return 0;
11775}
11776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011780 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011782rm -f core conftest.err conftest.$ac_objext \
11783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11787$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011788if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 cat >>confdefs.h <<_ACEOF
11790#define HAVE_LIBIEEE 1
11791_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011793 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011794
Guido van Rossum627b2d71993-12-24 10:39:16 +000011795fi
11796
Michael W. Hudson54241132001-12-07 15:38:26 +000011797
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011798fi
11799
Michael W. Hudson54241132001-12-07 15:38:26 +000011800
Guido van Rossum7f253911997-05-09 02:42:48 +000011801# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11803$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011807 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011808if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011809then
11810
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11814$as_echo "yes" >&6; }
11815else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011817fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11820$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011821fi
11822
Guido van Rossum7f253911997-05-09 02:42:48 +000011823
Guido van Rossum7f43da71994-08-01 12:15:30 +000011824# check for --with-libm=...
11825
Guido van Rossum563e7081996-09-10 18:20:48 +000011826case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011827Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011828BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011829*) LIBM=-lm
11830esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11832$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011833
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011836 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011837if test "$withval" = no
11838then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11840$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011841elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011842then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11844$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011845else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011846fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11849$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011850fi
11851
Guido van Rossum7f43da71994-08-01 12:15:30 +000011852
11853# check for --with-libc=...
11854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11856$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Martin v. Löwiseba40652007-08-30 20:10:57 +000011858# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011861if test "$withval" = no
11862then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11864$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011865elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011866then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11868$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011869else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011870fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011871else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11873$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011874fi
11875
Guido van Rossum7f43da71994-08-01 12:15:30 +000011876
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011877# **************************************************
11878# * Check for various properties of floating point *
11879# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11882$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011883if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011885else
11886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011888 ac_cv_little_endian_double=no
11889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011891/* end confdefs.h. */
11892
11893#include <string.h>
11894int main() {
11895 double x = 9006104071832581.0;
11896 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11897 return 0;
11898 else
11899 return 1;
11900}
11901
11902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011904 ac_cv_little_endian_double=yes
11905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011910fi
11911
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011912fi
11913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11915$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011916if test "$ac_cv_little_endian_double" = yes
11917then
11918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011920
11921fi
11922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11924$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011925if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011927else
11928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011930 ac_cv_big_endian_double=no
11931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011933/* end confdefs.h. */
11934
11935#include <string.h>
11936int main() {
11937 double x = 9006104071832581.0;
11938 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11939 return 0;
11940 else
11941 return 1;
11942}
11943
11944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011945if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011946 ac_cv_big_endian_double=yes
11947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011952fi
11953
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011954fi
11955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11957$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011958if test "$ac_cv_big_endian_double" = yes
11959then
11960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011962
11963fi
11964
11965# Some ARM platforms use a mixed-endian representation for doubles.
11966# While Python doesn't currently have full support for these platforms
11967# (see e.g., issue 1762561), we can at least make sure that float <-> string
11968# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11970$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011971if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011973else
11974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011976 ac_cv_mixed_endian_double=no
11977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011979/* end confdefs.h. */
11980
11981#include <string.h>
11982int main() {
11983 double x = 9006104071832581.0;
11984 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11985 return 0;
11986 else
11987 return 1;
11988}
11989
11990_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011992 ac_cv_mixed_endian_double=yes
11993else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011998fi
11999
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012000fi
12001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12003$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012004if test "$ac_cv_mixed_endian_double" = yes
12005then
12006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012008
12009fi
12010
12011# The short float repr introduced in Python 3.1 requires the
12012# correctly-rounded string <-> double conversion functions from
12013# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12014# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012015# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012017
12018# This inline assembler syntax may also work for suncc and icc,
12019# so we try it on all platforms.
12020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12022$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012024/* end confdefs.h. */
12025
12026int
12027main ()
12028{
12029
Mark Dickinsona548dee2009-11-15 13:12:43 +000012030 unsigned short cw;
12031 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12032 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012033
12034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012039 have_gcc_asm_for_x87=yes
12040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012042fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12045$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012046if test "$have_gcc_asm_for_x87" = yes
12047then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012050
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012051fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012052
Mark Dickinson04b27232009-01-04 12:29:36 +000012053# Detect whether system arithmetic is subject to x87-style double
12054# rounding issues. The result of this test has little meaning on non
12055# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12056# mode is round-to-nearest and double rounding issues are present, and
12057# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12059$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012060# $BASECFLAGS may affect the result
12061ac_save_cc="$CC"
12062CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012064 ac_cv_x87_double_rounding=no
12065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012067/* end confdefs.h. */
12068
12069#include <stdlib.h>
12070#include <math.h>
12071int main() {
12072 volatile double x, y, z;
12073 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12074 x = 0.99999999999999989; /* 1-2**-53 */
12075 y = 1./x;
12076 if (y != 1.)
12077 exit(0);
12078 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12079 x = 1e16;
12080 y = 2.99999;
12081 z = x + y;
12082 if (z != 1e16+4.)
12083 exit(0);
12084 /* both tests show evidence of double rounding */
12085 exit(1);
12086}
12087
12088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012090 ac_cv_x87_double_rounding=no
12091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012096fi
12097
Mark Dickinson99abd142009-10-24 13:44:16 +000012098CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12100$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012101if test "$ac_cv_x87_double_rounding" = yes
12102then
12103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012105
12106fi
12107
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012108# ************************************
12109# * Check for mathematical functions *
12110# ************************************
12111
12112LIBS_SAVE=$LIBS
12113LIBS="$LIBS $LIBM"
12114
Mark Dickinson265d7382008-04-21 22:32:24 +000012115# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12116# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12118$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012119if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012121else
12122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012124 ac_cv_tanh_preserves_zero_sign=no
12125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012127/* end confdefs.h. */
12128
12129#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012130#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012131int main() {
12132 /* return 0 if either negative zeros don't exist
12133 on this platform or if negative zeros exist
12134 and tanh(-0.) == -0. */
12135 if (atan2(0., -1.) == atan2(-0., -1.) ||
12136 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12137 else exit(1);
12138}
12139
12140_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012142 ac_cv_tanh_preserves_zero_sign=yes
12143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012148fi
12149
Mark Dickinson265d7382008-04-21 22:32:24 +000012150fi
12151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12153$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012154if test "$ac_cv_tanh_preserves_zero_sign" = yes
12155then
12156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012158
12159fi
12160
Mark Dickinson65898e02009-09-05 10:27:00 +000012161for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162do :
12163 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12164ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012165if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012166 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012168_ACEOF
12169
12170fi
12171done
12172
Mark Dickinson65898e02009-09-05 10:27:00 +000012173for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174do :
12175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12176ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012177if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012178 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012180_ACEOF
12181
12182fi
12183done
12184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012185ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12186"
Charles-François Natali97781b02011-07-22 23:43:42 +020012187if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012190 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012191fi
12192
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012193cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12197"
Charles-François Natali97781b02011-07-22 23:43:42 +020012198if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012201 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012202fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012203
12204cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12208"
Charles-François Natali97781b02011-07-22 23:43:42 +020012209if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012210 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012213fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012214
12215cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012217_ACEOF
12218
12219
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012220LIBS=$LIBS_SAVE
12221
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012222# For multiprocessing module, check that sem_open
12223# actually works. For FreeBSD versions <= 7.2,
12224# the kernel module that provides POSIX semaphores
12225# isn't loaded by default, so an attempt to call
12226# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12228$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012229if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012233 ac_cv_posix_semaphores_enabled=yes
12234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012236/* end confdefs.h. */
12237
12238#include <unistd.h>
12239#include <fcntl.h>
12240#include <stdio.h>
12241#include <semaphore.h>
12242#include <sys/stat.h>
12243
12244int main(void) {
12245 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12246 if (a == SEM_FAILED) {
12247 perror("sem_open");
12248 return 1;
12249 }
12250 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012251 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012252 return 0;
12253}
12254
12255_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012257 ac_cv_posix_semaphores_enabled=yes
12258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012260fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012263fi
12264
12265
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012266fi
12267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12269$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012270if test $ac_cv_posix_semaphores_enabled = no
12271then
12272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012273$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012274
12275fi
12276
12277# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12279$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012280if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012284 ac_cv_broken_sem_getvalue=yes
12285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012287/* end confdefs.h. */
12288
12289#include <unistd.h>
12290#include <fcntl.h>
12291#include <stdio.h>
12292#include <semaphore.h>
12293#include <sys/stat.h>
12294
12295int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012296 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012297 int count;
12298 int res;
12299 if(a==SEM_FAILED){
12300 perror("sem_open");
12301 return 1;
12302
12303 }
12304 res = sem_getvalue(a, &count);
12305 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012306 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012307 return res==-1 ? 1 : 0;
12308}
12309
12310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012311if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012312 ac_cv_broken_sem_getvalue=no
12313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012314 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012318fi
12319
12320
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012321fi
12322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12324$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012325if test $ac_cv_broken_sem_getvalue = yes
12326then
12327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012329
12330fi
12331
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012332# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12334$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012335# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012337 enableval=$enable_big_digits; case $enable_big_digits in
12338yes)
12339 enable_big_digits=30 ;;
12340no)
12341 enable_big_digits=15 ;;
1234215|30)
12343 ;;
12344*)
Charles-François Natali97781b02011-07-22 23:43:42 +020012345 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012346esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12348$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012349
12350cat >>confdefs.h <<_ACEOF
12351#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12352_ACEOF
12353
12354
12355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12357$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012358fi
12359
12360
Guido van Rossumef2255b2000-03-10 22:30:29 +000012361# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012362ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +020012363if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368 wchar_h="yes"
12369
Guido van Rossumef2255b2000-03-10 22:30:29 +000012370else
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012372
12373fi
12374
Michael W. Hudson54241132001-12-07 15:38:26 +000012375
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012377# determine wchar_t size
12378if test "$wchar_h" = yes
12379then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012380 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12383# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12385$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012386if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12390"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393 if test "$ac_cv_type_wchar_t" = yes; then
12394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012396as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali97781b02011-07-22 23:43:42 +020012397See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398 else
12399 ac_cv_sizeof_wchar_t=0
12400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012401fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12405$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406
12407
12408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012410#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012411_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012412
Michael W. Hudson54241132001-12-07 15:38:26 +000012413
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012414fi
12415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12417$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012418have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012421
12422#include <tcl.h>
12423#if TCL_UTF_MAX != 6
12424# error "NOT UCS4_TCL"
12425#endif
12426int
12427main ()
12428{
12429
12430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012435
12436
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012438
12439 have_ucs4_tcl=yes
12440
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12444$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012445
Skip Montanaro6dead952003-09-25 14:50:04 +000012446# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012447if test "$wchar_h" = yes
12448then
12449 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12451$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012452 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012454else
12455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012457 ac_cv_wchar_t_signed=yes
12458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012461
12462 #include <wchar.h>
12463 int main()
12464 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012465 /* Success: exit code 0 */
12466 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012467 }
12468
12469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012470if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012471 ac_cv_wchar_t_signed=yes
12472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012477fi
12478
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012479fi
12480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12482$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483fi
12484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12486$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012490else
12491 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492fi
12493
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012494
12495if test $enable_unicode = yes
12496then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012497 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012498 case "$have_ucs4_tcl" in
12499 yes) enable_unicode="ucs4"
12500 ;;
12501 *) enable_unicode="ucs2"
12502 ;;
12503 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012504fi
12505
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012506
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012507case "$enable_unicode" in
12508ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012510
12511 ;;
12512ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012514
12515 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +020012516*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012517esac
12518
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520
12521
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012522if test "$enable_unicode" = "no"
12523then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012524 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12526$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012527else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012528 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012531
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012532
12533 # wchar_t is only usable if it maps to an unsigned type
12534 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012535 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012536 then
12537 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012539$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012541 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012542
12543 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12544 then
12545 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012546 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012547
12548 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12549 then
12550 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012552
12553 else
12554 PY_UNICODE_TYPE="no type found"
12555 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12557$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012558fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012559
12560# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12562$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012563if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012564 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566 ac_cv_c_bigendian=unknown
12567 # See if we're dealing with a universal compiler.
12568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12569/* end confdefs.h. */
12570#ifndef __APPLE_CC__
12571 not a universal capable compiler
12572 #endif
12573 typedef int dummy;
12574
Skip Montanaro6dead952003-09-25 14:50:04 +000012575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576if ac_fn_c_try_compile "$LINENO"; then :
12577
12578 # Check for potential -arch flags. It is not universal unless
12579 # there are at least two -arch flags with different values.
12580 ac_arch=
12581 ac_prev=
12582 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12583 if test -n "$ac_prev"; then
12584 case $ac_word in
12585 i?86 | x86_64 | ppc | ppc64)
12586 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12587 ac_arch=$ac_word
12588 else
12589 ac_cv_c_bigendian=universal
12590 break
12591 fi
12592 ;;
12593 esac
12594 ac_prev=
12595 elif test "x$ac_word" = "x-arch"; then
12596 ac_prev=arch
12597 fi
12598 done
12599fi
12600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12601 if test $ac_cv_c_bigendian = unknown; then
12602 # See if sys/param.h defines the BYTE_ORDER macro.
12603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012605#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607
Martin v. Löwis11437992002-04-12 09:54:03 +000012608int
12609main ()
12610{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12612 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12613 && LITTLE_ENDIAN)
12614 bogus endian macros
12615 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
12617 ;
12618 return 0;
12619}
12620_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012621if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012622 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012625#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012626 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012627
Martin v. Löwis11437992002-04-12 09:54:03 +000012628int
12629main ()
12630{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012631#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012632 not big endian
12633 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
12635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640 ac_cv_c_bigendian=yes
12641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012645fi
12646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12647 fi
12648 if test $ac_cv_c_bigendian = unknown; then
12649 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652#include <limits.h>
12653
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12658 bogus endian macros
12659 #endif
12660
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665if ac_fn_c_try_compile "$LINENO"; then :
12666 # It does; now see whether it defined to _BIG_ENDIAN or not.
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12668/* end confdefs.h. */
12669#include <limits.h>
12670
12671int
12672main ()
12673{
12674#ifndef _BIG_ENDIAN
12675 not big endian
12676 #endif
12677
12678 ;
12679 return 0;
12680}
12681_ACEOF
12682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12688fi
12689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12690 fi
12691 if test $ac_cv_c_bigendian = unknown; then
12692 # Compile a test program.
12693 if test "$cross_compiling" = yes; then :
12694 # Try to guess by grepping values from an object file.
12695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697short int ascii_mm[] =
12698 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12699 short int ascii_ii[] =
12700 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12701 int use_ascii (int i) {
12702 return ascii_mm[i] + ascii_ii[i];
12703 }
12704 short int ebcdic_ii[] =
12705 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12706 short int ebcdic_mm[] =
12707 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12708 int use_ebcdic (int i) {
12709 return ebcdic_mm[i] + ebcdic_ii[i];
12710 }
12711 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713int
12714main ()
12715{
12716return use_ascii (foo) == use_ebcdic (foo);
12717 ;
12718 return 0;
12719}
12720_ACEOF
12721if ac_fn_c_try_compile "$LINENO"; then :
12722 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12723 ac_cv_c_bigendian=yes
12724 fi
12725 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12726 if test "$ac_cv_c_bigendian" = unknown; then
12727 ac_cv_c_bigendian=no
12728 else
12729 # finding both strings is unlikely to happen, but who knows?
12730 ac_cv_c_bigendian=unknown
12731 fi
12732 fi
12733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012737/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012739int
12740main ()
12741{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743 /* Are we little or big endian? From Harbison&Steele. */
12744 union
12745 {
12746 long int l;
12747 char c[sizeof (long int)];
12748 } u;
12749 u.l = 1;
12750 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751
12752 ;
12753 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012754}
Martin v. Löwis11437992002-04-12 09:54:03 +000012755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012757 ac_cv_c_bigendian=no
12758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012759 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012766fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12768$as_echo "$ac_cv_c_bigendian" >&6; }
12769 case $ac_cv_c_bigendian in #(
12770 yes)
12771 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12772;; #(
12773 no)
12774 ;; #(
12775 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779 ;; #(
12780 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012781 as_fn_error $? "unknown endianness
Charles-François Natali97781b02011-07-22 23:43:42 +020012782 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012784
Michael W. Hudson54241132001-12-07 15:38:26 +000012785
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012786# Check whether right shifting a negative integer extends the sign bit
12787# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12789$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012790if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012795 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012799
12800int main()
12801{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012802 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012803}
12804
Martin v. Löwis11437992002-04-12 09:54:03 +000012805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012807 ac_cv_rshift_extends_sign=yes
12808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012813fi
12814
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815fi
12816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12818$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012819if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012820then
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012823
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012824fi
12825
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012826# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12828$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012829if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012831else
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012834/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012835#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012836int
12837main ()
12838{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012839
12840 FILE *f = fopen("/dev/null", "r");
12841 flockfile(f);
12842 getc_unlocked(f);
12843 funlockfile(f);
12844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ;
12846 return 0;
12847}
12848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012850 ac_cv_have_getc_unlocked=yes
12851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852 ac_cv_have_getc_unlocked=no
12853fi
12854rm -f core conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12859$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012860if test "$ac_cv_have_getc_unlocked" = yes
12861then
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012863$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012864
12865fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012866
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012867# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012868# save the value of LIBS so we don't actually link Python with readline
12869LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012870
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012871# On some systems we need to link readline to a termcap compatible
12872# library. NOTE: Keep the precedence of listed libraries synchronised
12873# with setup.py.
12874py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12876$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012877for py_libtermcap in "" ncursesw ncurses curses termcap; do
12878 if test -z "$py_libtermcap"; then
12879 READLINE_LIBS="-lreadline"
12880 else
12881 READLINE_LIBS="-lreadline -l$py_libtermcap"
12882 fi
12883 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012885/* end confdefs.h. */
12886
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887/* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012890#ifdef __cplusplus
12891extern "C"
12892#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012893char readline ();
12894int
12895main ()
12896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012898 ;
12899 return 0;
12900}
12901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012903 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905rm -f core conftest.err conftest.$ac_objext \
12906 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012907 if test $py_cv_lib_readline = yes; then
12908 break
12909 fi
12910done
12911# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12912#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012913if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12915$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12918$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012921
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012922fi
12923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012924# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12926$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012927if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929else
12930 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012931LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012933/* end confdefs.h. */
12934
Martin v. Löwiseba40652007-08-30 20:10:57 +000012935/* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938#ifdef __cplusplus
12939extern "C"
12940#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941char rl_callback_handler_install ();
12942int
12943main ()
12944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012945return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012951 ac_cv_lib_readline_rl_callback_handler_install=yes
12952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012957LIBS=$ac_check_lib_save_LIBS
12958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12960$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012961if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012962
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012964
12965fi
12966
12967
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012968# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012970/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012971#include <readline/readline.h>
12972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012974 have_readline=yes
12975else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012976 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012977
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012978fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012979rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012980if test $have_readline = yes
12981then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012983/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012984#include <readline/readline.h>
12985
12986_ACEOF
12987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012991
12992fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012993rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012996/* end confdefs.h. */
12997#include <readline/readline.h>
12998
12999_ACEOF
13000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013001 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013004
13005fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013006rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013007
13008fi
13009
Martin v. Löwis0daad592001-09-30 21:09:59 +000013010# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13012$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013013if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013017LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021/* Override any GCC internal prototype to avoid an error.
13022 Use char because int might match the return type of a GCC
13023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013024#ifdef __cplusplus
13025extern "C"
13026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013027char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013028int
13029main ()
13030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 ;
13033 return 0;
13034}
13035_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013039 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013040fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041rm -f core conftest.err conftest.$ac_objext \
13042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013043LIBS=$ac_check_lib_save_LIBS
13044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13046$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013047if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013050
Martin v. Löwis0daad592001-09-30 21:09:59 +000013051fi
13052
Michael W. Hudson54241132001-12-07 15:38:26 +000013053
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013054# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13056$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013057if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013059else
13060 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013061LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013063/* end confdefs.h. */
13064
13065/* Override any GCC internal prototype to avoid an error.
13066 Use char because int might match the return type of a GCC
13067 builtin and then its argument prototype would still apply. */
13068#ifdef __cplusplus
13069extern "C"
13070#endif
13071char rl_completion_display_matches_hook ();
13072int
13073main ()
13074{
13075return rl_completion_display_matches_hook ();
13076 ;
13077 return 0;
13078}
13079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013081 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013087LIBS=$ac_check_lib_save_LIBS
13088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13090$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013091if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013094
13095fi
13096
13097
Martin v. Löwis0daad592001-09-30 21:09:59 +000013098# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13100$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013101if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013103else
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013105LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013108
Martin v. Löwiseba40652007-08-30 20:10:57 +000013109/* Override any GCC internal prototype to avoid an error.
13110 Use char because int might match the return type of a GCC
13111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013112#ifdef __cplusplus
13113extern "C"
13114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013115char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013119return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013127 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013131LIBS=$ac_check_lib_save_LIBS
13132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13134$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013135if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013138
Guido van Rossum353ae582001-07-10 16:45:32 +000013139fi
13140
Jack Jansendd19cf82001-12-06 22:36:17 +000013141
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013142# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013144/* end confdefs.h. */
13145#include <readline/readline.h>
13146_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013148 have_readline=yes
13149else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013150 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013151
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013152fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013153rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013154if test $have_readline = yes
13155then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013157/* end confdefs.h. */
13158#include <readline/readline.h>
13159
13160_ACEOF
13161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013162 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013165
13166fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013167rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013168
13169fi
13170
Martin v. Löwis82bca632006-02-10 20:49:30 +000013171# End of readline checks: restore LIBS
13172LIBS=$LIBS_no_readline
13173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13175$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013176if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013178else
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013181 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013184/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013185
13186int main()
13187{
13188 int val1 = nice(1);
13189 if (val1 != -1 && val1 == nice(2))
13190 exit(0);
13191 exit(1);
13192}
13193
Martin v. Löwis11437992002-04-12 09:54:03 +000013194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013196 ac_cv_broken_nice=yes
13197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013198 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013202fi
13203
Martin v. Löwiseba40652007-08-30 20:10:57 +000013204fi
13205
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13207$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013208if test "$ac_cv_broken_nice" = yes
13209then
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013212
13213fi
13214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13216$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013217if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013221 ac_cv_broken_poll=no
13222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013224/* end confdefs.h. */
13225
13226#include <poll.h>
13227
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013228int main()
13229{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013230 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013231 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013232
13233 close (42);
13234
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013235 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013236 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013237 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013238 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013239 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013240 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013241 return 1;
13242}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013243
13244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013246 ac_cv_broken_poll=yes
13247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013253
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013254fi
13255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13257$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013258if test "$ac_cv_broken_poll" = yes
13259then
13260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013262
13263fi
13264
Brett Cannon43802422005-02-10 20:48:03 +000013265# 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 +000013266# (which is not required by ISO C or UNIX spec) and/or if we support
13267# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268ac_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 +000013269#include <$ac_cv_struct_tm>
13270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271"
Charles-François Natali97781b02011-07-22 23:43:42 +020013272if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013273
13274cat >>confdefs.h <<_ACEOF
13275#define HAVE_STRUCT_TM_TM_ZONE 1
13276_ACEOF
13277
13278
13279fi
13280
13281if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013284
13285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13287"
Charles-François Natali97781b02011-07-22 23:43:42 +020013288if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292fi
13293
Martin v. Löwiseba40652007-08-30 20:10:57 +000013294cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013296_ACEOF
13297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13299$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013300if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013304/* end confdefs.h. */
13305#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306#if !HAVE_DECL_TZNAME
13307extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013308#endif
13309
13310int
13311main ()
13312{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013313return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013314 ;
13315 return 0;
13316}
13317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013319 ac_cv_var_tzname=yes
13320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323rm -f core conftest.err conftest.$ac_objext \
13324 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13327$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013328 if test $ac_cv_var_tzname = yes; then
13329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013331
13332 fi
13333fi
13334
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013335
Martin v. Löwis1d459062005-03-14 21:23:33 +000013336# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13338$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013339if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013341else
13342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013344 ac_cv_working_tzset=no
13345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013347/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013348
13349#include <stdlib.h>
13350#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013351#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013352
13353#if HAVE_TZNAME
13354extern char *tzname[];
13355#endif
13356
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013357int main()
13358{
Brett Cannon18367812003-09-19 00:59:16 +000013359 /* Note that we need to ensure that not only does tzset(3)
13360 do 'something' with localtime, but it works as documented
13361 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013362 This includes making sure that tzname is set properly if
13363 tm->tm_zone does not exist since it is the alternative way
13364 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013365
13366 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013367 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013368 */
13369
Martin v. Löwis1d459062005-03-14 21:23:33 +000013370 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013371 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13372
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013373 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013374 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013375 if (localtime(&groundhogday)->tm_hour != 0)
13376 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013377#if HAVE_TZNAME
13378 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13379 if (strcmp(tzname[0], "UTC") ||
13380 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13381 exit(1);
13382#endif
Brett Cannon18367812003-09-19 00:59:16 +000013383
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013384 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013385 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013386 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013387 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013388#if HAVE_TZNAME
13389 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13390 exit(1);
13391#endif
Brett Cannon18367812003-09-19 00:59:16 +000013392
13393 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13394 tzset();
13395 if (localtime(&groundhogday)->tm_hour != 11)
13396 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013397#if HAVE_TZNAME
13398 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13399 exit(1);
13400#endif
13401
13402#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013403 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13404 exit(1);
13405 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13406 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013407#endif
Brett Cannon18367812003-09-19 00:59:16 +000013408
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013409 exit(0);
13410}
13411
13412_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013413if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013414 ac_cv_working_tzset=yes
13415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013420fi
13421
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422fi
13423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13425$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013426if test "$ac_cv_working_tzset" = yes
13427then
13428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013430
13431fi
13432
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013433# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13435$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013436if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013437 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013440/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013441#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013442int
13443main ()
13444{
13445
13446struct stat st;
13447st.st_mtim.tv_nsec = 1;
13448
13449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013454 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13459fi
13460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13462$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013463if test "$ac_cv_stat_tv_nsec" = yes
13464then
13465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013467
13468fi
13469
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013470# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13472$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013473if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013475else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013477/* end confdefs.h. */
13478#include <sys/stat.h>
13479int
13480main ()
13481{
13482
13483struct stat st;
13484st.st_mtimespec.tv_nsec = 1;
13485
13486 ;
13487 return 0;
13488}
13489_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013491 ac_cv_stat_tv_nsec2=yes
13492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13496fi
13497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13499$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013500if test "$ac_cv_stat_tv_nsec2" = yes
13501then
13502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013504
13505fi
13506
Jack Jansen666b1e72001-10-31 12:11:48 +000013507# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13509$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013510if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013512else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013515#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013516int
13517main ()
13518{
Jack Jansen666b1e72001-10-31 12:11:48 +000013519
13520 int rtn;
13521 rtn = mvwdelch(0,0,0);
13522
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013528 ac_cv_mvwdelch_is_expression=yes
13529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013530 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13533fi
13534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13536$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013537
13538if test "$ac_cv_mvwdelch_is_expression" = yes
13539then
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013542
13543fi
13544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13546$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013547if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013548 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013552#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Jack Jansen666b1e72001-10-31 12:11:48 +000013556
13557 WINDOW *w;
13558 w->_flags = 0;
13559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013565 ac_cv_window_has_flags=yes
13566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13570fi
13571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13573$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013574
Jack Jansen666b1e72001-10-31 12:11:48 +000013575
13576if test "$ac_cv_window_has_flags" = yes
13577then
Martin v. Löwis11437992002-04-12 09:54:03 +000013578
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013580
13581fi
13582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13584$as_echo_n "checking for is_term_resized... " >&6; }
13585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013586/* end confdefs.h. */
13587#include <curses.h>
13588int
13589main ()
13590{
13591void *x=is_term_resized
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013599
Matthias Klosec511b472010-05-08 11:01:39 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013605
13606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13610$as_echo_n "checking for resize_term... " >&6; }
13611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013612/* end confdefs.h. */
13613#include <curses.h>
13614int
13615main ()
13616{
13617void *x=resize_term
13618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013623
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013624$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013625
Matthias Klosec511b472010-05-08 11:01:39 +000013626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13630$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013631
13632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13636$as_echo_n "checking for resizeterm... " >&6; }
13637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013638/* end confdefs.h. */
13639#include <curses.h>
13640int
13641main ()
13642{
13643void *x=resizeterm
13644 ;
13645 return 0;
13646}
13647_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013651
Matthias Klosec511b472010-05-08 11:01:39 +000013652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13656$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013657
13658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13662$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013663
13664if test -r /dev/ptmx
13665then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13667$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013670
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13673$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013674fi
13675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13677$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013678
13679if test -r /dev/ptc
13680then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13682$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013684$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013685
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013686else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13688$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013689fi
13690
Mark Dickinson82864d12009-11-15 16:18:58 +000013691if test "$have_long_long" = yes
13692then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13694$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013695 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013699 ac_cv_have_long_long_format=no
13700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013702/* end confdefs.h. */
13703
13704 #include <stdio.h>
13705 #include <stddef.h>
13706 #include <string.h>
13707
13708 #ifdef HAVE_SYS_TYPES_H
13709 #include <sys/types.h>
13710 #endif
13711
13712 int main()
13713 {
13714 char buffer[256];
13715
13716 if (sprintf(buffer, "%lld", (long long)123) < 0)
13717 return 1;
13718 if (strcmp(buffer, "123"))
13719 return 1;
13720
13721 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13722 return 1;
13723 if (strcmp(buffer, "-123"))
13724 return 1;
13725
13726 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13727 return 1;
13728 if (strcmp(buffer, "123"))
13729 return 1;
13730
13731 return 0;
13732 }
13733
13734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013735if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013736 ac_cv_have_long_long_format=yes
13737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013742fi
13743
13744
Mark Dickinson82864d12009-11-15 16:18:58 +000013745fi
13746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13748$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013749fi
13750
Mark Dickinson5ce84742009-12-31 20:48:04 +000013751if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013752then
13753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013755
13756fi
13757
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013758if test $ac_sys_system = Darwin
13759then
13760 LIBS="$LIBS -framework CoreFoundation"
13761fi
13762
Mark Dickinson82864d12009-11-15 16:18:58 +000013763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13765$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013766if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013770 ac_cv_have_size_t_format="cross -- assuming yes"
13771
Brett Cannon09d12362006-05-11 05:11:33 +000013772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013774/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013775
Brett Cannon09d12362006-05-11 05:11:33 +000013776#include <stdio.h>
13777#include <stddef.h>
13778#include <string.h>
13779
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013783
13784#ifdef HAVE_SSIZE_T
13785typedef ssize_t Py_ssize_t;
13786#elif SIZEOF_VOID_P == SIZEOF_LONG
13787typedef long Py_ssize_t;
13788#else
13789typedef int Py_ssize_t;
13790#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013791
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013792int main()
13793{
13794 char buffer[256];
13795
Brett Cannon09d12362006-05-11 05:11:33 +000013796 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13797 return 1;
13798
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013799 if (strcmp(buffer, "123"))
13800 return 1;
13801
13802 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13803 return 1;
13804
13805 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013806 return 1;
13807
13808 return 0;
13809}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013810
Brett Cannon09d12362006-05-11 05:11:33 +000013811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013813 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013815 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013819fi
13820
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13823$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013824if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013827
13828fi
13829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013831#ifdef HAVE_SYS_TYPES_H
13832#include <sys/types.h>
13833#endif
13834#ifdef HAVE_SYS_SOCKET_H
13835#include <sys/socket.h>
13836#endif
13837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838"
Charles-François Natali97781b02011-07-22 23:43:42 +020013839if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013844
13845fi
13846
Michael W. Hudson54241132001-12-07 15:38:26 +000013847
Benjamin Peterson7497e912010-10-16 00:53:39 +000013848case $ac_sys_system in
13849AIX*)
13850
13851$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13852 ;;
13853esac
13854
13855
Michael W. Hudson54241132001-12-07 15:38:26 +000013856
13857
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013858for h in `(cd $srcdir;echo Python/thread_*.h)`
13859do
13860 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13861done
13862
Michael W. Hudson54241132001-12-07 15:38:26 +000013863
Neal Norwitzd24499d2005-12-18 21:36:39 +000013864SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13866$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013867for dir in $SRCDIRS; do
13868 if test ! -d $dir; then
13869 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013870 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013871done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13873$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013874
Guido van Rossum627b2d71993-12-24 10:39:16 +000013875# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013876ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013877
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013878ac_config_files="$ac_config_files Modules/ld_so_aix"
13879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881# This file is a shell script that caches the results of configure
13882# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013883# scripts and configure runs, see configure's option --config-cache.
13884# It is not useful on other systems. If it contains results you don't
13885# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886#
Martin v. Löwis11437992002-04-12 09:54:03 +000013887# config.status only pays attention to the cache file if you give it
13888# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889#
Skip Montanaro6dead952003-09-25 14:50:04 +000013890# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013891# loading this file, other *unset* `ac_cv_foo' will be assigned the
13892# following values.
13893
13894_ACEOF
13895
Guido van Rossumf78abae1997-01-21 22:02:36 +000013896# The following way of writing the cache mishandles newlines in values,
13897# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013899# Ultrix sh set writes to stderr and can't be redirected directly,
13900# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901(
13902 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13903 eval ac_val=\$$ac_var
13904 case $ac_val in #(
13905 *${as_nl}*)
13906 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13908$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 esac
13910 case $ac_var in #(
13911 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13913 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914 esac ;;
13915 esac
13916 done
13917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13920 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921 # `set' does not quote correctly, so add quotes: double-quote
13922 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013924 "s/'/'\\\\''/g;
13925 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 *)
13928 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931 esac |
13932 sort
13933) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13939 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13941 :end' >>confcache
13942if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13943 if test -w "$cache_file"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020013944 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13946$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali97781b02011-07-22 23:43:42 +020013947 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013948 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13950$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013951 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013953rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955test "x$prefix" = xNONE && prefix=$ac_default_prefix
13956# Let make expand exec_prefix.
13957test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013958
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013959DEFS=-DHAVE_CONFIG_H
13960
Skip Montanaro6dead952003-09-25 14:50:04 +000013961ac_libobjs=
13962ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013963U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013964for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13965 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13969 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13971 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013972done
13973LIBOBJS=$ac_libobjs
13974
13975LTLIBOBJS=$ac_ltlibobjs
13976
13977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013979
Charles-François Natali97781b02011-07-22 23:43:42 +020013980: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013982ac_clean_files_save=$ac_clean_files
13983ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013984{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13985$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13986as_write_fail=0
13987cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013988#! $SHELL
13989# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013990# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013991# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013992# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013995ac_cs_recheck=false
13996ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998SHELL=\${CONFIG_SHELL-$SHELL}
13999export SHELL
14000_ASEOF
14001cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14002## -------------------- ##
14003## M4sh Initialization. ##
14004## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014005
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006# Be more Bourne compatible
14007DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 emulate sh
14010 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014012 # is contrary to our usage. Disable this feature.
14013 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014014 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016 case `(set -o) 2>/dev/null` in #(
14017 *posix*) :
14018 set -o posix ;; #(
14019 *) :
14020 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014022fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014023
Skip Montanaro6dead952003-09-25 14:50:04 +000014024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025as_nl='
14026'
14027export as_nl
14028# Printing a long string crashes Solaris 7 /usr/bin/printf.
14029as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14030as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14031as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14032# Prefer a ksh shell builtin over an external printf program on Solaris,
14033# but without wasting forks for bash or zsh.
14034if test -z "$BASH_VERSION$ZSH_VERSION" \
14035 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14036 as_echo='print -r --'
14037 as_echo_n='print -rn --'
14038elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14039 as_echo='printf %s\n'
14040 as_echo_n='printf %s'
14041else
14042 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14043 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14044 as_echo_n='/usr/ucb/echo -n'
14045 else
14046 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14047 as_echo_n_body='eval
14048 arg=$1;
14049 case $arg in #(
14050 *"$as_nl"*)
14051 expr "X$arg" : "X\\(.*\\)$as_nl";
14052 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14053 esac;
14054 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14055 '
14056 export as_echo_n_body
14057 as_echo_n='sh -c $as_echo_n_body as_echo'
14058 fi
14059 export as_echo_body
14060 as_echo='sh -c $as_echo_body as_echo'
14061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014062
14063# The user is always right.
14064if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065 PATH_SEPARATOR=:
14066 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14067 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14068 PATH_SEPARATOR=';'
14069 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072
14073# IFS
14074# We need space, tab and new line, in precisely that order. Quoting is
14075# there to prevent editors from complaining about space-tab.
14076# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14077# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078IFS=" "" $as_nl"
14079
14080# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014082 *[\\/]* ) as_myself=$0 ;;
14083 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014084for as_dir in $PATH
14085do
14086 IFS=$as_save_IFS
14087 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014088 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14089 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092 ;;
14093esac
14094# We did not find ourselves, most probably we were run as `sh COMMAND'
14095# in which case we are not to be found in the path.
14096if test "x$as_myself" = x; then
14097 as_myself=$0
14098fi
14099if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014100 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14101 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102fi
14103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104# Unset variables that we do not need and which cause bugs (e.g. in
14105# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14106# suppresses any "Segmentation fault" message there. '((' could
14107# trigger a bug in pdksh 5.2.14.
14108for as_var in BASH_ENV ENV MAIL MAILPATH
14109do eval test x\${$as_var+set} = xset \
14110 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111done
14112PS1='$ '
14113PS2='> '
14114PS4='+ '
14115
14116# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117LC_ALL=C
14118export LC_ALL
14119LANGUAGE=C
14120export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122# CDPATH.
14123(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14124
14125
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014126# as_fn_error STATUS ERROR [LINENO LOG_FD]
14127# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14129# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014130# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131as_fn_error ()
14132{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014133 as_status=$1; test $as_status -eq 0 && as_status=1
14134 if test "$4"; then
14135 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14136 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014137 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014138 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139 as_fn_exit $as_status
14140} # as_fn_error
14141
14142
14143# as_fn_set_status STATUS
14144# -----------------------
14145# Set $? to STATUS, without forking.
14146as_fn_set_status ()
14147{
14148 return $1
14149} # as_fn_set_status
14150
14151# as_fn_exit STATUS
14152# -----------------
14153# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14154as_fn_exit ()
14155{
14156 set +e
14157 as_fn_set_status $1
14158 exit $1
14159} # as_fn_exit
14160
14161# as_fn_unset VAR
14162# ---------------
14163# Portably unset VAR.
14164as_fn_unset ()
14165{
14166 { eval $1=; unset $1;}
14167}
14168as_unset=as_fn_unset
14169# as_fn_append VAR VALUE
14170# ----------------------
14171# Append the text in VALUE to the end of the definition contained in VAR. Take
14172# advantage of any shell optimizations that allow amortized linear growth over
14173# repeated appends, instead of the typical quadratic growth present in naive
14174# implementations.
14175if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14176 eval 'as_fn_append ()
14177 {
14178 eval $1+=\$2
14179 }'
14180else
14181 as_fn_append ()
14182 {
14183 eval $1=\$$1\$2
14184 }
14185fi # as_fn_append
14186
14187# as_fn_arith ARG...
14188# ------------------
14189# Perform arithmetic evaluation on the ARGs, and store the result in the
14190# global $as_val. Take advantage of shells that can avoid forks. The arguments
14191# must be portable across $(()) and expr.
14192if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14193 eval 'as_fn_arith ()
14194 {
14195 as_val=$(( $* ))
14196 }'
14197else
14198 as_fn_arith ()
14199 {
14200 as_val=`expr "$@" || test $? -eq 1`
14201 }
14202fi # as_fn_arith
14203
14204
Martin v. Löwiseba40652007-08-30 20:10:57 +000014205if expr a : '\(a\)' >/dev/null 2>&1 &&
14206 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14207 as_expr=expr
14208else
14209 as_expr=false
14210fi
14211
14212if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14213 as_basename=basename
14214else
14215 as_basename=false
14216fi
14217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14219 as_dirname=dirname
14220else
14221 as_dirname=false
14222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224as_me=`$as_basename -- "$0" ||
14225$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14226 X"$0" : 'X\(//\)$' \| \
14227 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014228$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014229 sed '/^.*\/\([^/][^/]*\)\/*$/{
14230 s//\1/
14231 q
14232 }
14233 /^X\/\(\/\/\)$/{
14234 s//\1/
14235 q
14236 }
14237 /^X\/\(\/\).*/{
14238 s//\1/
14239 q
14240 }
14241 s/.*/./; q'`
14242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243# Avoid depending upon Character Ranges.
14244as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14245as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14246as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14247as_cr_digits='0123456789'
14248as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014249
14250ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014251case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014253 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255 xy) ECHO_C='\c';;
14256 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14257 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014258 esac;;
14259*)
14260 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014262
Martin v. Löwis11437992002-04-12 09:54:03 +000014263rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264if test -d conf$$.dir; then
14265 rm -f conf$$.dir/conf$$.file
14266else
14267 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270if (echo >conf$$.file) 2>/dev/null; then
14271 if ln -s conf$$.file conf$$ 2>/dev/null; then
14272 as_ln_s='ln -s'
14273 # ... but there are two gotchas:
14274 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14275 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14276 # In both cases, we have to default to `cp -p'.
14277 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14278 as_ln_s='cp -p'
14279 elif ln conf$$.file conf$$ 2>/dev/null; then
14280 as_ln_s=ln
14281 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014282 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014284else
14285 as_ln_s='cp -p'
14286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14288rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290
14291# as_fn_mkdir_p
14292# -------------
14293# Create "$as_dir" as a directory, including parents if necessary.
14294as_fn_mkdir_p ()
14295{
14296
14297 case $as_dir in #(
14298 -*) as_dir=./$as_dir;;
14299 esac
14300 test -d "$as_dir" || eval $as_mkdir_p || {
14301 as_dirs=
14302 while :; do
14303 case $as_dir in #(
14304 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14305 *) as_qdir=$as_dir;;
14306 esac
14307 as_dirs="'$as_qdir' $as_dirs"
14308 as_dir=`$as_dirname -- "$as_dir" ||
14309$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14310 X"$as_dir" : 'X\(//\)[^/]' \| \
14311 X"$as_dir" : 'X\(//\)$' \| \
14312 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14313$as_echo X"$as_dir" |
14314 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14315 s//\1/
14316 q
14317 }
14318 /^X\(\/\/\)[^/].*/{
14319 s//\1/
14320 q
14321 }
14322 /^X\(\/\/\)$/{
14323 s//\1/
14324 q
14325 }
14326 /^X\(\/\).*/{
14327 s//\1/
14328 q
14329 }
14330 s/.*/./; q'`
14331 test -d "$as_dir" && break
14332 done
14333 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014334 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335
14336
14337} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014338if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014339 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014340else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014341 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014342 as_mkdir_p=false
14343fi
14344
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345if test -x / >/dev/null 2>&1; then
14346 as_test_x='test -x'
14347else
14348 if ls -dL / >/dev/null 2>&1; then
14349 as_ls_L_option=L
14350 else
14351 as_ls_L_option=
14352 fi
14353 as_test_x='
14354 eval sh -c '\''
14355 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014357 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358 case $1 in #(
14359 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362 ???[sx]*):;;*)false;;esac;fi
14363 '\'' sh
14364 '
14365fi
14366as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
14368# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014369as_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 +000014370
14371# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014372as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374
Martin v. Löwis11437992002-04-12 09:54:03 +000014375exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014376## ----------------------------------- ##
14377## Main body of $CONFIG_STATUS script. ##
14378## ----------------------------------- ##
14379_ASEOF
14380test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14383# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014384# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385# values after options handling.
14386ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014387This file was extended by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +020014388generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
14390 CONFIG_FILES = $CONFIG_FILES
14391 CONFIG_HEADERS = $CONFIG_HEADERS
14392 CONFIG_LINKS = $CONFIG_LINKS
14393 CONFIG_COMMANDS = $CONFIG_COMMANDS
14394 $ $0 $@
14395
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396on `(hostname || uname -n) 2>/dev/null | sed 1q`
14397"
14398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399_ACEOF
14400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401case $ac_config_files in *"
14402"*) set x $ac_config_files; shift; ac_config_files=$*;;
14403esac
14404
14405case $ac_config_headers in *"
14406"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14407esac
14408
14409
14410cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014411# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014412config_files="$ac_config_files"
14413config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
Martin v. Löwiseba40652007-08-30 20:10:57 +000014415_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014418ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014419\`$as_me' instantiates files and other configuration actions
14420from templates according to the current configuration. Unless the files
14421and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014423Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
14425 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014426 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014427 --config print configuration, then exit
14428 -q, --quiet, --silent
14429 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 -d, --debug don't remove temporary files
14431 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014432 --file=FILE[:TEMPLATE]
14433 instantiate the configuration file FILE
14434 --header=FILE[:TEMPLATE]
14435 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
14437Configuration files:
14438$config_files
14439
14440Configuration headers:
14441$config_headers
14442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014444
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14447ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014448ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014449python config.status 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +020014450configured by $0, generated by GNU Autoconf 2.67,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014451 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014453Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014454This config.status script is free software; the Free Software Foundation
14455gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456
14457ac_pwd='$ac_pwd'
14458srcdir='$srcdir'
14459INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014461_ACEOF
14462
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14464# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014465ac_need_defaults=:
14466while test $# != 0
14467do
14468 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014469 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14471 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014472 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014474 --*=)
14475 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14476 ac_optarg=
14477 ac_shift=:
14478 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014480 ac_option=$1
14481 ac_optarg=$2
14482 ac_shift=shift
14483 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 esac
14485
Skip Montanaro6dead952003-09-25 14:50:04 +000014486 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014488 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14489 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014490 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491 $as_echo "$ac_cs_version"; exit ;;
14492 --config | --confi | --conf | --con | --co | --c )
14493 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 debug=: ;;
14496 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014497 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498 case $ac_optarg in
14499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014500 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501 esac
14502 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 ac_need_defaults=false;;
14504 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014505 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506 case $ac_optarg in
14507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14508 esac
14509 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 --he | --h)
14512 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014513 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014514Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014515 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14518 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14519 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014522 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
14528 esac
14529 shift
14530done
14531
Skip Montanaro6dead952003-09-25 14:50:04 +000014532ac_configure_extra_args=
14533
14534if $ac_cs_silent; then
14535 exec 6>/dev/null
14536 ac_configure_extra_args="$ac_configure_extra_args --silent"
14537fi
14538
14539_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014541if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14543 shift
14544 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14545 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014548fi
14549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014552exec 5>>config.log
14553{
14554 echo
14555 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14556## Running $as_me. ##
14557_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014559} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Martin v. Löwiseba40652007-08-30 20:10:57 +000014561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014566
14567# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014568for ac_config_target in $ac_config_targets
14569do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570 case $ac_config_target in
14571 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14572 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14573 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14574 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014575 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14576 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14578 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014579 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014580 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581
Charles-François Natali97781b02011-07-22 23:43:42 +020014582 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 esac
14584done
14585
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587# If the user did not use the arguments to specify the items to instantiate,
14588# then the envvar interface is used. Set only those that are not.
14589# We use the long form for the default assignment because of an extremely
14590# bizarre bug on SunOS 4.1.3.
14591if $ac_need_defaults; then
14592 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14593 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14594fi
14595
Skip Montanaro6dead952003-09-25 14:50:04 +000014596# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014598# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014599# Hook for its removal unless debugging.
14600# Note that there is a small window in which the directory will not be cleaned:
14601# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014602$debug ||
14603{
Charles-François Natali97781b02011-07-22 23:43:42 +020014604 tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014605 trap 'exit_status=$?
Charles-François Natali97781b02011-07-22 23:43:42 +020014606 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014609}
Martin v. Löwis11437992002-04-12 09:54:03 +000014610# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali97781b02011-07-22 23:43:42 +020014614 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014615} ||
14616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014617 tmp=./conf$$-$RANDOM
14618 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014619} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014620
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014621# Set up the scripts for CONFIG_FILES section.
14622# No need to generate them if there are no CONFIG_FILES.
14623# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014624if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014626
14627ac_cr=`echo X | tr X '\015'`
14628# On cygwin, bash can eat \r inside `` if the user requested igncr.
14629# But we know of no other shell where ac_cr would be empty at this
14630# point, so we can use a bashism as a fallback.
14631if test "x$ac_cr" = x; then
14632 eval ac_cr=\$\'\\r\'
14633fi
14634ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14635if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014636 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637else
14638 ac_cs_awk_cr=$ac_cr
14639fi
14640
Charles-François Natali97781b02011-07-22 23:43:42 +020014641echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014642_ACEOF
14643
Martin v. Löwiseba40652007-08-30 20:10:57 +000014644
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014645{
14646 echo "cat >conf$$subs.awk <<_ACEOF" &&
14647 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14648 echo "_ACEOF"
14649} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014650 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14651ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014652ac_delim='%!_!# '
14653for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014654 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014655 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014657 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14658 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014659 break
14660 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014661 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662 else
14663 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014665done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014666rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali97781b02011-07-22 23:43:42 +020014669cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014671sed -n '
14672h
14673s/^/S["/; s/!.*/"]=/
14674p
14675g
14676s/^[^!]*!//
14677:repl
14678t repl
14679s/'"$ac_delim"'$//
14680t delim
14681:nl
14682h
14683s/\(.\{148\}\)..*/\1/
14684t more1
14685s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14686p
14687n
14688b repl
14689:more1
14690s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14691p
14692g
14693s/.\{148\}//
14694t nl
14695:delim
14696h
14697s/\(.\{148\}\)..*/\1/
14698t more2
14699s/["\\]/\\&/g; s/^/"/; s/$/"/
14700p
14701b
14702:more2
14703s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14704p
14705g
14706s/.\{148\}//
14707t delim
14708' <conf$$subs.awk | sed '
14709/^[^""]/{
14710 N
14711 s/\n//
14712}
14713' >>$CONFIG_STATUS || ac_write_fail=1
14714rm -f conf$$subs.awk
14715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14716_ACAWK
Charles-François Natali97781b02011-07-22 23:43:42 +020014717cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718 for (key in S) S_is_set[key] = 1
14719 FS = ""
14720
14721}
14722{
14723 line = $ 0
14724 nfields = split(line, field, "@")
14725 substed = 0
14726 len = length(field[1])
14727 for (i = 2; i < nfields; i++) {
14728 key = field[i]
14729 keylen = length(key)
14730 if (S_is_set[key]) {
14731 value = S[key]
14732 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14733 len += length(value) + length(field[++i])
14734 substed = 1
14735 } else
14736 len += 1 + keylen
14737 }
14738
14739 print line
14740}
14741
14742_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14745if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14746 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14747else
14748 cat
Charles-François Natali97781b02011-07-22 23:43:42 +020014749fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014750 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014751_ACEOF
14752
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014753# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14754# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014755# trailing colons and then remove the whole line if VPATH becomes empty
14756# (actually we leave an empty line to preserve line numbers).
14757if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014758 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14759h
14760s///
14761s/^/:/
14762s/[ ]*$/:/
14763s/:\$(srcdir):/:/g
14764s/:\${srcdir}:/:/g
14765s/:@srcdir@:/:/g
14766s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014767s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014768x
14769s/\(=[ ]*\).*/\1/
14770G
14771s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772s/^[^=]*=[ ]*$//
14773}'
14774fi
14775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014777fi # test -n "$CONFIG_FILES"
14778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014779# Set up the scripts for CONFIG_HEADERS section.
14780# No need to generate them if there are no CONFIG_HEADERS.
14781# This happens for instance with `./config.status Makefile'.
14782if test -n "$CONFIG_HEADERS"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020014783cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014784BEGIN {
14785_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014787# Transform confdefs.h into an awk script `defines.awk', embedded as
14788# here-document in config.status, that substitutes the proper values into
14789# config.h.in to produce config.h.
14790
14791# Create a delimiter string that does not exist in confdefs.h, to ease
14792# handling of long lines.
14793ac_delim='%!_!# '
14794for ac_last_try in false false :; do
Charles-François Natali97781b02011-07-22 23:43:42 +020014795 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14796 if test -z "$ac_t"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014797 break
14798 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014799 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014800 else
14801 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14802 fi
14803done
14804
14805# For the awk script, D is an array of macro values keyed by name,
14806# likewise P contains macro parameters if any. Preserve backslash
14807# newline sequences.
14808
14809ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14810sed -n '
14811s/.\{148\}/&'"$ac_delim"'/g
14812t rset
14813:rset
14814s/^[ ]*#[ ]*define[ ][ ]*/ /
14815t def
14816d
14817:def
14818s/\\$//
14819t bsnl
14820s/["\\]/\\&/g
14821s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14822D["\1"]=" \3"/p
14823s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14824d
14825:bsnl
14826s/["\\]/\\&/g
14827s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14828D["\1"]=" \3\\\\\\n"\\/p
14829t cont
14830s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14831t cont
14832d
14833:cont
14834n
14835s/.\{148\}/&'"$ac_delim"'/g
14836t clear
14837:clear
14838s/\\$//
14839t bsnlc
14840s/["\\]/\\&/g; s/^/"/; s/$/"/p
14841d
14842:bsnlc
14843s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14844b cont
14845' <confdefs.h | sed '
14846s/'"$ac_delim"'/"\\\
14847"/g' >>$CONFIG_STATUS || ac_write_fail=1
14848
14849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14850 for (key in D) D_is_set[key] = 1
14851 FS = ""
14852}
14853/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14854 line = \$ 0
14855 split(line, arg, " ")
14856 if (arg[1] == "#") {
14857 defundef = arg[2]
14858 mac1 = arg[3]
14859 } else {
14860 defundef = substr(arg[1], 2)
14861 mac1 = arg[2]
14862 }
14863 split(mac1, mac2, "(") #)
14864 macro = mac2[1]
14865 prefix = substr(line, 1, index(line, defundef) - 1)
14866 if (D_is_set[macro]) {
14867 # Preserve the white space surrounding the "#".
14868 print prefix "define", macro P[macro] D[macro]
14869 next
14870 } else {
14871 # Replace #undef with comments. This is necessary, for example,
14872 # in the case of _POSIX_SOURCE, which is predefined and required
14873 # on some systems where configure will not decide to define it.
14874 if (defundef == "undef") {
14875 print "/*", prefix defundef, macro, "*/"
14876 next
14877 }
14878 }
14879}
14880{ print }
14881_ACAWK
14882_ACEOF
14883cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014884 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014885fi # test -n "$CONFIG_HEADERS"
14886
14887
14888eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14889shift
14890for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891do
14892 case $ac_tag in
14893 :[FHLC]) ac_mode=$ac_tag; continue;;
14894 esac
14895 case $ac_mode$ac_tag in
14896 :[FHL]*:*);;
Charles-François Natali97781b02011-07-22 23:43:42 +020014897 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898 :[FH]-) ac_tag=-:-;;
14899 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14900 esac
14901 ac_save_IFS=$IFS
14902 IFS=:
14903 set x $ac_tag
14904 IFS=$ac_save_IFS
14905 shift
14906 ac_file=$1
14907 shift
14908
14909 case $ac_mode in
14910 :L) ac_source=$1;;
14911 :[FH])
14912 ac_file_inputs=
14913 for ac_f
14914 do
14915 case $ac_f in
Charles-François Natali97781b02011-07-22 23:43:42 +020014916 -) ac_f="$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014917 *) # Look for the file first in the build tree, then in the source tree
14918 # (if the path is not absolute). The absolute path cannot be DOS-style,
14919 # because $ac_f cannot contain `:'.
14920 test -f "$ac_f" ||
14921 case $ac_f in
14922 [\\/$]*) false;;
14923 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14924 esac ||
Charles-François Natali97781b02011-07-22 23:43:42 +020014925 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014927 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14928 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929 done
14930
14931 # Let's still pretend it is `configure' which instantiates (i.e., don't
14932 # use $as_me), people would be surprised to read:
14933 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934 configure_input='Generated from '`
14935 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14936 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937 if test x"$ac_file" != x-; then
14938 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014939 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14940$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014942 # Neutralize special characters interpreted by sed in replacement strings.
14943 case $configure_input in #(
14944 *\&* | *\|* | *\\* )
14945 ac_sed_conf_input=`$as_echo "$configure_input" |
14946 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14947 *) ac_sed_conf_input=$configure_input;;
14948 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949
14950 case $ac_tag in
Charles-François Natali97781b02011-07-22 23:43:42 +020014951 *:-:* | *:-) cat >"$tmp/stdin" \
14952 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953 esac
14954 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 esac
14956
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014958$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014959 X"$ac_file" : 'X\(//\)[^/]' \| \
14960 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014961 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014962$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014963 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14964 s//\1/
14965 q
14966 }
14967 /^X\(\/\/\)[^/].*/{
14968 s//\1/
14969 q
14970 }
14971 /^X\(\/\/\)$/{
14972 s//\1/
14973 q
14974 }
14975 /^X\(\/\).*/{
14976 s//\1/
14977 q
14978 }
14979 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014980 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 ac_builddir=.
14982
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983case "$ac_dir" in
14984.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14985*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014986 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014988 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 case $ac_top_builddir_sub in
14990 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14991 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14992 esac ;;
14993esac
14994ac_abs_top_builddir=$ac_pwd
14995ac_abs_builddir=$ac_pwd$ac_dir_suffix
14996# for backward compatibility:
14997ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014998
14999case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 ac_top_srcdir=$ac_top_builddir_sub
15003 ac_abs_top_srcdir=$ac_pwd ;;
15004 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006 ac_top_srcdir=$srcdir
15007 ac_abs_top_srcdir=$srcdir ;;
15008 *) # Relative name.
15009 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15010 ac_top_srcdir=$ac_top_build_prefix$srcdir
15011 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015012esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015014
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016 case $ac_mode in
15017 :F)
15018 #
15019 # CONFIG_FILE
15020 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
15022 case $INSTALL in
15023 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015024 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015026_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015029# If the template does not know about datarootdir, expand it.
15030# FIXME: This hack should be removed a few years after 2.60.
15031ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032ac_sed_dataroot='
15033/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034 p
15035 q
15036}
15037/@datadir@/p
15038/@docdir@/p
15039/@infodir@/p
15040/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015041/@mandir@/p'
15042case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043*datarootdir*) ac_datarootdir_seen=yes;;
15044*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15046$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015048cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 ac_datarootdir_hack='
15050 s&@datadir@&$datadir&g
15051 s&@docdir@&$docdir&g
15052 s&@infodir@&$infodir&g
15053 s&@localedir@&$localedir&g
15054 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015055 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056esac
15057_ACEOF
15058
15059# Neutralize VPATH when `$srcdir' = `.'.
15060# Shell code in configure.ac might set extrasub.
15061# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15063ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015064$extrasub
15065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015067:t
15068/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015069s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072s&@srcdir@&$ac_srcdir&;t t
15073s&@abs_srcdir@&$ac_abs_srcdir&;t t
15074s&@top_srcdir@&$ac_top_srcdir&;t t
15075s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15076s&@builddir@&$ac_builddir&;t t
15077s&@abs_builddir@&$ac_abs_builddir&;t t
15078s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15079s&@INSTALL@&$ac_INSTALL&;t t
15080$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015081"
Charles-François Natali97781b02011-07-22 23:43:42 +020015082eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15083 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015084
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali97781b02011-07-22 23:43:42 +020015086 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15087 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015089which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015090$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015091which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015092
Charles-François Natali97781b02011-07-22 23:43:42 +020015093 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 case $ac_file in
Charles-François Natali97781b02011-07-22 23:43:42 +020015095 -) cat "$tmp/out" && rm -f "$tmp/out";;
15096 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015097 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015098 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099 ;;
15100 :H)
15101 #
15102 # CONFIG_HEADER
15103 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105 {
15106 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015107 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15108 } >"$tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015109 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali97781b02011-07-22 23:43:42 +020015110 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015111 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15112$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114 rm -f "$ac_file"
Charles-François Natali97781b02011-07-22 23:43:42 +020015115 mv "$tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015116 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 fi
15118 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015120 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015121 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015123 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125
15126 esac
15127
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015128
15129 case $ac_file$ac_mode in
15130 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15131
15132 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133done # for ac_tag
15134
Guido van Rossum627b2d71993-12-24 10:39:16 +000015135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015137_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015138ac_clean_files=$ac_clean_files_save
15139
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015140test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015141 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142
Martin v. Löwis11437992002-04-12 09:54:03 +000015143
15144# configure is writing to config.log, and then calls config.status.
15145# config.status does its own redirection, appending to config.log.
15146# Unfortunately, on DOS this fails, as config.log is still kept open
15147# by configure, so config.status won't be able to write to it; its
15148# output is simply discarded. So we exec the FD to /dev/null,
15149# effectively closing config.log, so it can be properly (re)opened and
15150# appended to by config.status. When coming back to configure, we
15151# need to make the FD available again.
15152if test "$no_create" != yes; then
15153 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015154 ac_config_status_args=
15155 test "$silent" = yes &&
15156 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015158 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 exec 5>>config.log
15160 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15161 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015162 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163fi
15164if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15166$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015167fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015168
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015169
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015170echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015171if test ! -f Modules/Setup
15172then
15173 cp $srcdir/Modules/Setup.dist Modules/Setup
15174fi
15175
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015176echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015177if test ! -f Modules/Setup.local
15178then
15179 echo "# Edit this file for local setup changes" >Modules/Setup.local
15180fi
15181
15182echo "creating Makefile"
15183$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15184 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015185 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015186
15187case $ac_sys_system in
15188BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015190
15191 Support for BeOS is deprecated as of Python 2.6.
15192 See PEP 11 for the gory details.
15193 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015194$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015195
15196 Support for BeOS is deprecated as of Python 2.6.
15197 See PEP 11 for the gory details.
15198 " >&2;}
15199 ;;
15200*) ;;
15201esac
15202
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015203mv config.c Modules