blob: 3948080e13e589670650c162b4000239ee91823e [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
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005416 case $CC in
5417 *clang*) WRAP="-fwrapv"
5418 ;;
5419 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005420
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005421 case $ac_cv_prog_cc_g in
5422 yes)
5423 if test "$Py_DEBUG" = 'true' ; then
5424 # Optimization messes up debuggers, so turn it off for
5425 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005426 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427 else
5428 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5429 fi
5430 ;;
5431 *)
5432 OPT="-O3 -Wall $STRICT_PROTO"
5433 ;;
5434 esac
5435 case $ac_sys_system in
5436 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5437 ;;
5438 esac
5439 ;;
5440
5441 *)
5442 OPT="-O"
5443 ;;
5444 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005445fi
5446
5447
5448
5449# The -arch flags for universal builds on OSX
5450UNIVERSAL_ARCH_FLAGS=
5451
5452
5453# tweak BASECFLAGS based on compiler and platform
5454case $GCC in
5455yes)
5456 # Python violates C99 rules, by casting between incompatible
5457 # pointer types. GCC may generate bad code as a result of that,
5458 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5460$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461 ac_save_cc="$CC"
5462 CC="$CC -fno-strict-aliasing"
Charles-François Natali97781b02011-07-22 23:43:42 +02005463 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005468
5469int
5470main ()
5471{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005472
Gregory P. Smith373469a2009-11-01 21:03:38 +00005473 ;
5474 return 0;
5475}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005477if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478 ac_cv_no_strict_aliasing_ok=yes
5479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005480 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005483fi
5484
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5487$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 if test $ac_cv_no_strict_aliasing_ok = yes
5489 then
5490 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5491 fi
5492
5493 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5494 # support. Without this, treatment of subnormals doesn't follow
5495 # the standard.
5496 case $ac_sys_machine in
5497 alpha*)
5498 BASECFLAGS="$BASECFLAGS -mieee"
5499 ;;
5500 esac
5501
5502 case $ac_sys_system in
5503 SCO_SV*)
5504 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5505 ;;
5506 # is there any other compiler on Darwin besides gcc?
5507 Darwin*)
5508 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5509 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005510 if test "${CC}" = gcc
5511 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5513$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005514 case "${UNIVERSALSDK}" in
5515 */MacOSX10.4u.sdk)
5516 # Build using 10.4 SDK, force usage of gcc when the
5517 # compiler is gcc, otherwise the user will get very
5518 # confusing error messages when building on OSX 10.6
5519 CC=gcc-4.0
5520 CPP=cpp-4.0
5521 ;;
5522 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5524$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525 fi
5526
5527 # Calculate the right deployment target for this build.
5528 #
5529 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5530 if test ${cur_target} '>' 10.2; then
5531 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005532 if test ${enable_universalsdk}; then
5533 if test "${UNIVERSAL_ARCHS}" = "all"; then
5534 # Ensure that the default platform for a
5535 # 4-way universal build is OSX 10.5,
5536 # that's the first OS release where
5537 # 4-way builds make sense.
5538 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005539
5540 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5541 cur_target='10.5'
5542
5543 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5544 cur_target='10.5'
5545
5546 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5547 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005548 fi
5549 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005550 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005551 # On Intel macs default to a deployment
5552 # target of 10.4, that's the first OSX
5553 # release with Intel support.
5554 cur_target="10.4"
5555 fi
5556 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005557 fi
5558 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5559
5560 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5561 # environment with a value that is the same as what we'll use
5562 # in the Makefile to ensure that we'll get the same compiler
5563 # environment during configure and build time.
5564 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5565 export MACOSX_DEPLOYMENT_TARGET
5566 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5567
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005568 if test "${enable_universalsdk}"; then
5569 UNIVERSAL_ARCH_FLAGS=""
5570 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5571 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5572 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005573 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005574
5575 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5576 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5577 LIPO_32BIT_FLAGS=""
5578 ARCH_RUN_32BIT="true"
5579
5580 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5581 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5582 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005583 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005584
5585 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5586 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5587 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005588 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005589
5590 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5591 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5592 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005593 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005594
5595 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005596 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 +00005597
5598 fi
5599
5600
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005601 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5602 if test "${UNIVERSALSDK}" != "/"
5603 then
5604 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5605 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5606 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005607 fi
5608
5609 fi
5610
5611
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612 ;;
5613 OSF*)
5614 BASECFLAGS="$BASECFLAGS -mieee"
5615 ;;
5616 esac
5617 ;;
5618
5619*)
5620 case $ac_sys_system in
5621 OpenUNIX*|UnixWare*)
5622 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5623 ;;
5624 OSF*)
5625 BASECFLAGS="$BASECFLAGS -ieee -std"
5626 ;;
5627 SCO_SV*)
5628 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5629 ;;
5630 esac
5631 ;;
5632esac
5633
5634if test "$Py_DEBUG" = 'true'; then
5635 :
5636else
5637 OPT="-DNDEBUG $OPT"
5638fi
5639
5640if test "$ac_arch_flags"
5641then
5642 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5643fi
5644
5645# disable check for icc since it seems to pass, but generates a warning
5646if test "$CC" = icc
5647then
5648 ac_cv_opt_olimit_ok=no
5649fi
5650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5652$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005653if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005654 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005655else
5656 ac_save_cc="$CC"
5657CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005659/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005660
5661int
5662main ()
5663{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005664
Gregory P. Smith373469a2009-11-01 21:03:38 +00005665 ;
5666 return 0;
5667}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005669if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005670 ac_cv_opt_olimit_ok=yes
5671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005672 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005673
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005674fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005676CC="$ac_save_cc"
5677fi
5678
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5680$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681if test $ac_cv_opt_olimit_ok = yes; then
5682 case $ac_sys_system in
5683 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5684 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5685 # environment?
5686 Darwin*)
5687 ;;
5688 *)
5689 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5690 ;;
5691 esac
5692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5694$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005695 if test "${ac_cv_olimit_ok+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697else
5698 ac_save_cc="$CC"
5699 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005701/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005702
5703int
5704main ()
5705{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005706
Gregory P. Smith373469a2009-11-01 21:03:38 +00005707 ;
5708 return 0;
5709}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005711if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005712 ac_cv_olimit_ok=yes
5713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005715
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005716fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718 CC="$ac_save_cc"
5719fi
5720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5722$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723 if test $ac_cv_olimit_ok = yes; then
5724 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5725 fi
5726fi
5727
5728# Check whether GCC supports PyArg_ParseTuple format
5729if test "$GCC" = "yes"
5730then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5732$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005733 save_CFLAGS=$CFLAGS
5734 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736/* end confdefs.h. */
5737
5738 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739int
5740main ()
5741{
5742
5743 ;
5744 return 0;
5745}
Matthias Klosec511b472010-05-08 11:01:39 +00005746
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005749
Matthias Klosec511b472010-05-08 11:01:39 +00005750
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005752
Matthias Klosec511b472010-05-08 11:01:39 +00005753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005754$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005755
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756else
Matthias Klosec511b472010-05-08 11:01:39 +00005757
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005759$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760
5761fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5763 CFLAGS=$save_CFLAGS
5764fi
5765
5766# On some compilers, pthreads are available without further options
5767# (e.g. MacOS X). On some of these systems, the compiler will not
5768# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5769# So we have to see first whether pthreads are available without
5770# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5772$as_echo_n "checking whether pthreads are available without options... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005773if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005774 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005776 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005777 ac_cv_pthread_is_default=no
5778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005780/* end confdefs.h. */
5781
5782#include <pthread.h>
5783
5784void* routine(void* p){return NULL;}
5785
5786int main(){
5787 pthread_t p;
5788 if(pthread_create(&p,NULL,routine,NULL)!=0)
5789 return 1;
5790 (void)pthread_detach(p);
5791 return 0;
5792}
5793
5794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005796
5797 ac_cv_pthread_is_default=yes
5798 ac_cv_kthread=no
5799 ac_cv_pthread=no
5800
5801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005802 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005806fi
5807
5808
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809fi
5810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5812$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813
5814
5815if test $ac_cv_pthread_is_default = yes
5816then
5817 ac_cv_kpthread=no
5818else
5819# -Kpthread, if available, provides the right #defines
5820# and linker options to make pthread_create available
5821# Some compilers won't report that they do not support -Kpthread,
5822# so we need to run a program to see whether it really made the
5823# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5825$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005826if test "${ac_cv_kpthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828else
5829 ac_save_cc="$CC"
5830CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005831if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005832 ac_cv_kpthread=no
5833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835/* end confdefs.h. */
5836
5837#include <pthread.h>
5838
5839void* routine(void* p){return NULL;}
5840
5841int main(){
5842 pthread_t p;
5843 if(pthread_create(&p,NULL,routine,NULL)!=0)
5844 return 1;
5845 (void)pthread_detach(p);
5846 return 0;
5847}
5848
5849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005850if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 ac_cv_kpthread=yes
5852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005853 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005859CC="$ac_save_cc"
5860fi
5861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5863$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864fi
5865
5866if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5867then
5868# -Kthread, if available, provides the right #defines
5869# and linker options to make pthread_create available
5870# Some compilers won't report that they do not support -Kthread,
5871# so we need to run a program to see whether it really made the
5872# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5874$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005875if test "${ac_cv_kthread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005876 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877else
5878 ac_save_cc="$CC"
5879CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005880if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881 ac_cv_kthread=no
5882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005884/* end confdefs.h. */
5885
5886#include <pthread.h>
5887
5888void* routine(void* p){return NULL;}
5889
5890int main(){
5891 pthread_t p;
5892 if(pthread_create(&p,NULL,routine,NULL)!=0)
5893 return 1;
5894 (void)pthread_detach(p);
5895 return 0;
5896}
5897
5898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005899if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005900 ac_cv_kthread=yes
5901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005902 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005906fi
5907
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908CC="$ac_save_cc"
5909fi
5910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5912$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005913fi
5914
5915if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5916then
5917# -pthread, if available, provides the right #defines
5918# and linker options to make pthread_create available
5919# Some compilers won't report that they do not support -pthread,
5920# so we need to run a program to see whether it really made the
5921# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5923$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02005924if test "${ac_cv_thread+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005925 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005926else
5927 ac_save_cc="$CC"
5928CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005929if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005930 ac_cv_pthread=no
5931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005933/* end confdefs.h. */
5934
5935#include <pthread.h>
5936
5937void* routine(void* p){return NULL;}
5938
5939int main(){
5940 pthread_t p;
5941 if(pthread_create(&p,NULL,routine,NULL)!=0)
5942 return 1;
5943 (void)pthread_detach(p);
5944 return 0;
5945}
5946
5947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005948if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949 ac_cv_pthread=yes
5950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005951 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955fi
5956
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957CC="$ac_save_cc"
5958fi
5959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5961$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005962fi
5963
5964# If we have set a CC compiler flag for thread support then
5965# check if it works for CXX, too.
5966ac_cv_cxx_thread=no
5967if test ! -z "$CXX"
5968then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5970$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971ac_save_cxx="$CXX"
5972
5973if test "$ac_cv_kpthread" = "yes"
5974then
5975 CXX="$CXX -Kpthread"
5976 ac_cv_cxx_thread=yes
5977elif test "$ac_cv_kthread" = "yes"
5978then
5979 CXX="$CXX -Kthread"
5980 ac_cv_cxx_thread=yes
5981elif test "$ac_cv_pthread" = "yes"
5982then
5983 CXX="$CXX -pthread"
5984 ac_cv_cxx_thread=yes
5985fi
5986
5987if test $ac_cv_cxx_thread = yes
5988then
5989 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5990 $CXX -c conftest.$ac_ext 2>&5
5991 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5992 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5993 then
5994 ac_cv_cxx_thread=yes
5995 else
5996 ac_cv_cxx_thread=no
5997 fi
5998 rm -fr conftest*
5999fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6001$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002fi
6003CXX="$ac_save_cxx"
6004
6005
6006# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6008$as_echo_n "checking for ANSI C header files... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006009if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006010 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006013/* end confdefs.h. */
6014#include <stdlib.h>
6015#include <stdarg.h>
6016#include <string.h>
6017#include <float.h>
6018
6019int
6020main ()
6021{
6022
6023 ;
6024 return 0;
6025}
6026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006027if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006028 ac_cv_header_stdc=yes
6029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006030 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6033
6034if test $ac_cv_header_stdc = yes; then
6035 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037/* end confdefs.h. */
6038#include <string.h>
6039
6040_ACEOF
6041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042 $EGREP "memchr" >/dev/null 2>&1; then :
6043
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044else
6045 ac_cv_header_stdc=no
6046fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006047rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048
6049fi
6050
6051if test $ac_cv_header_stdc = yes; then
6052 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054/* end confdefs.h. */
6055#include <stdlib.h>
6056
6057_ACEOF
6058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059 $EGREP "free" >/dev/null 2>&1; then :
6060
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006061else
6062 ac_cv_header_stdc=no
6063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006064rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065
6066fi
6067
6068if test $ac_cv_header_stdc = yes; then
6069 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006070 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071 :
6072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074/* end confdefs.h. */
6075#include <ctype.h>
6076#include <stdlib.h>
6077#if ((' ' & 0x0FF) == 0x020)
6078# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6079# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6080#else
6081# define ISLOWER(c) \
6082 (('a' <= (c) && (c) <= 'i') \
6083 || ('j' <= (c) && (c) <= 'r') \
6084 || ('s' <= (c) && (c) <= 'z'))
6085# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6086#endif
6087
6088#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6089int
6090main ()
6091{
6092 int i;
6093 for (i = 0; i < 256; i++)
6094 if (XOR (islower (i), ISLOWER (i))
6095 || toupper (i) != TOUPPER (i))
6096 return 2;
6097 return 0;
6098}
6099_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006100if ac_fn_c_try_run "$LINENO"; then :
6101
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006102else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006103 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006107fi
6108
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006109fi
6110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6112$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006113if test $ac_cv_header_stdc = yes; then
6114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006115$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006116
6117fi
6118
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006119for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6120fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006121ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006122shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006123unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006124sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6125sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006126sys/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 +00006127sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006128sys/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 +00006129sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006130bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006131do :
6132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6133ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006134if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006136#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006137_ACEOF
6138
6139fi
6140
Guido van Rossum627b2d71993-12-24 10:39:16 +00006141done
6142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006144for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006145 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6147$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006148if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006149 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006153#include <sys/types.h>
6154#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006155
Martin v. Löwis11437992002-04-12 09:54:03 +00006156int
6157main ()
6158{
6159if ((DIR *) 0)
6160return 0;
6161 ;
6162 return 0;
6163}
6164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006166 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006168 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006172eval ac_res=\$$as_ac_Header
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6174$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006175if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006176 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006177#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006178_ACEOF
6179
6180ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183done
6184# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6185if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6187$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006188if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006189 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006190else
Martin v. Löwis11437992002-04-12 09:54:03 +00006191 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195/* Override any GCC internal prototype to avoid an error.
6196 Use char because int might match the return type of a GCC
6197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006198#ifdef __cplusplus
6199extern "C"
6200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006201char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 ;
6207 return 0;
6208}
6209_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210for ac_lib in '' dir; do
6211 if test -z "$ac_lib"; then
6212 ac_res="none required"
6213 else
6214 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006217 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220rm -f core conftest.err conftest.$ac_objext \
6221 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006222 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225done
Charles-François Natali97781b02011-07-22 23:43:42 +02006226if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228else
6229 ac_cv_search_opendir=no
6230fi
6231rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006232LIBS=$ac_func_search_save_LIBS
6233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6235$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006236ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006241
Michael W. Hudson54241132001-12-07 15:38:26 +00006242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6244$as_echo_n "checking for library containing opendir... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006245if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006247else
6248 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006251
Martin v. Löwiseba40652007-08-30 20:10:57 +00006252/* Override any GCC internal prototype to avoid an error.
6253 Use char because int might match the return type of a GCC
6254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006255#ifdef __cplusplus
6256extern "C"
6257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006258char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006259int
6260main ()
6261{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006263 ;
6264 return 0;
6265}
6266_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267for ac_lib in '' x; do
6268 if test -z "$ac_lib"; then
6269 ac_res="none required"
6270 else
6271 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006272 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006275 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006277rm -f core conftest.err conftest.$ac_objext \
6278 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02006279 if test "${ac_cv_search_opendir+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006280 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282done
Charles-François Natali97781b02011-07-22 23:43:42 +02006283if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284
Martin v. Löwiseba40652007-08-30 20:10:57 +00006285else
6286 ac_cv_search_opendir=no
6287fi
6288rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006289LIBS=$ac_func_search_save_LIBS
6290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6292$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006293ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006296
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297fi
6298
6299fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6302$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006303if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006307/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309int
6310main ()
6311{
6312return makedev(0, 0);
6313 ;
6314 return 0;
6315}
6316_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318 ac_cv_header_sys_types_h_makedev=yes
6319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322rm -f core conftest.err conftest.$ac_objext \
6323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6327$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328
6329if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330ac_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 +02006331if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334
6335fi
6336
6337
6338
6339 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006340 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 +02006341if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006344
6345fi
6346
6347
6348 fi
6349fi
6350
Michael W. Hudson54241132001-12-07 15:38:26 +00006351
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006352# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006353for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354do :
6355 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006356#ifdef HAVE_CURSES_H
6357#include <curses.h>
6358#endif
6359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360"
Charles-François Natali97781b02011-07-22 23:43:42 +02006361if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006362 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006363#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006364_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006366fi
6367
6368done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369
6370
Martin v. Löwis11017b12006-01-14 18:12:57 +00006371# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373do :
6374 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 +00006375#ifdef HAVE_ASM_TYPES_H
6376#include <asm/types.h>
6377#endif
6378#ifdef HAVE_SYS_SOCKET_H
6379#include <sys/socket.h>
6380#endif
6381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006382"
Charles-François Natali97781b02011-07-22 23:43:42 +02006383if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006384 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006385#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386_ACEOF
6387
6388fi
6389
6390done
6391
6392
Guido van Rossum627b2d71993-12-24 10:39:16 +00006393# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006394was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6396$as_echo_n "checking for clock_t in time.h... " >&6; }
6397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006399#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006400
6401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006403 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006404 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006405else
Martin v. Löwis11437992002-04-12 09:54:03 +00006406
6407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006409
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006410
Guido van Rossum627b2d71993-12-24 10:39:16 +00006411fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006412rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6415$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006416
Neal Norwitz11690112002-07-30 01:08:28 +00006417# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6419$as_echo_n "checking for makedev... " >&6; }
6420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006421/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006422
6423#if defined(MAJOR_IN_MKDEV)
6424#include <sys/mkdev.h>
6425#elif defined(MAJOR_IN_SYSMACROS)
6426#include <sys/sysmacros.h>
6427#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006428#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006429#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006430int
6431main ()
6432{
6433 makedev(0, 0)
6434 ;
6435 return 0;
6436}
6437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006438if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006439 ac_cv_has_makedev=yes
6440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006441 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006443rm -f core conftest.err conftest.$ac_objext \
6444 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006445if test "$ac_cv_has_makedev" = "no"; then
6446 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006448/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006449
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006450#define _OSF_SOURCE 1
6451#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006452
Neal Norwitz11690112002-07-30 01:08:28 +00006453int
6454main ()
6455{
6456 makedev(0, 0)
6457 ;
6458 return 0;
6459}
6460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006461if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006462 ac_cv_has_makedev=yes
6463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006465fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466rm -f core conftest.err conftest.$ac_objext \
6467 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006468 if test "$ac_cv_has_makedev" = "yes"; then
6469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006470$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006471
6472 fi
6473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6475$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006476if test "$ac_cv_has_makedev" = "yes"; then
6477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006478$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006479
6480fi
6481
Martin v. Löwis399a6892002-10-04 10:22:02 +00006482# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6483# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6484# defined, but the compiler does not support pragma redefine_extname,
6485# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6486# structures (such as rlimit64) without declaring them. As a
6487# work-around, disable LFS on such configurations
6488
6489use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6491$as_echo_n "checking Solaris LFS bug... " >&6; }
6492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006493/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006494
6495#define _LARGEFILE_SOURCE 1
6496#define _FILE_OFFSET_BITS 64
6497#include <sys/resource.h>
6498
Martin v. Löwis399a6892002-10-04 10:22:02 +00006499int
6500main ()
6501{
6502struct rlimit foo;
6503 ;
6504 return 0;
6505}
6506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006508 sol_lfs_bug=no
6509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6514$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006515if test "$sol_lfs_bug" = "yes"; then
6516 use_lfs=no
6517fi
6518
6519if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006520# Two defines needed to enable largefile support on various platforms
6521# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006522case $ac_sys_system/$ac_sys_release in
6523AIX*)
6524
6525$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6526
6527 ;;
6528esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006530$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006534
Martin v. Löwis399a6892002-10-04 10:22:02 +00006535fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006536
Guido van Rossum84e7b241996-08-19 21:59:00 +00006537# Add some code to confdefs.h so that the test for off_t works on SCO
6538cat >> confdefs.h <<\EOF
6539#if defined(SCO_DS)
6540#undef _OFF_T
6541#endif
6542EOF
6543
Guido van Rossumef2255b2000-03-10 22:30:29 +00006544# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006545ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006546if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548else
Martin v. Löwis11437992002-04-12 09:54:03 +00006549
6550cat >>confdefs.h <<_ACEOF
6551#define mode_t int
6552_ACEOF
6553
6554fi
6555
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006557if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559else
Martin v. Löwis11437992002-04-12 09:54:03 +00006560
6561cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006563_ACEOF
6564
6565fi
6566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006567ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006568if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571
6572cat >>confdefs.h <<_ACEOF
6573#define pid_t int
6574_ACEOF
6575
6576fi
6577
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006578
Martin v. Löwis11437992002-04-12 09:54:03 +00006579cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006580#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006581_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006583ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006584if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006586else
Martin v. Löwis11437992002-04-12 09:54:03 +00006587
6588cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006589#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006590_ACEOF
6591
6592fi
6593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6595$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006596if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006601#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006602
6603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006606 ac_cv_type_uid_t=yes
6607else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006608 ac_cv_type_uid_t=no
6609fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006610rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006611
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6614$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006615if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006620$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621
6622fi
6623
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006624ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6625case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006626 no|yes) ;; #(
6627 *)
6628
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006630
6631
6632cat >>confdefs.h <<_ACEOF
6633#define uint32_t $ac_cv_c_uint32_t
6634_ACEOF
6635;;
6636 esac
6637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6639case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006640 no|yes) ;; #(
6641 *)
6642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006643$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006644
6645
6646cat >>confdefs.h <<_ACEOF
6647#define uint64_t $ac_cv_c_uint64_t
6648_ACEOF
6649;;
6650 esac
6651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6653case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006654 no|yes) ;; #(
6655 *)
6656
6657cat >>confdefs.h <<_ACEOF
6658#define int32_t $ac_cv_c_int32_t
6659_ACEOF
6660;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006661esac
6662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6664case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006665 no|yes) ;; #(
6666 *)
6667
6668cat >>confdefs.h <<_ACEOF
6669#define int64_t $ac_cv_c_int64_t
6670_ACEOF
6671;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006672esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Charles-François Natali97781b02011-07-22 23:43:42 +02006675if test "x$ac_cv_type_ssize_t" = x""yes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006678
6679fi
6680
Jack Jansendd19cf82001-12-06 22:36:17 +00006681
Michael W. Hudson54241132001-12-07 15:38:26 +00006682# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006683# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684# The cast to long int works around a bug in the HP C Compiler
6685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6687# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6689$as_echo_n "checking size of int... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006690if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693 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 +00006694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006696 if test "$ac_cv_type_int" = yes; then
6697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006699as_fn_error 77 "cannot compute sizeof (int)
Charles-François Natali97781b02011-07-22 23:43:42 +02006700See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701 else
6702 ac_cv_sizeof_int=0
6703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006704fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6708$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709
6710
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006713#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006715
6716
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717# The cast to long int works around a bug in the HP C Compiler
6718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6722$as_echo_n "checking size of long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006723if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726 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 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006729 if test "$ac_cv_type_long" = yes; then
6730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006732as_fn_error 77 "cannot compute sizeof (long)
Charles-François Natali97781b02011-07-22 23:43:42 +02006733See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734 else
6735 ac_cv_sizeof_long=0
6736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6741$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742
6743
6744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006746#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006747_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006748
6749
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750# The cast to long int works around a bug in the HP C Compiler
6751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6753# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6755$as_echo_n "checking size of void *... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006756if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006758else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006759 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 +00006760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 if test "$ac_cv_type_void_p" = yes; then
6763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006765as_fn_error 77 "cannot compute sizeof (void *)
Charles-François Natali97781b02011-07-22 23:43:42 +02006766See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767 else
6768 ac_cv_sizeof_void_p=0
6769 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6774$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775
6776
6777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006779#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006781
6782
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783# The cast to long int works around a bug in the HP C Compiler
6784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6786# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6788$as_echo_n "checking size of short... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006789if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006792 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 +00006793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795 if test "$ac_cv_type_short" = yes; then
6796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006798as_fn_error 77 "cannot compute sizeof (short)
Charles-François Natali97781b02011-07-22 23:43:42 +02006799See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 else
6801 ac_cv_sizeof_short=0
6802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6807$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808
6809
6810
Martin v. Löwis11437992002-04-12 09:54:03 +00006811cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006813_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814
6815
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816# The cast to long int works around a bug in the HP C Compiler
6817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6819# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6821$as_echo_n "checking size of float... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006822if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006825 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 +00006826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 if test "$ac_cv_type_float" = yes; then
6829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006831as_fn_error 77 "cannot compute sizeof (float)
Charles-François Natali97781b02011-07-22 23:43:42 +02006832See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833 else
6834 ac_cv_sizeof_float=0
6835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6840$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841
6842
6843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006846_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006847
6848
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849# The cast to long int works around a bug in the HP C Compiler
6850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6854$as_echo_n "checking size of double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006855if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858 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 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 if test "$ac_cv_type_double" = yes; then
6862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006864as_fn_error 77 "cannot compute sizeof (double)
Charles-François Natali97781b02011-07-22 23:43:42 +02006865See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006866 else
6867 ac_cv_sizeof_double=0
6868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6873$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874
6875
6876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006880
6881
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882# The cast to long int works around a bug in the HP C Compiler
6883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6887$as_echo_n "checking size of fpos_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006888if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006891 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 +00006892
Martin v. Löwis11437992002-04-12 09:54:03 +00006893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894 if test "$ac_cv_type_fpos_t" = yes; then
6895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006897as_fn_error 77 "cannot compute sizeof (fpos_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006898See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899 else
6900 ac_cv_sizeof_fpos_t=0
6901 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903
Martin v. Löwis11437992002-04-12 09:54:03 +00006904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6906$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908
6909
Martin v. Löwis11437992002-04-12 09:54:03 +00006910cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006911#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006912_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006913
Michael W. Hudson54241132001-12-07 15:38:26 +00006914
Martin v. Löwiseba40652007-08-30 20:10:57 +00006915# The cast to long int works around a bug in the HP C Compiler
6916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6920$as_echo_n "checking size of size_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006921if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006924 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 +00006925
Martin v. Löwis18e16552006-02-15 17:27:45 +00006926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927 if test "$ac_cv_type_size_t" = yes; then
6928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006930as_fn_error 77 "cannot compute sizeof (size_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006931See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932 else
6933 ac_cv_sizeof_size_t=0
6934 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006936
Martin v. Löwis18e16552006-02-15 17:27:45 +00006937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6939$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940
6941
6942
Martin v. Löwis18e16552006-02-15 17:27:45 +00006943cat >>confdefs.h <<_ACEOF
6944#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6945_ACEOF
6946
6947
Christian Heimes951cc0f2008-01-31 23:08:23 +00006948# The cast to long int works around a bug in the HP C Compiler
6949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6951# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6953$as_echo_n "checking size of pid_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02006954if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00006956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957 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 +00006958
Christian Heimes951cc0f2008-01-31 23:08:23 +00006959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960 if test "$ac_cv_type_pid_t" = yes; then
6961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006963as_fn_error 77 "cannot compute sizeof (pid_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02006964See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006965 else
6966 ac_cv_sizeof_pid_t=0
6967 fi
6968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969
Christian Heimes951cc0f2008-01-31 23:08:23 +00006970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6972$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00006973
6974
6975
6976cat >>confdefs.h <<_ACEOF
6977#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6978_ACEOF
6979
6980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6983$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006987
Martin v. Löwis11437992002-04-12 09:54:03 +00006988int
6989main ()
6990{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006991long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 ;
6993 return 0;
6994}
6995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
6998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007000
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007001 have_long_long=yes
7002
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7006$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007007if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008# The cast to long int works around a bug in the HP C Compiler
7009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7011# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7013$as_echo_n "checking size of long long... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007014if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007015 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017 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 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 if test "$ac_cv_type_long_long" = yes; then
7021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007023as_fn_error 77 "cannot compute sizeof (long long)
Charles-François Natali97781b02011-07-22 23:43:42 +02007024See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025 else
7026 ac_cv_sizeof_long_long=0
7027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029
Martin v. Löwis11437992002-04-12 09:54:03 +00007030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7032$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033
7034
7035
Martin v. Löwis11437992002-04-12 09:54:03 +00007036cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007037#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007039
Michael W. Hudson54241132001-12-07 15:38:26 +00007040
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007041fi
7042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7044$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007045have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007047/* end confdefs.h. */
7048
7049int
7050main ()
7051{
Matthias Klosec511b472010-05-08 11:01:39 +00007052long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007053 ;
7054 return 0;
7055}
7056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007058
7059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007061
7062 have_long_double=yes
7063
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007064fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7067$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007068if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007069# The cast to long int works around a bug in the HP C Compiler
7070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7072# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7074$as_echo_n "checking size of long double... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007075if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007076 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078 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 +00007079
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081 if test "$ac_cv_type_long_double" = yes; then
7082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007084as_fn_error 77 "cannot compute sizeof (long double)
Charles-François Natali97781b02011-07-22 23:43:42 +02007085See \`config.log' for more details" "$LINENO" 5 ; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007086 else
7087 ac_cv_sizeof_long_double=0
7088 fi
7089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007090
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7093$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007094
7095
7096
7097cat >>confdefs.h <<_ACEOF
7098#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7099_ACEOF
7100
7101
7102fi
7103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7105$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007106have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007108/* end confdefs.h. */
7109
7110int
7111main ()
7112{
7113_Bool x; x = (_Bool)0;
7114 ;
7115 return 0;
7116}
7117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007119
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007122
7123 have_c99_bool=yes
7124
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7128$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007129if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130# The cast to long int works around a bug in the HP C Compiler
7131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7135$as_echo_n "checking size of _Bool... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007136if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 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 +00007140
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142 if test "$ac_cv_type__Bool" = yes; then
7143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007145as_fn_error 77 "cannot compute sizeof (_Bool)
Charles-François Natali97781b02011-07-22 23:43:42 +02007146See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 else
7148 ac_cv_sizeof__Bool=0
7149 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007151
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7154$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155
7156
7157
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007158cat >>confdefs.h <<_ACEOF
7159#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7160_ACEOF
7161
7162
7163fi
7164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165ac_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 +00007166 #include <stdint.h>
7167 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007168 #ifdef HAVE_INTTYPES_H
7169 #include <inttypes.h>
7170 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007171"
Charles-François Natali97781b02011-07-22 23:43:42 +02007172if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007173
7174cat >>confdefs.h <<_ACEOF
7175#define HAVE_UINTPTR_T 1
7176_ACEOF
7177
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178# The cast to long int works around a bug in the HP C Compiler
7179# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7180# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7181# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7183$as_echo_n "checking size of uintptr_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007184if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187 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 +00007188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190 if test "$ac_cv_type_uintptr_t" = yes; then
7191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007193as_fn_error 77 "cannot compute sizeof (uintptr_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007194See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195 else
7196 ac_cv_sizeof_uintptr_t=0
7197 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199
Martin v. Löwis11437992002-04-12 09:54:03 +00007200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7202$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007203
7204
7205
Martin v. Löwis11437992002-04-12 09:54:03 +00007206cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007207#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007208_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007209
Michael W. Hudson54241132001-12-07 15:38:26 +00007210
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007211fi
7212
Martin v. Löwisebe26702006-10-02 14:55:51 +00007213
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007214# The cast to long int works around a bug in the HP C Compiler
7215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7217# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7219$as_echo_n "checking size of off_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007220if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007224#ifdef HAVE_SYS_TYPES_H
7225#include <sys/types.h>
7226#endif
7227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007228"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007229
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231 if test "$ac_cv_type_off_t" = yes; then
7232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007234as_fn_error 77 "cannot compute sizeof (off_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007235See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007236 else
7237 ac_cv_sizeof_off_t=0
7238 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7243$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007244
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007245
7246
Martin v. Löwis11437992002-04-12 09:54:03 +00007247cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007248#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007249_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7254$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007255if test "$have_long_long" = yes
7256then
7257if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007258 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7263$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7266$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007267fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007271fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007272
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007273# The cast to long int works around a bug in the HP C Compiler
7274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7276# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7278$as_echo_n "checking size of time_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007279if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007283#ifdef HAVE_SYS_TYPES_H
7284#include <sys/types.h>
7285#endif
7286#ifdef HAVE_TIME_H
7287#include <time.h>
7288#endif
7289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293 if test "$ac_cv_type_time_t" = yes; then
7294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007296as_fn_error 77 "cannot compute sizeof (time_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007297See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007298 else
7299 ac_cv_sizeof_time_t=0
7300 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7305$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007307
7308
Martin v. Löwis11437992002-04-12 09:54:03 +00007309cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007310#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007311_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007312
Michael W. Hudson54241132001-12-07 15:38:26 +00007313
7314
Trent Mick635f6fb2000-08-23 21:33:05 +00007315# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007316ac_save_cc="$CC"
7317if test "$ac_cv_kpthread" = "yes"
7318then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007319elif test "$ac_cv_kthread" = "yes"
7320then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007321elif test "$ac_cv_pthread" = "yes"
7322then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7325$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007326have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007329
7330 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007331int
7332main ()
7333{
Guido van Rossum12580492000-09-24 16:47:19 +00007334pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007335 ;
7336 return 0;
7337}
Matthias Klosec511b472010-05-08 11:01:39 +00007338
Martin v. Löwis11437992002-04-12 09:54:03 +00007339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007341 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7345$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007346if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7350# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7352$as_echo_n "checking size of pthread_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007353if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007357#ifdef HAVE_PTHREAD_H
7358#include <pthread.h>
7359#endif
7360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007362
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364 if test "$ac_cv_type_pthread_t" = yes; then
7365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007367as_fn_error 77 "cannot compute sizeof (pthread_t)
Charles-François Natali97781b02011-07-22 23:43:42 +02007368See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007369 else
7370 ac_cv_sizeof_pthread_t=0
7371 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373
Trent Mick635f6fb2000-08-23 21:33:05 +00007374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7376$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007377
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007378
7379
Martin v. Löwis11437992002-04-12 09:54:03 +00007380cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007381#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007382_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007383
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007384
Trent Mick635f6fb2000-08-23 21:33:05 +00007385fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007386CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7389$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007390# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392 enableval=$enable_toolbox_glue;
7393fi
Jack Jansene578a632001-08-15 01:27:14 +00007394
7395
7396if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007397then
Jack Jansene578a632001-08-15 01:27:14 +00007398 case $ac_sys_system/$ac_sys_release in
7399 Darwin/*)
7400 enable_toolbox_glue="yes";;
7401 *)
7402 enable_toolbox_glue="no";;
7403 esac
7404fi
7405case "$enable_toolbox_glue" in
7406yes)
Jack Jansene578a632001-08-15 01:27:14 +00007407 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007408 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007409
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007411
7412 ;;
7413*)
Jack Jansene578a632001-08-15 01:27:14 +00007414 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007415 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007416 ;;
7417esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7419$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007420
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007421
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007422
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007423case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007424 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007425 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7426 ;;
7427 Darwin/*)
7428 OTHER_LIBTOOL_OPT=""
7429 ;;
7430esac
7431
7432
Ronald Oussoren25967582009-09-06 10:00:26 +00007433ARCH_RUN_32BIT=""
7434
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007435case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007436 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007437 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7438 if test "${enable_universalsdk}"; then
7439 :
7440 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007441 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007442 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007445 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007446 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007447 if test ${gcc_version} '<' 4.0
7448 then
7449 LIBTOOL_CRUFT="-lcc_dynamic"
7450 else
7451 LIBTOOL_CRUFT=""
7452 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007454 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007457/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007458
Ronald Oussoren25967582009-09-06 10:00:26 +00007459 #include <unistd.h>
7460 int main(int argc, char*argv[])
7461 {
7462 if (sizeof(long) == 4) {
7463 return 0;
7464 } else {
7465 return 1;
7466 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007467 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007468
Ronald Oussoren25967582009-09-06 10:00:26 +00007469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007471 ac_osx_32bit=yes
7472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007474fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007477fi
7478
7479
Ronald Oussoren25967582009-09-06 10:00:26 +00007480 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007481 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007482 i386)
7483 MACOSX_DEFAULT_ARCH="i386"
7484 ;;
7485 ppc)
7486 MACOSX_DEFAULT_ARCH="ppc"
7487 ;;
7488 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007489 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007490 ;;
7491 esac
7492 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007493 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007494 i386)
7495 MACOSX_DEFAULT_ARCH="x86_64"
7496 ;;
7497 ppc)
7498 MACOSX_DEFAULT_ARCH="ppc64"
7499 ;;
7500 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007501 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007502 ;;
7503 esac
7504
7505 #ARCH_RUN_32BIT="true"
7506 fi
7507
7508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007510 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007511esac
7512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7514$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007515if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007516then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007517 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007519 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7524$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007525 if test $enable_shared = "yes"
7526 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007527 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 +00007528 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532fi
7533
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7535$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007536case $ac_sys_system/$ac_sys_release in
7537 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7542$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007543 ;;
7544 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007547 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007548esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007549
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007551
Michael W. Hudson54241132001-12-07 15:38:26 +00007552
7553
7554
7555
Ronald Oussoren75912852010-04-08 08:13:31 +00007556
Guido van Rossum0a516c91994-09-12 10:58:40 +00007557# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007558# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7560$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007561if test -z "$SO"
7562then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007563 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007564 hp*|HP*)
7565 case `uname -m` in
7566 ia64) SO=.so;;
7567 *) SO=.sl;;
7568 esac
7569 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007570 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007571 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007572 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007573else
7574 # this might also be a termcap variable, see #610332
7575 echo
7576 echo '====================================================================='
7577 echo '+ +'
7578 echo '+ WARNING: You have set SO in your environment. +'
7579 echo '+ Do you really mean to change the extension for shared libraries? +'
7580 echo '+ Continuing in 10 seconds to let you to ponder. +'
7581 echo '+ +'
7582 echo '====================================================================='
7583 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7586$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007587
Ronald Oussoren79f90492009-01-02 10:44:46 +00007588
Neal Norwitz58e28882006-05-19 07:00:58 +00007589cat >>confdefs.h <<_ACEOF
7590#define SHLIB_EXT "$SO"
7591_ACEOF
7592
Guido van Rossum0a516c91994-09-12 10:58:40 +00007593# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007594# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007595# (Shared libraries in this instance are shared modules to be loaded into
7596# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7598$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007599if test -z "$LDSHARED"
7600then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007601 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007602 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007603 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007604 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007605 ;;
7606 BeOS*)
7607 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007608 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007609 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007610 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007611 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007613 if test "$GCC" = "yes" ; then
7614 LDSHARED='$(CC) -shared'
7615 LDCXXSHARED='$(CXX) -shared'
7616 else
7617 LDSHARED='$(CC) -G'
7618 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007619 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007620 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007621 if test "$GCC" = "yes" ; then
7622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared'
7624 else
7625 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007626 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007627 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007628 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007629 LDSHARED='$(CC) -bundle'
7630 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007631 if test "$enable_framework" ; then
7632 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007633 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7634 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007635 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007636 else
7637 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007638 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007639 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007640 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007641 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007642 LDSHARED='$(CC) -bundle'
7643 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007644 if test "$enable_framework" ; then
7645 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007646 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7647 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007648 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007649 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007650 # No framework, use the Python app as bundle-loader
7651 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007652 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007653 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007654 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007655 Darwin/*)
7656 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7657 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007658
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007659 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007660 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007661 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007662 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007663 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007664 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7665 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007666 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007667 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007668 LDSHARED='$(CC) -bundle'
7669 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007670 if test "$enable_framework" ; then
7671 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007672 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7673 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007674 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007675 else
7676 # No framework, use the Python app as bundle-loader
7677 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7678 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007679 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007680 fi
7681 fi
7682 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007683 Linux*|GNU*|QNX*)
7684 LDSHARED='$(CC) -shared'
7685 LDCXXSHARED='$(CXX) -shared';;
7686 BSD/OS*/4*)
7687 LDSHARED="gcc -shared"
7688 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007689 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007690 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007691 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007692 LDSHARED='$(CC) -shared'
7693 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007694 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007695 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007696 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007697 OpenBSD*)
7698 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7699 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007700 LDSHARED='$(CC) -shared $(CCSHARED)'
7701 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007702 else
7703 case `uname -r` in
7704 [01].* | 2.[0-7] | 2.[0-7].*)
7705 LDSHARED="ld -Bshareable ${LDFLAGS}"
7706 ;;
7707 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007708 LDSHARED='$(CC) -shared $(CCSHARED)'
7709 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007710 ;;
7711 esac
7712 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007713 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007714 LDSHARED='$(CC) -shared'
7715 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007716 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007717 if test "$GCC" = "yes" ; then
7718 LDSHARED='$(CC) -shared'
7719 LDCXXSHARED='$(CXX) -shared'
7720 else
7721 LDSHARED='$(CC) -G'
7722 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007723 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007724 SCO_SV*)
7725 LDSHARED='$(CC) -Wl,-G,-Bexport'
7726 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7727 CYGWIN*)
7728 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7729 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7730 atheos*)
7731 LDSHARED="gcc -shared"
7732 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007733 *) LDSHARED="ld";;
7734 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7737$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007738LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007739BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007740# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007741# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7743$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007744if test -z "$CCSHARED"
7745then
Guido van Rossum07397971997-04-29 21:49:50 +00007746 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007747 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007748 then CCSHARED="-fPIC";
7749 elif test `uname -p` = sparc;
7750 then CCSHARED="-xcode=pic32";
7751 else CCSHARED="-Kpic";
7752 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007753 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007754 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007755 else CCSHARED="+z";
7756 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007757 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007758 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007759 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007760 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007761 if test "$GCC" = "yes"
7762 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007763 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007764 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007765 SCO_SV*)
7766 if test "$GCC" = "yes"
7767 then CCSHARED="-fPIC"
7768 else CCSHARED="-Kpic -belf"
7769 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007770 IRIX*/6*) case $CC in
7771 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007772 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007773 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007774 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007775 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7778$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007779# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007780# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7782$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007783if test -z "$LINKFORSHARED"
7784then
Guido van Rossum07397971997-04-29 21:49:50 +00007785 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007786 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007787 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007788 LINKFORSHARED="-Wl,-E -Wl,+s";;
7789# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007790 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007791 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007792 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007794 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7795 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007796 # not used by the core itself but which needs to be in the core so
7797 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007798 # -prebind is no longer used, because it actually seems to give a
7799 # slowdown in stead of a speedup, maybe due to the large number of
7800 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007801
7802 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007803 if test "$enable_framework"
7804 then
Jack Jansenda49e192005-01-07 13:08:22 +00007805 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007806 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007807 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007808 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007809 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007810 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007812 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7813 then
7814 LINKFORSHARED="-Wl,--export-dynamic"
7815 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007816 SunOS/5*) case $CC in
7817 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007818 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007819 then
7820 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007821 fi;;
7822 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007823 CYGWIN*)
7824 if test $enable_shared = "no"
7825 then
7826 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7827 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007828 QNX*)
7829 # -Wl,-E causes the symbols to be added to the dynamic
7830 # symbol table so that they can be found when a module
7831 # is loaded. -N 2048K causes the stack size to be set
7832 # to 2048 kilobytes so that the stack doesn't overflow
7833 # when running test_compile.py.
7834 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007835 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007836fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7838$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007839
Michael W. Hudson54241132001-12-07 15:38:26 +00007840
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7843$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007844if test ! "$LIBRARY" = "$LDLIBRARY"
7845then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007846 case $ac_sys_system in
7847 CYGWIN*)
7848 # Cygwin needs CCSHARED when building extension DLLs
7849 # but not when building the interpreter DLL.
7850 CFLAGSFORSHARED='';;
7851 *)
7852 CFLAGSFORSHARED='$(CCSHARED)'
7853 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7856$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007857
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007858# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7859# library (with --enable-shared).
7860# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007861# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7862# if it is not required, since it creates a dependency of the shared library
7863# to LIBS. This, in turn, means that applications linking the shared libpython
7864# don't need to link LIBS explicitly. The default should be only changed
7865# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7868$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007869case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007870 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007871 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007872esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7874$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007875
7876
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7879$as_echo_n "checking for dlopen in -ldl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007880if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007884LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888/* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891#ifdef __cplusplus
7892extern "C"
7893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007894char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007895int
7896main ()
7897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ;
7900 return 0;
7901}
7902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007903if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7913$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007914if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 cat >>confdefs.h <<_ACEOF
7916#define HAVE_LIBDL 1
7917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007919 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921fi
7922 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7924$as_echo_n "checking for shl_load in -ldld... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007925if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007929LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933/* Override any GCC internal prototype to avoid an error.
7934 Use char because int might match the return type of a GCC
7935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936#ifdef __cplusplus
7937extern "C"
7938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007939char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007951 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007952fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007955LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7958$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007959if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 cat >>confdefs.h <<_ACEOF
7961#define HAVE_LIBDLD 1
7962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007964 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966fi
7967 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968
Ronald Oussoren79f90492009-01-02 10:44:46 +00007969# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007970if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7972$as_echo_n "checking for library containing sem_init... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02007973if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007975else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007976 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007986char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995for ac_lib in '' pthread rt posix4; do
7996 if test -z "$ac_lib"; then
7997 ac_res="none required"
7998 else
7999 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext
Charles-François Natali97781b02011-07-22 23:43:42 +02008007 if test "${ac_cv_search_sem_init+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010done
Charles-François Natali97781b02011-07-22 23:43:42 +02008011if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008012
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013else
8014 ac_cv_search_sem_init=no
8015fi
8016rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008017LIBS=$ac_func_search_save_LIBS
8018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8020$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008024
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008025fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008026 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008027 # posix4 on Solaris 2.6
8028 # pthread (first!) on Linux
8029fi
8030
Martin v. Löwis19d17342003-06-14 21:03:05 +00008031# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8033$as_echo_n "checking for textdomain in -lintl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008034if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008035 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008036else
8037 ac_check_lib_save_LIBS=$LIBS
8038LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008041
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042/* Override any GCC internal prototype to avoid an error.
8043 Use char because int might match the return type of a GCC
8044 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008045#ifdef __cplusplus
8046extern "C"
8047#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008048char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008049int
8050main ()
8051{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008053 ;
8054 return 0;
8055}
8056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008058 ac_cv_lib_intl_textdomain=yes
8059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062rm -f core conftest.err conftest.$ac_objext \
8063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008064LIBS=$ac_check_lib_save_LIBS
8065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8067$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008068if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008069
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008071
8072fi
8073
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008074
8075# checks for system dependent C++ extensions support
8076case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8078$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008081
Georg Brandl94800df2011-02-25 11:09:02 +00008082 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008083int
8084main ()
8085{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008086loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 ;
8088 return 0;
8089}
Matthias Klosec511b472010-05-08 11:01:39 +00008090
Martin v. Löwis11437992002-04-12 09:54:03 +00008091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008093
Matthias Klosec511b472010-05-08 11:01:39 +00008094
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008096
Matthias Klosec511b472010-05-08 11:01:39 +00008097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008098$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008099
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008100else
Matthias Klosec511b472010-05-08 11:01:39 +00008101
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008104
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106rm -f core conftest.err conftest.$ac_objext \
8107 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008108 *) ;;
8109esac
8110
Guido van Rossum70c7f481998-03-26 18:44:10 +00008111# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008112# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8114$as_echo_n "checking for t_open in -lnsl... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008115if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008116 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008119LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123/* Override any GCC internal prototype to avoid an error.
8124 Use char because int might match the return type of a GCC
8125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126#ifdef __cplusplus
8127extern "C"
8128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008129char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 ;
8135 return 0;
8136}
8137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143rm -f core conftest.err conftest.$ac_objext \
8144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8148$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008149if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008150 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008151fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008152 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8154$as_echo_n "checking for socket in -lsocket... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008155if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008157else
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008159LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163/* Override any GCC internal prototype to avoid an error.
8164 Use char because int might match the return type of a GCC
8165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008166#ifdef __cplusplus
8167extern "C"
8168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008169char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008170int
8171main ()
8172{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ;
8175 return 0;
8176}
8177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008180else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008183rm -f core conftest.err conftest.$ac_objext \
8184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8188$as_echo "$ac_cv_lib_socket_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008189if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008190 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008191fi
8192 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008193
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008194case "$ac_sys_system" in
8195BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8197$as_echo_n "checking for socket in -lnet... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008198if test "${ac_cv_lib_net_socket+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008200else
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008202LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206/* Override any GCC internal prototype to avoid an error.
8207 Use char because int might match the return type of a GCC
8208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209#ifdef __cplusplus
8210extern "C"
8211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008212char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008213int
8214main ()
8215{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 ;
8218 return 0;
8219}
8220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008224 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008226rm -f core conftest.err conftest.$ac_objext \
8227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8231$as_echo "$ac_cv_lib_net_socket" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008232if test "x$ac_cv_lib_net_socket" = x""yes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008234fi
8235 # BeOS
8236;;
8237esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008238
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8240$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8246$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008247LIBS="$withval $LIBS"
8248
8249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252fi
8253
Guido van Rossum7f43da71994-08-01 12:15:30 +00008254
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008255if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008256 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8257set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8259$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008260if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008262else
8263 case $PKG_CONFIG in
8264 [\\/]* | ?:[\\/]*)
8265 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8266 ;;
8267 *)
8268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8269for as_dir in $PATH
8270do
8271 IFS=$as_save_IFS
8272 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008273 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8275 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008277 break 2
8278 fi
8279done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008281IFS=$as_save_IFS
8282
8283 ;;
8284esac
8285fi
8286PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8287if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8289$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008293fi
8294
8295
8296fi
8297if test -z "$ac_cv_path_PKG_CONFIG"; then
8298 ac_pt_PKG_CONFIG=$PKG_CONFIG
8299 # Extract the first word of "pkg-config", so it can be a program name with args.
8300set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8302$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008303if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008305else
8306 case $ac_pt_PKG_CONFIG in
8307 [\\/]* | ?:[\\/]*)
8308 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8309 ;;
8310 *)
8311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312for as_dir in $PATH
8313do
8314 IFS=$as_save_IFS
8315 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008317 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8318 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008320 break 2
8321 fi
8322done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008323 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008324IFS=$as_save_IFS
8325
8326 ;;
8327esac
8328fi
8329ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8330if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8332$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8335$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008336fi
8337
8338 if test "x$ac_pt_PKG_CONFIG" = x; then
8339 PKG_CONFIG=""
8340 else
8341 case $cross_compiling:$ac_tool_warned in
8342yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008345ac_tool_warned=yes ;;
8346esac
8347 PKG_CONFIG=$ac_pt_PKG_CONFIG
8348 fi
8349else
8350 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8351fi
8352
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008353
8354# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8356$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008357
8358# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008360 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008361else
8362 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008363fi
8364
8365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8367$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008368
8369# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8371$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008372
8373# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008374if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008375 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008376else
8377 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008378fi
8379
8380
8381if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008382 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8383else
8384 LIBFFI_INCLUDEDIR=""
8385fi
8386
8387
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8389$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008390
Benjamin Peterson867475c2009-04-29 20:36:25 +00008391# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8393$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008394
8395# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008396if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008397 withval=$with_dbmliborder;
8398if test x$with_dbmliborder = xyes
8399then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008400as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008401else
8402 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8403 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8404 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008405 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008406 fi
8407 done
8408fi
8409fi
8410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8412$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008413
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008414# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008415
8416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8418$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422 withval=$with_signal_module;
8423fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008424
8425
8426if test -z "$with_signal_module"
8427then with_signal_module="yes"
8428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8430$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008431
8432if test "${with_signal_module}" = "yes"; then
8433 USE_SIGNAL_MODULE=""
8434 SIGNAL_OBJS=""
8435else
8436 USE_SIGNAL_MODULE="#"
8437 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8438fi
8439
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008440# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008441
Barry Warsawc0d24d82000-06-29 16:12:00 +00008442USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008443
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8445$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Guido van Rossumec2f0731997-01-22 20:54:01 +00008447
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008449if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8452$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008453LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008454if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008455 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008456fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008457else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460fi
8461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463# Templates for things AC_DEFINEd more than once.
8464# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008465
8466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
8468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8470$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 withval=$with_threads;
8475fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008476
8477
Barry Warsawc0d24d82000-06-29 16:12:00 +00008478# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008482 withval=$with_thread; with_threads=$with_thread
8483fi
8484
Barry Warsawc0d24d82000-06-29 16:12:00 +00008485
8486if test -z "$with_threads"
8487then with_threads="yes"
8488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8490$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008491
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008492
Barry Warsawc0d24d82000-06-29 16:12:00 +00008493if test "$with_threads" = "no"
8494then
8495 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008496elif test "$ac_cv_pthread_is_default" = yes
8497then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008499
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008500 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008502
8503 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008505elif test "$ac_cv_kpthread" = "yes"
8506then
8507 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008508 if test "$ac_cv_cxx_thread" = "yes"; then
8509 CXX="$CXX -Kpthread"
8510 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008513 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008514 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008515elif test "$ac_cv_kthread" = "yes"
8516then
8517 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008518 if test "$ac_cv_cxx_thread" = "yes"; then
8519 CXX="$CXX -Kthread"
8520 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008522
8523 posix_threads=yes
8524 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008525elif test "$ac_cv_pthread" = "yes"
8526then
8527 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008528 if test "$ac_cv_cxx_thread" = "yes"; then
8529 CXX="$CXX -pthread"
8530 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008532
8533 posix_threads=yes
8534 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008535else
8536 if test ! -z "$with_threads" -a -d "$with_threads"
8537 then LDFLAGS="$LDFLAGS -L$with_threads"
8538 fi
8539 if test ! -z "$withval" -a -d "$withval"
8540 then LDFLAGS="$LDFLAGS -L$withval"
8541 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008542
8543 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008544 # define _POSIX_THREADS in unistd.h. Some apparently don't
8545 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8547$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008550
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008551#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008552#ifdef _POSIX_THREADS
8553yes
8554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
8556_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008559 unistd_defines_pthreads=yes
8560else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008561 unistd_defines_pthreads=no
8562fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008563rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8566$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008567
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008568 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008570 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 +02008571if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008574 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008577$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008578
8579 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008580 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008583 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 +02008584if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008587 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008591
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008592 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008593else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8596$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Martin v. Löwiseba40652007-08-30 20:10:57 +00008598# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599if test "${with_pth+set}" = set; then :
8600 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8601$as_echo "$withval" >&6; }
8602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008603
8604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008605$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008607 LIBS="-lpth $LIBS"
8608 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008612
8613 # Just looking for pthread_create in libpthread is not enough:
8614 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8615 # So we really have to include pthread.h, and then link.
8616 _libs=$LIBS
8617 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8619$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008622#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008623
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008624void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008625int
8626main ()
8627{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008628
8629pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
8633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8637$as_echo "yes" >&6; }
8638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008639
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008640 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008641 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008644 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008645 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Charles-François Natali97781b02011-07-22 23:43:42 +02008646if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008649 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008650 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008651else
Guido van Rossumad678af1998-10-02 14:42:15 +00008652
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653 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 +02008654if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008655 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656
8657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008659
8660 THREADOBJ="Python/thread.o"
8661else
8662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663 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 +02008664if test "x$ac_cv_header_kernel_OS_h" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
8667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008669
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008670 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008671else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8674$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008675if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008677else
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008679LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008682
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683/* Override any GCC internal prototype to avoid an error.
8684 Use char because int might match the return type of a GCC
8685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686#ifdef __cplusplus
8687extern "C"
8688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008689char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008690int
8691main ()
8692{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ;
8695 return 0;
8696}
8697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008701 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008703rm -f core conftest.err conftest.$ac_objext \
8704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008705LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8708$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008709if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008710 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008711
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008712 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008713 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008714 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008715else
Greg Steinadf63d62000-07-05 10:38:09 +00008716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8718$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008719if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008720 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008721else
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008723LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008726
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727/* Override any GCC internal prototype to avoid an error.
8728 Use char because int might match the return type of a GCC
8729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730#ifdef __cplusplus
8731extern "C"
8732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008733char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008734int
8735main ()
8736{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ;
8739 return 0;
8740}
8741_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008747rm -f core conftest.err conftest.$ac_objext \
8748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8752$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008753if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008757 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008758 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008759else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8762$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008763if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008764 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008765else
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008767LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771/* Override any GCC internal prototype to avoid an error.
8772 Use char because int might match the return type of a GCC
8773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774#ifdef __cplusplus
8775extern "C"
8776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008777char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008778int
8779main ()
8780{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ;
8783 return 0;
8784}
8785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008791rm -f core conftest.err conftest.$ac_objext \
8792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8796$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008797if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008799
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008800 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008802 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008803else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008804
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8806$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008807if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008808 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008809else
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008811LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815/* Override any GCC internal prototype to avoid an error.
8816 Use char because int might match the return type of a GCC
8817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008818#ifdef __cplusplus
8819extern "C"
8820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008821char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008822int
8823main ()
8824{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ;
8827 return 0;
8828}
8829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008833 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008837LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8840$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008841if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008845 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008846 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008847else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008848
Martin v. Löwis130fb172001-07-19 11:00:41 +00008849 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008850fi
8851
Guido van Rossum627b2d71993-12-24 10:39:16 +00008852
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008853fi
8854
Guido van Rossum0be3e491997-05-22 20:33:33 +00008855fi
8856
Guido van Rossum49545951997-12-02 19:28:29 +00008857fi
8858
Guido van Rossumb93a8621998-05-07 13:27:32 +00008859fi
8860
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862fi
8863
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008864
8865fi
8866
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008868rm -f core conftest.err conftest.$ac_objext \
8869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870fi
8871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872fi
8873
8874
8875fi
8876
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008877
Michael W. Hudson54241132001-12-07 15:38:26 +00008878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8880$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008881if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008885LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889/* Override any GCC internal prototype to avoid an error.
8890 Use char because int might match the return type of a GCC
8891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#ifdef __cplusplus
8893extern "C"
8894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008895char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ;
8901 return 0;
8902}
8903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008909rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008911LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8914$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008915if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917
Martin v. Löwis130fb172001-07-19 11:00:41 +00008918 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008919 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008920 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008921fi
8922
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008923
Neal Norwitza978ab02002-11-02 16:58:05 +00008924 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8926$as_echo_n "checking for thr_create in -lthread... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008927if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008929else
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008931LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935/* Override any GCC internal prototype to avoid an error.
8936 Use char because int might match the return type of a GCC
8937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938#ifdef __cplusplus
8939extern "C"
8940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008941char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008945return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ;
8947 return 0;
8948}
8949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008953 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955rm -f core conftest.err conftest.$ac_objext \
8956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008957LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8960$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02008961if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008964 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008965 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008966 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008967fi
8968
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008969 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008970
Martin v. Löwis130fb172001-07-19 11:00:41 +00008971 if test "$USE_THREAD_MODULE" != "#"
8972 then
8973 # If the above checks didn't disable threads, (at least) OSF1
8974 # needs this '-threads' argument during linking.
8975 case $ac_sys_system in
8976 OSF1) LDLAST=-threads;;
8977 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008978 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008979fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008981if test "$posix_threads" = "yes"; then
8982 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008985
8986 fi
8987
8988 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8989 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02008990 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008992
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008993 ;;
8994 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008995$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008996
8997 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02008998 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008999$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009000
9001 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009002 esac
9003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9005$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009006 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010 ac_cv_pthread_system_supported=no
9011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009014#include <pthread.h>
9015 void *foo(void *parm) {
9016 return NULL;
9017 }
9018 main() {
9019 pthread_attr_t attr;
9020 pthread_t id;
9021 if (pthread_attr_init(&attr)) exit(-1);
9022 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9023 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9024 exit(0);
9025 }
9026_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009028 ac_cv_pthread_system_supported=yes
9029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9033 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009035
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037fi
9038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9040$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009041 if test "$ac_cv_pthread_system_supported" = "yes"; then
9042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009044
9045 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046 for ac_func in pthread_sigmask
9047do :
9048 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Charles-François Natali97781b02011-07-22 23:43:42 +02009049if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009052_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009053 case $ac_sys_system in
9054 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009055
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009057
9058 ;;
9059 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009060fi
9061done
9062
9063fi
9064
9065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9069$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009071if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076 ipv6=no
9077 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9079$as_echo "yes" >&6; }
9080 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ipv6=yes
9083 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085else
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009091 ipv6=no
9092
9093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009095/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009096 /* AF_INET6 available check */
9097#include <sys/types.h>
9098#include <sys/socket.h>
9099main()
9100{
9101 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9102 exit(1);
9103 else
9104 exit(0);
9105}
9106
Martin v. Löwis11437992002-04-12 09:54:03 +00009107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009109
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9111$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009112 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009114else
Matthias Klosec511b472010-05-08 11:01:39 +00009115
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009118 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123fi
9124
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009126if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9128$as_echo_n "checking if RFC2553 API is available... " >&6; }
9129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009130/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009131
9132 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009133#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009134int
9135main ()
9136{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009137struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009138 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ;
9140 return 0;
9141}
Matthias Klosec511b472010-05-08 11:01:39 +00009142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009145
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009147$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009148 ipv6=yes
9149
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009150else
Matthias Klosec511b472010-05-08 11:01:39 +00009151
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009154 ipv6=no
9155
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009158fi
9159
9160if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009162
9163fi
9164
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165fi
9166
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009167
9168ipv6type=unknown
9169ipv6lib=none
9170ipv6trylibc=no
9171
9172if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9174$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009175 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9176 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009177 case $i in
9178 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009182#include <netinet/in.h>
9183#ifdef IPV6_INRIA_VERSION
9184yes
9185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009189 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009190fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009191rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192
9193 ;;
9194 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009198#include <netinet/in.h>
9199#ifdef __KAME__
9200yes
9201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009205 ipv6type=$i;
9206 ipv6lib=inet6
9207 ipv6libdir=/usr/local/v6/lib
9208 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009209fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009210rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211
9212 ;;
9213 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217#include <features.h>
9218#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9219yes
9220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009224 ipv6type=$i;
9225 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009226fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009227rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228
9229 ;;
9230 linux-inet6)
9231 if test -d /usr/inet6; then
9232 ipv6type=$i
9233 ipv6lib=inet6
9234 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009235 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236 fi
9237 ;;
9238 solaris)
9239 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009240 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241 ipv6type=$i
9242 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243 fi
9244 fi
9245 ;;
9246 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009250#include <sys/param.h>
9251#ifdef _TOSHIBA_INET6
9252yes
9253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009256 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009257 ipv6type=$i;
9258 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009259 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009261rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262
9263 ;;
9264 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268#include </usr/local/v6/include/sys/v6config.h>
9269#ifdef __V6D__
9270yes
9271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009275 ipv6type=$i;
9276 ipv6lib=v6;
9277 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009278 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009280rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009281
9282 ;;
9283 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009285/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009286
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287#include <sys/param.h>
9288#ifdef _ZETA_MINAMI_INET6
9289yes
9290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009291_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009293 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294 ipv6type=$i;
9295 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009296 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009297fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009298rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009299
9300 ;;
9301 esac
9302 if test "$ipv6type" != "unknown"; then
9303 break
9304 fi
9305 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9307$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308fi
9309
9310if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9311 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9312 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9313 echo "using lib$ipv6lib"
9314 else
9315 if test $ipv6trylibc = "yes"; then
9316 echo "using libc"
9317 else
9318 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9319 echo "You need to fetch lib$ipv6lib.a from appropriate"
9320 echo 'ipv6 kit and compile beforehand.'
9321 exit 1
9322 fi
9323 fi
9324fi
9325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9327$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009329/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009330
9331 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009332int
9333main ()
9334{
9335FSIORefNum fRef = 0
9336 ;
9337 return 0;
9338}
Mark Dickinson0712b562010-05-08 19:13:21 +00009339
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009340_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009342
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9347$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009348
Mark Dickinson0712b562010-05-08 19:13:21 +00009349else
9350
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
9353
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009354fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9356
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009357# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9359$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009360
Martin v. Löwiseba40652007-08-30 20:10:57 +00009361# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363 withval=$with_doc_strings;
9364fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009365
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009366
9367if test -z "$with_doc_strings"
9368then with_doc_strings="yes"
9369fi
9370if test "$with_doc_strings" != "no"
9371then
9372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009374
9375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9377$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009378
Neil Schemenauera35c6882001-02-27 04:45:05 +00009379# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9381$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009382
Martin v. Löwiseba40652007-08-30 20:10:57 +00009383# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009386if test "$withval" != no
9387then
9388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009389$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9392$as_echo "yes" >&6; }
9393else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009395fi
9396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399fi
9400
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009401
9402# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9404$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009405
Martin v. Löwiseba40652007-08-30 20:10:57 +00009406# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009407if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408 withval=$with_pymalloc;
9409fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
Neil Schemenauera35c6882001-02-27 04:45:05 +00009411
Neil Schemenauer16c22972002-03-22 15:34:49 +00009412if test -z "$with_pymalloc"
9413then with_pymalloc="yes"
9414fi
9415if test "$with_pymalloc" != "no"
9416then
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009419
9420fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9422$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009423
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009424# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9426$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009427
9428# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009430 withval=$with_valgrind;
9431else
9432 with_valgrind=no
9433fi
9434
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9436$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009437if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 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 +02009439if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009442
9443else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009444 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009445
9446fi
9447
9448
9449fi
9450
Barry Warsawef82cd72000-06-30 16:21:01 +00009451# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9453$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009458if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009459then
9460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9464$as_echo "yes" >&6; }
9465else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009467fi
9468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471fi
9472
Barry Warsawef82cd72000-06-30 16:21:01 +00009473
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009474# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009475
Guido van Rossum98935bf2001-09-05 19:13:16 +00009476DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009477
Guido van Rossume97ee181999-12-20 21:27:22 +00009478# the dlopen() function means we might want to use dynload_shlib.o. some
9479# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009480for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481do :
9482 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Charles-François Natali97781b02011-07-22 23:43:42 +02009483if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009487
Guido van Rossume97ee181999-12-20 21:27:22 +00009488fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009489done
Guido van Rossume97ee181999-12-20 21:27:22 +00009490
Michael W. Hudson54241132001-12-07 15:38:26 +00009491
Guido van Rossume97ee181999-12-20 21:27:22 +00009492# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9493# loading of modules.
9494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9496$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009497if test -z "$DYNLOADFILE"
9498then
9499 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009500 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9501 if test "$ac_cv_func_dlopen" = yes
9502 then DYNLOADFILE="dynload_shlib.o"
9503 else DYNLOADFILE="dynload_aix.o"
9504 fi
9505 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009506 BeOS*) DYNLOADFILE="dynload_beos.o";;
9507 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009508 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9509 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009510 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009511 *)
9512 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9513 # out any dynamic loading
9514 if test "$ac_cv_func_dlopen" = yes
9515 then DYNLOADFILE="dynload_shlib.o"
9516 else DYNLOADFILE="dynload_stub.o"
9517 fi
9518 ;;
9519 esac
9520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9522$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009523if test "$DYNLOADFILE" != "dynload_stub.o"
9524then
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009526$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009527
9528fi
9529
Neil Schemenauer4e425612001-06-19 15:44:15 +00009530# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9531
Michael W. Hudson54241132001-12-07 15:38:26 +00009532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9534$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009535if test -z "$MACHDEP_OBJS"
9536then
Jack Jansene578a632001-08-15 01:27:14 +00009537 MACHDEP_OBJS=$extra_machdep_objs
9538else
9539 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9542$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009543
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009545for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9546 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009547 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009548 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009549 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009550 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009551 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009552 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9553 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009554 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009555 setlocale setregid setreuid setresuid setresgid \
9556 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009557 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009558 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009559 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009560do :
9561 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9562ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009563if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009566_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009567
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009568fi
9569done
9570
Michael W. Hudson54241132001-12-07 15:38:26 +00009571
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009572# For some functions, having a definition is not sufficient, since
9573# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9575$as_echo_n "checking for chroot... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009578#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009579int
9580main ()
9581{
9582void *x=chroot
9583 ;
9584 return 0;
9585}
9586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009589$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009590
Matthias Klosec511b472010-05-08 11:01:39 +00009591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009596
9597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9600$as_echo_n "checking for link... " >&6; }
9601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009603#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009604int
9605main ()
9606{
9607void *x=link
9608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009615
Matthias Klosec511b472010-05-08 11:01:39 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9620$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009621
9622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9625$as_echo_n "checking for symlink... " >&6; }
9626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009628#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629int
9630main ()
9631{
9632void *x=symlink
9633 ;
9634 return 0;
9635}
9636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009638
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009640
Matthias Klosec511b472010-05-08 11:01:39 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009642$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009643else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009646
9647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9650$as_echo_n "checking for fchdir... " >&6; }
9651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009653#include <unistd.h>
9654int
9655main ()
9656{
9657void *x=fchdir
9658 ;
9659 return 0;
9660}
9661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009665
Matthias Klosec511b472010-05-08 11:01:39 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009671
9672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9675$as_echo_n "checking for fsync... " >&6; }
9676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009678#include <unistd.h>
9679int
9680main ()
9681{
9682void *x=fsync
9683 ;
9684 return 0;
9685}
9686_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009688
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009690
Matthias Klosec511b472010-05-08 11:01:39 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009696
9697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9700$as_echo_n "checking for fdatasync... " >&6; }
9701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009703#include <unistd.h>
9704int
9705main ()
9706{
9707void *x=fdatasync
9708 ;
9709 return 0;
9710}
9711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009715
Matthias Klosec511b472010-05-08 11:01:39 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009721
9722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9725$as_echo_n "checking for epoll... " >&6; }
9726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009727/* end confdefs.h. */
9728#include <sys/epoll.h>
9729int
9730main ()
9731{
9732void *x=epoll_create
9733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009738
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009740
Matthias Klosec511b472010-05-08 11:01:39 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009742$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009746
9747fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9750$as_echo_n "checking for kqueue... " >&6; }
9751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009752/* end confdefs.h. */
9753
9754#include <sys/types.h>
9755#include <sys/event.h>
9756
9757int
9758main ()
9759{
9760int x=kqueue()
9761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009767$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009768
Matthias Klosec511b472010-05-08 11:01:39 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009774
9775fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009777# On some systems (eg. FreeBSD 5), we would find a definition of the
9778# functions ctermid_r, setgroups in the library, but no prototype
9779# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9780# address to avoid compiler warnings and potential miscompilations
9781# because of the missing prototypes.
9782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9784$as_echo_n "checking for ctermid_r... " >&6; }
9785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009786/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009787
Martin v. Löwisd5843682002-11-21 20:41:28 +00009788#include <stdio.h>
9789
Martin v. Löwisd5843682002-11-21 20:41:28 +00009790int
9791main ()
9792{
9793void* p = ctermid_r
9794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009799
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009801
Matthias Klosec511b472010-05-08 11:01:39 +00009802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009804else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009807
9808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9810
Antoine Pitroub170f172010-09-10 18:47:36 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9812$as_echo_n "checking for flock declaration... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009813if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009814 $as_echo_n "(cached) " >&6
9815else
9816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009817/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009818#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009819int
9820main ()
9821{
9822void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009823
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009824 ;
9825 return 0;
9826}
9827_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009828if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009829 ac_cv_flock_decl=yes
9830else
9831 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009832
9833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009835
Antoine Pitroub170f172010-09-10 18:47:36 +00009836fi
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9838$as_echo "$ac_cv_flock_decl" >&6; }
9839if test "x${ac_cv_flock_decl}" = xyes; then
9840 for ac_func in flock
9841do :
9842 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Charles-François Natali97781b02011-07-22 23:43:42 +02009843if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009844 cat >>confdefs.h <<_ACEOF
9845#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009846_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009847
Antoine Pitrou85729812010-09-07 14:55:24 +00009848else
Antoine Pitroub170f172010-09-10 18:47:36 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009850$as_echo_n "checking for flock in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009851if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009852 $as_echo_n "(cached) " >&6
9853else
9854 ac_check_lib_save_LIBS=$LIBS
9855LIBS="-lbsd $LIBS"
9856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857/* end confdefs.h. */
9858
9859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
9862#ifdef __cplusplus
9863extern "C"
9864#endif
9865char flock ();
9866int
9867main ()
9868{
9869return flock ();
9870 ;
9871 return 0;
9872}
9873_ACEOF
9874if ac_fn_c_try_link "$LINENO"; then :
9875 ac_cv_lib_bsd_flock=yes
9876else
9877 ac_cv_lib_bsd_flock=no
9878fi
9879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext conftest.$ac_ext
9881LIBS=$ac_check_lib_save_LIBS
9882fi
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9884$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009885if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009886 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009887
9888
9889$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9890
9891
9892fi
9893
9894
9895fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009896done
9897
Antoine Pitrou85729812010-09-07 14:55:24 +00009898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9901$as_echo_n "checking for getpagesize... " >&6; }
9902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009904
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009905#include <unistd.h>
9906
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009907int
9908main ()
9909{
9910void* p = getpagesize
9911 ;
9912 return 0;
9913}
9914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009915if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009918
Matthias Klosec511b472010-05-08 11:01:39 +00009919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009920$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009924
9925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009927
Charles-François Natali93a11752011-11-27 13:01:35 +01009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9929$as_echo_n "checking for broken unsetenv... " >&6; }
9930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9931/* end confdefs.h. */
9932
9933#include <stdlib.h>
9934
9935int
9936main ()
9937{
9938int res = unsetenv("DUMMY")
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_compile "$LINENO"; then :
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
9946else
9947
9948$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
9949
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9951$as_echo "yes" >&6; }
9952
9953fi
9954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9955
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009956for ac_prog in true
9957do
9958 # Extract the first word of "$ac_prog", so it can be a program name with args.
9959set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9961$as_echo_n "checking for $ac_word... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +02009962if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009964else
9965 if test -n "$TRUE"; then
9966 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9967else
9968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9969for as_dir in $PATH
9970do
9971 IFS=$as_save_IFS
9972 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974 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 +00009975 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976 $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 +00009977 break 2
9978 fi
9979done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009980 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009982
9983fi
9984fi
9985TRUE=$ac_cv_prog_TRUE
9986if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9988$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9991$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992fi
9993
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995 test -n "$TRUE" && break
9996done
9997test -n "$TRUE" || TRUE="/bin/true"
9998
9999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10001$as_echo_n "checking for inet_aton in -lc... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010002if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010004else
10005 ac_check_lib_save_LIBS=$LIBS
10006LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010008/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010009
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010/* Override any GCC internal prototype to avoid an error.
10011 Use char because int might match the return type of a GCC
10012 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010013#ifdef __cplusplus
10014extern "C"
10015#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010016char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010017int
10018main ()
10019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021 ;
10022 return 0;
10023}
10024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010026 ac_cv_lib_c_inet_aton=yes
10027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010028 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010030rm -f core conftest.err conftest.$ac_objext \
10031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010032LIBS=$ac_check_lib_save_LIBS
10033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10035$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010036if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010037 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10040$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010041if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010043else
10044 ac_check_lib_save_LIBS=$LIBS
10045LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010047/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010048
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049/* Override any GCC internal prototype to avoid an error.
10050 Use char because int might match the return type of a GCC
10051 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010052#ifdef __cplusplus
10053extern "C"
10054#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010055char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010056int
10057main ()
10058{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060 ;
10061 return 0;
10062}
10063_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010065 ac_cv_lib_resolv_inet_aton=yes
10066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010068fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069rm -f core conftest.err conftest.$ac_objext \
10070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010071LIBS=$ac_check_lib_save_LIBS
10072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10074$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010075if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010076 cat >>confdefs.h <<_ACEOF
10077#define HAVE_LIBRESOLV 1
10078_ACEOF
10079
10080 LIBS="-lresolv $LIBS"
10081
10082fi
10083
10084
10085fi
10086
10087
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010088# On Tru64, chflags seems to be present, but calling it will
10089# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10091$as_echo_n "checking for chflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010092if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010095 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010096 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010099/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010100
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010101#include <sys/stat.h>
10102#include <unistd.h>
10103int main(int argc, char*argv[])
10104{
10105 if(chflags(argv[0], 0) != 0)
10106 return 1;
10107 return 0;
10108}
Ned Deily43e10542011-06-27 23:41:53 -070010109
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010110_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010112 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010113else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010114 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010118fi
10119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10123$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010124if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010126if test "x$ac_cv_func_chflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010127 ac_cv_have_chflags="yes"
10128else
10129 ac_cv_have_chflags="no"
10130fi
10131
10132fi
10133if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010136
10137fi
10138
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10140$as_echo_n "checking for lchflags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010141if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010145 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010148/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010149
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010150#include <sys/stat.h>
10151#include <unistd.h>
10152int main(int argc, char*argv[])
10153{
10154 if(lchflags(argv[0], 0) != 0)
10155 return 1;
10156 return 0;
10157}
Ned Deily43e10542011-06-27 23:41:53 -070010158
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010161 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010163 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010164fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010167fi
10168
10169
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10172$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010173if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010174 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Charles-François Natali97781b02011-07-22 23:43:42 +020010175if test "x$ac_cv_func_lchflags" = x""yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010176 ac_cv_have_lchflags="yes"
10177else
10178 ac_cv_have_lchflags="no"
10179fi
10180
10181fi
10182if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010185
10186fi
10187
Ronald Oussorenf8752642006-07-06 10:13:35 +000010188case $ac_sys_system/$ac_sys_release in
10189Darwin/*)
10190 _CUR_CFLAGS="${CFLAGS}"
10191 _CUR_LDFLAGS="${LDFLAGS}"
10192 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10193 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10194 ;;
10195esac
10196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10198$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010199if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010200 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010201else
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010205/* end confdefs.h. */
10206
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010210#ifdef __cplusplus
10211extern "C"
10212#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010213char inflateCopy ();
10214int
10215main ()
10216{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010218 ;
10219 return 0;
10220}
10221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010222if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010223 ac_cv_lib_z_inflateCopy=yes
10224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010229LIBS=$ac_check_lib_save_LIBS
10230fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10232$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010233if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010236
10237fi
10238
10239
Ronald Oussorenf8752642006-07-06 10:13:35 +000010240case $ac_sys_system/$ac_sys_release in
10241Darwin/*)
10242 CFLAGS="${_CUR_CFLAGS}"
10243 LDFLAGS="${_CUR_LDFLAGS}"
10244 ;;
10245esac
10246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10248$as_echo_n "checking for hstrerror... " >&6; }
10249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010250/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010251
Martin v. Löwise9416172003-05-03 10:12:45 +000010252#include <netdb.h>
10253
Martin v. Löwise9416172003-05-03 10:12:45 +000010254int
10255main ()
10256{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010257void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010258 ;
10259 return 0;
10260}
10261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010265
Matthias Klosec511b472010-05-08 11:01:39 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010271
10272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10277$as_echo_n "checking for inet_aton... " >&6; }
10278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010279/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010280
Martin v. Löwis86d66262006-02-17 08:40:11 +000010281#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010282#include <sys/socket.h>
10283#include <netinet/in.h>
10284#include <arpa/inet.h>
10285
Martin v. Löwise9416172003-05-03 10:12:45 +000010286int
10287main ()
10288{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010289void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010297
Matthias Klosec511b472010-05-08 11:01:39 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010303
10304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305rm -f core conftest.err conftest.$ac_objext \
10306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10309$as_echo_n "checking for inet_pton... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010312
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010313#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010314#include <sys/socket.h>
10315#include <netinet/in.h>
10316#include <arpa/inet.h>
10317
Martin v. Löwise9416172003-05-03 10:12:45 +000010318int
10319main ()
10320{
10321void* p = inet_pton
10322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010328$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010329
Matthias Klosec511b472010-05-08 11:01:39 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010335
10336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010338
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010339# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10341$as_echo_n "checking for setgroups... " >&6; }
10342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010343/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010344
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010345#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010346#ifdef HAVE_GRP_H
10347#include <grp.h>
10348#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010349
Martin v. Löwisd5843682002-11-21 20:41:28 +000010350int
10351main ()
10352{
10353void* p = setgroups
10354 ;
10355 return 0;
10356}
10357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010359
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010360$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010361
Matthias Klosec511b472010-05-08 11:01:39 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010363$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010367
10368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010371# check for openpty and forkpty
10372
10373for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374do :
10375 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010376if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010378#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010379_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010380
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010381else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10383$as_echo_n "checking for openpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010384if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010386else
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010388LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010391
Martin v. Löwiseba40652007-08-30 20:10:57 +000010392/* Override any GCC internal prototype to avoid an error.
10393 Use char because int might match the return type of a GCC
10394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010395#ifdef __cplusplus
10396extern "C"
10397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010398char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010399int
10400main ()
10401{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010402return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ;
10404 return 0;
10405}
10406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010407if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010410 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412rm -f core conftest.err conftest.$ac_objext \
10413 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010414LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10417$as_echo "$ac_cv_lib_util_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010418if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010420 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10423$as_echo_n "checking for openpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010424if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010426else
10427 ac_check_lib_save_LIBS=$LIBS
10428LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010430/* end confdefs.h. */
10431
Martin v. Löwiseba40652007-08-30 20:10:57 +000010432/* Override any GCC internal prototype to avoid an error.
10433 Use char because int might match the return type of a GCC
10434 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010435#ifdef __cplusplus
10436extern "C"
10437#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010438char openpty ();
10439int
10440main ()
10441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010442return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010443 ;
10444 return 0;
10445}
10446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010448 ac_cv_lib_bsd_openpty=yes
10449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452rm -f core conftest.err conftest.$ac_objext \
10453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010454LIBS=$ac_check_lib_save_LIBS
10455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10457$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010458if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010460 LIBS="$LIBS -lbsd"
10461fi
10462
10463
10464fi
10465
Fred Drake8cef4cf2000-06-28 16:40:38 +000010466
10467fi
10468done
10469
10470for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471do :
10472 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Charles-François Natali97781b02011-07-22 23:43:42 +020010473if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010476_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010477
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10480$as_echo_n "checking for forkpty in -lutil... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010481if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010482 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010483else
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010485LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489/* Override any GCC internal prototype to avoid an error.
10490 Use char because int might match the return type of a GCC
10491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010492#ifdef __cplusplus
10493extern "C"
10494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010495char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010496int
10497main ()
10498{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ;
10501 return 0;
10502}
10503_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010507 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010508fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509rm -f core conftest.err conftest.$ac_objext \
10510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010511LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10514$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010515if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010517 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10520$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010521if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010523else
10524 ac_check_lib_save_LIBS=$LIBS
10525LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010527/* end confdefs.h. */
10528
Martin v. Löwiseba40652007-08-30 20:10:57 +000010529/* Override any GCC internal prototype to avoid an error.
10530 Use char because int might match the return type of a GCC
10531 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010532#ifdef __cplusplus
10533extern "C"
10534#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010535char forkpty ();
10536int
10537main ()
10538{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010539return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010540 ;
10541 return 0;
10542}
10543_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010545 ac_cv_lib_bsd_forkpty=yes
10546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010547 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010549rm -f core conftest.err conftest.$ac_objext \
10550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010551LIBS=$ac_check_lib_save_LIBS
10552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10554$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010555if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010556 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010557 LIBS="$LIBS -lbsd"
10558fi
10559
10560
10561fi
10562
Fred Drake8cef4cf2000-06-28 16:40:38 +000010563
10564fi
10565done
10566
Jack Jansendd19cf82001-12-06 22:36:17 +000010567
Brett Cannonaa5778d2008-03-18 04:09:00 +000010568# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010569for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010570do :
10571 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Charles-François Natali97781b02011-07-22 23:43:42 +020010572if test "x$ac_cv_func_memmove" = x""yes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010573 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010574#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010575_ACEOF
10576
10577fi
10578done
10579
10580
Michael W. Hudson54241132001-12-07 15:38:26 +000010581# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010582for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010583do :
10584 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10585ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010586if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010589_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010590
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010591fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592done
10593
Michael W. Hudson54241132001-12-07 15:38:26 +000010594
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010595ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Charles-François Natali97781b02011-07-22 23:43:42 +020010596if test "x$ac_cv_func_dup2" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010597 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010598
Martin v. Löwis1142de32002-03-29 16:28:31 +000010599else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010601 *" dup2.$ac_objext "* ) ;;
10602 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010604esac
10605
Martin v. Löwis1142de32002-03-29 16:28:31 +000010606fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010607
10608ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Charles-François Natali97781b02011-07-22 23:43:42 +020010609if test "x$ac_cv_func_getcwd" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010610 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10611
10612else
10613 case " $LIBOBJS " in
10614 *" getcwd.$ac_objext "* ) ;;
10615 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10616 ;;
10617esac
10618
10619fi
10620
10621ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Charles-François Natali97781b02011-07-22 23:43:42 +020010622if test "x$ac_cv_func_strdup" = x""yes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010623 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10624
10625else
10626 case " $LIBOBJS " in
10627 *" strdup.$ac_objext "* ) ;;
10628 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10629 ;;
10630esac
10631
10632fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010633
10634
10635for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636do :
10637 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010638if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010645int
10646main ()
10647{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010648getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010656
Guido van Rossum627b2d71993-12-24 10:39:16 +000010657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010659
Guido van Rossum627b2d71993-12-24 10:39:16 +000010660fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010661done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010662
Jack Jansen150753c2003-03-29 22:07:47 +000010663for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664do :
10665 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Charles-François Natali97781b02011-07-22 23:43:42 +020010666if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010667 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010672#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010673int
10674main ()
10675{
10676setpgrp(0,0);
10677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010683$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010684
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010687
10688fi
10689done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010690
Thomas Wouters3a584202000-08-05 23:28:51 +000010691for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010692do :
10693 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Charles-François Natali97781b02011-07-22 23:43:42 +020010694if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010697_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010699/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010700#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
10703{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010704gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709if ac_fn_c_try_compile "$LINENO"; then :
10710
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711else
Skip Montanaro6dead952003-09-25 14:50:04 +000010712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010714
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Guido van Rossum627b2d71993-12-24 10:39:16 +000010716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010719fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010720done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010721
Michael W. Hudson54241132001-12-07 15:38:26 +000010722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10724$as_echo_n "checking for major... " >&6; }
10725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010727
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010728#if defined(MAJOR_IN_MKDEV)
10729#include <sys/mkdev.h>
10730#elif defined(MAJOR_IN_SYSMACROS)
10731#include <sys/sysmacros.h>
10732#else
10733#include <sys/types.h>
10734#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010735
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010736int
10737main ()
10738{
10739
10740 makedev(major(0),minor(0));
10741
10742 ;
10743 return 0;
10744}
10745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010747
10748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10752$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010753
10754else
Skip Montanaro6dead952003-09-25 14:50:04 +000010755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010758
10759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760rm -f core conftest.err conftest.$ac_objext \
10761 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010762
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010763# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010764# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10766$as_echo_n "checking for getaddrinfo... " >&6; }
10767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010769
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010770#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010771#include <sys/socket.h>
10772#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010773#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775int
10776main ()
10777{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010778getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ;
10780 return 0;
10781}
10782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010784 have_getaddrinfo=yes
10785else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010786 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010788rm -f core conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10791$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010792if test $have_getaddrinfo = yes
10793then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10795$as_echo_n "checking getaddrinfo bug... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020010796 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010799 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010800 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010803/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010804
10805#include <sys/types.h>
10806#include <netdb.h>
10807#include <string.h>
10808#include <sys/socket.h>
10809#include <netinet/in.h>
10810
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010811int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010812{
10813 int passive, gaierr, inet4 = 0, inet6 = 0;
10814 struct addrinfo hints, *ai, *aitop;
10815 char straddr[INET6_ADDRSTRLEN], strport[16];
10816
10817 for (passive = 0; passive <= 1; passive++) {
10818 memset(&hints, 0, sizeof(hints));
10819 hints.ai_family = AF_UNSPEC;
10820 hints.ai_flags = passive ? AI_PASSIVE : 0;
10821 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010822 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010823 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10824 (void)gai_strerror(gaierr);
10825 goto bad;
10826 }
10827 for (ai = aitop; ai; ai = ai->ai_next) {
10828 if (ai->ai_addr == NULL ||
10829 ai->ai_addrlen == 0 ||
10830 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10831 straddr, sizeof(straddr), strport, sizeof(strport),
10832 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10833 goto bad;
10834 }
10835 switch (ai->ai_family) {
10836 case AF_INET:
10837 if (strcmp(strport, "54321") != 0) {
10838 goto bad;
10839 }
10840 if (passive) {
10841 if (strcmp(straddr, "0.0.0.0") != 0) {
10842 goto bad;
10843 }
10844 } else {
10845 if (strcmp(straddr, "127.0.0.1") != 0) {
10846 goto bad;
10847 }
10848 }
10849 inet4++;
10850 break;
10851 case AF_INET6:
10852 if (strcmp(strport, "54321") != 0) {
10853 goto bad;
10854 }
10855 if (passive) {
10856 if (strcmp(straddr, "::") != 0) {
10857 goto bad;
10858 }
10859 } else {
10860 if (strcmp(straddr, "::1") != 0) {
10861 goto bad;
10862 }
10863 }
10864 inet6++;
10865 break;
10866 case AF_UNSPEC:
10867 goto bad;
10868 break;
10869 default:
10870 /* another family support? */
10871 break;
10872 }
10873 }
10874 }
10875
10876 if (!(inet4 == 0 || inet4 == 2))
10877 goto bad;
10878 if (!(inet6 == 0 || inet6 == 2))
10879 goto bad;
10880
10881 if (aitop)
10882 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010883 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010884
10885 bad:
10886 if (aitop)
10887 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010888 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889}
10890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010893 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010895 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010901fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010904
Benjamin Peterson75fed812010-11-01 01:47:19 +000010905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10906$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10907
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010908if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010909then
10910 if test $ipv6 = yes
10911 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010912 echo 'Fatal: You must get working getaddrinfo() function.'
10913 echo ' or you can specify "--disable-ipv6"'.
10914 exit 1
10915 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010916else
Martin v. Löwis11437992002-04-12 09:54:03 +000010917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010918$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010919
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010921
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010922for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923do :
10924 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Charles-François Natali97781b02011-07-22 23:43:42 +020010925if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010929
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010930fi
10931done
10932
Michael W. Hudson54241132001-12-07 15:38:26 +000010933
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010934# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10936$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 +020010937if test "${ac_cv_header_time+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010942#include <sys/types.h>
10943#include <sys/time.h>
10944#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010945
Martin v. Löwis11437992002-04-12 09:54:03 +000010946int
10947main ()
10948{
10949if ((struct tm *) 0)
10950return 0;
10951 ;
10952 return 0;
10953}
10954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010956 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010961fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10963$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010964if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967
10968fi
10969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10971$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 +020010972if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010976/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977#include <sys/types.h>
10978#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Martin v. Löwis11437992002-04-12 09:54:03 +000010980int
10981main ()
10982{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010983struct tm tm;
10984 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010991 ac_cv_struct_tm=time.h
10992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10998$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010999if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011000
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011002
11003fi
11004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011005ac_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 +000011006#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011008"
Charles-François Natali97781b02011-07-22 23:43:42 +020011009if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011010
11011cat >>confdefs.h <<_ACEOF
11012#define HAVE_STRUCT_TM_TM_ZONE 1
11013_ACEOF
11014
11015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021
11022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11024"
Charles-François Natali97781b02011-07-22 23:43:42 +020011025if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011029fi
11030
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033_ACEOF
11034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11036$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011037if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011041/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011042#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011043#if !HAVE_DECL_TZNAME
11044extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047int
11048main ()
11049{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ;
11052 return 0;
11053}
11054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056 ac_cv_var_tzname=yes
11057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060rm -f core conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11064$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011065 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011068
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069 fi
11070fi
11071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072ac_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 +020011073if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
11075cat >>confdefs.h <<_ACEOF
11076#define HAVE_STRUCT_STAT_ST_RDEV 1
11077_ACEOF
11078
11079
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011080fi
11081
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082ac_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 +020011083if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011084
Martin v. Löwis11437992002-04-12 09:54:03 +000011085cat >>confdefs.h <<_ACEOF
11086#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11087_ACEOF
11088
11089
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011090fi
11091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092ac_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 +020011093if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011094
11095cat >>confdefs.h <<_ACEOF
11096#define HAVE_STRUCT_STAT_ST_FLAGS 1
11097_ACEOF
11098
11099
11100fi
11101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102ac_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 +020011103if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011104
11105cat >>confdefs.h <<_ACEOF
11106#define HAVE_STRUCT_STAT_ST_GEN 1
11107_ACEOF
11108
11109
11110fi
11111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112ac_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 +020011113if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011114
11115cat >>confdefs.h <<_ACEOF
11116#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11117_ACEOF
11118
11119
11120fi
11121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122ac_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 +020011123if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125cat >>confdefs.h <<_ACEOF
11126#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11127_ACEOF
11128
11129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011130$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011131
11132else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011134 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011135 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11136 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011137esac
11138
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011139fi
11140
Michael W. Hudson54241132001-12-07 15:38:26 +000011141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11144$as_echo_n "checking for time.h that defines altzone... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011145if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011147else
Matthias Klosec511b472010-05-08 11:01:39 +000011148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011151#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011152int
11153main ()
11154{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ;
11157 return 0;
11158}
11159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161 ac_cv_header_time_altzone=yes
11162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011166
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167fi
11168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11170$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174
11175fi
11176
Guido van Rossumda88dad1995-01-26 00:46:29 +000011177was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11179$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011181/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
11183#include <sys/types.h>
11184#include <sys/select.h>
11185#include <sys/time.h>
11186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187int
11188main ()
11189{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190;
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 ;
11192 return 0;
11193}
11194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011196
11197
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011200 was_it_defined=yes
11201
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11205$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11208$as_echo_n "checking for addrinfo... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011209if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011214#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011215int
11216main ()
11217{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011218struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224 ac_cv_struct_addrinfo=yes
11225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011226 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11229fi
11230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11232$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011233if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011236
11237fi
11238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11240$as_echo_n "checking for sockaddr_storage... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011241if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011246
11247# include <sys/types.h>
11248# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011249int
11250main ()
11251{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011252struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ;
11254 return 0;
11255}
11256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258 ac_cv_struct_sockaddr_storage=yes
11259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11263fi
11264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11266$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011267if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011269$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011270
11271fi
11272
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11276$as_echo_n "checking whether char is unsigned... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011277if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011278 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011282$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011283int
11284main ()
11285{
11286static int test_array [1 - 2 * !(((char) -1) < 0)];
11287test_array [0] = 0
11288
11289 ;
11290 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011291}
Martin v. Löwis11437992002-04-12 09:54:03 +000011292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011294 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11301$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304
11305fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11308$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011309if test "${ac_cv_c_const+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
11318/* FIXME: Include the comments suggested by Paul. */
11319#ifndef __cplusplus
11320 /* Ultrix mips cc rejects this. */
11321 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011322 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324 char const *const *pcpcc;
11325 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 /* NEC SVR4.0.2 mips cc rejects this. */
11327 struct point {int x, y;};
11328 static struct point const zero = {0,0};
11329 /* AIX XL C 1.02.0.0 rejects this.
11330 It does not let you subtract one const X* pointer from another in
11331 an arm of an if-expression whose if-part is not a constant
11332 expression */
11333 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336 ++pcpcc;
11337 ppc = (char**) pcpcc;
11338 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011339 { /* SCO 3.2v4 cc rejects this. */
11340 char *t;
11341 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011344 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 }
11346 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11347 int x[] = {25, 17};
11348 const int *foo = &x[0];
11349 ++foo;
11350 }
11351 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11352 typedef const int *iptr;
11353 iptr p = 0;
11354 ++p;
11355 }
11356 { /* AIX XL C 1.02.0.0 rejects this saying
11357 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11358 struct s { int j; const int *ap[3]; };
11359 struct s *b; b->j = 5;
11360 }
11361 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11362 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011365 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011366#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011367
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ;
11369 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011370}
Martin v. Löwis11437992002-04-12 09:54:03 +000011371_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373 ac_cv_c_const=yes
11374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11380$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011384
11385fi
11386
Michael W. Hudson54241132001-12-07 15:38:26 +000011387
Guido van Rossumda88dad1995-01-26 00:46:29 +000011388works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11390$as_echo_n "checking for working volatile... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011393
Martin v. Löwis11437992002-04-12 09:54:03 +000011394int
11395main ()
11396{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011397volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 ;
11399 return 0;
11400}
11401_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011403 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011404else
Skip Montanaro6dead952003-09-25 14:50:04 +000011405
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011407
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011408
Guido van Rossum627b2d71993-12-24 10:39:16 +000011409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11412$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011413
Guido van Rossumda88dad1995-01-26 00:46:29 +000011414works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11416$as_echo_n "checking for working signed char... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011419
Martin v. Löwis11437992002-04-12 09:54:03 +000011420int
11421main ()
11422{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011423signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011429 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011430else
Skip Montanaro6dead952003-09-25 14:50:04 +000011431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011433
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011434
Guido van Rossum7f43da71994-08-01 12:15:30 +000011435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11438$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011439
Guido van Rossumda88dad1995-01-26 00:46:29 +000011440have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11442$as_echo_n "checking for prototypes... " >&6; }
11443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011444/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011445int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011446int
11447main ()
11448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ;
11451 return 0;
11452}
11453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011456$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011457
Matthias Klosec511b472010-05-08 11:01:39 +000011458 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11462$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011463
Guido van Rossumda88dad1995-01-26 00:46:29 +000011464works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11466$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011469
11470#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011471int foo(int x, ...) {
11472 va_list va;
11473 va_start(va, x);
11474 va_arg(va, int);
11475 va_arg(va, char *);
11476 va_arg(va, double);
11477 return 0;
11478}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011479
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
11482{
Guido van Rossum90eea071996-08-30 20:58:57 +000011483return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
11490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011493 works=yes
11494
Guido van Rossum627b2d71993-12-24 10:39:16 +000011495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11498$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011499
Martin v. Löwisd6320502004-08-12 13:45:08 +000011500# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11502$as_echo_n "checking for socketpair... " >&6; }
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011504/* end confdefs.h. */
11505
11506#include <sys/types.h>
11507#include <sys/socket.h>
11508
11509int
11510main ()
11511{
11512void *x=socketpair
11513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011520
Matthias Klosec511b472010-05-08 11:01:39 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011526
11527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011529
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011530# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11532$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011535#include <sys/types.h>
11536#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011537int
11538main ()
11539{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011540struct sockaddr x;
11541x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 ;
11543 return 0;
11544}
11545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011546if ac_fn_c_try_compile "$LINENO"; then :
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11548$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011551
11552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011555
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011558
Guido van Rossumda88dad1995-01-26 00:46:29 +000011559va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11561$as_echo_n "checking whether va_list is an array... " >&6; }
11562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564
11565#ifdef HAVE_STDARG_PROTOTYPES
11566#include <stdarg.h>
11567#else
11568#include <varargs.h>
11569#endif
11570
Martin v. Löwis11437992002-04-12 09:54:03 +000011571int
11572main ()
11573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011574va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ;
11576 return 0;
11577}
11578_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579if ac_fn_c_try_compile "$LINENO"; then :
11580
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011581else
Skip Montanaro6dead952003-09-25 14:50:04 +000011582
Martin v. Löwis11437992002-04-12 09:54:03 +000011583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011584$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Guido van Rossumda88dad1995-01-26 00:46:29 +000011586 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011587
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11591$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011593# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
11595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Charles-François Natali97781b02011-07-22 23:43:42 +020011597if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011599 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11602$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011603 OLD_CFLAGS=$CFLAGS
11604 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011607
11608# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011609
Martin v. Löwis11437992002-04-12 09:54:03 +000011610int
11611main ()
11612{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011613
11614 char *name;
11615 struct hostent *he, *res;
11616 char buffer[2048];
11617 int buflen = 2048;
11618 int h_errnop;
11619
11620 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011621
11622 ;
11623 return 0;
11624}
11625_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011627
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011629
Martin v. Löwis11437992002-04-12 09:54:03 +000011630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011631$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11634$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011636else
Skip Montanaro6dead952003-09-25 14:50:04 +000011637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11641$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011645# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
Martin v. Löwis11437992002-04-12 09:54:03 +000011647int
11648main ()
11649{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011650
11651 char *name;
11652 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011653 char buffer[2048];
11654 int buflen = 2048;
11655 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011656
Matthias Klosec511b472010-05-08 11:01:39 +000011657 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011658
11659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011666
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Matthias Klosec511b472010-05-08 11:01:39 +000011668$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011673else
Skip Montanaro6dead952003-09-25 14:50:04 +000011674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11678$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680/* end confdefs.h. */
11681
11682# include <netdb.h>
11683
11684int
11685main ()
11686{
11687
11688 char *name;
11689 struct hostent *he;
11690 struct hostent_data data;
11691
11692 (void) gethostbyname_r(name, he, &data);
11693
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698if ac_fn_c_try_compile "$LINENO"; then :
11699
11700 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11701
11702
11703$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11704
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11706$as_echo "yes" >&6; }
11707
11708else
11709
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011721 CFLAGS=$OLD_CFLAGS
11722
11723else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725 for ac_func in gethostbyname
11726do :
11727 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Charles-François Natali97781b02011-07-22 23:43:42 +020011728if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011730#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011731_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011732
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011733fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011734done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011735
Michael W. Hudson54241132001-12-07 15:38:26 +000011736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011737fi
11738
Michael W. Hudson54241132001-12-07 15:38:26 +000011739
11740
11741
11742
11743
11744
Guido van Rossum627b2d71993-12-24 10:39:16 +000011745# checks for system services
11746# (none yet)
11747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011748# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Charles-François Natali97781b02011-07-22 23:43:42 +020011750if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11754$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011755if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757else
Martin v. Löwis11437992002-04-12 09:54:03 +000011758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011759LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Martin v. Löwiseba40652007-08-30 20:10:57 +000011763/* Override any GCC internal prototype to avoid an error.
11764 Use char because int might match the return type of a GCC
11765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011766#ifdef __cplusplus
11767extern "C"
11768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011769char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011770int
11771main ()
11772{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ;
11775 return 0;
11776}
11777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783rm -f core conftest.err conftest.$ac_objext \
11784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11788$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011789if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 cat >>confdefs.h <<_ACEOF
11791#define HAVE_LIBIEEE 1
11792_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011794 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796fi
11797
Michael W. Hudson54241132001-12-07 15:38:26 +000011798
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011799fi
11800
Michael W. Hudson54241132001-12-07 15:38:26 +000011801
Guido van Rossum7f253911997-05-09 02:42:48 +000011802# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11804$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011805
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011809if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011810then
11811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11815$as_echo "yes" >&6; }
11816else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011818fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822fi
11823
Guido van Rossum7f253911997-05-09 02:42:48 +000011824
Guido van Rossum7f43da71994-08-01 12:15:30 +000011825# check for --with-libm=...
11826
Guido van Rossum563e7081996-09-10 18:20:48 +000011827case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011828Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011829BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011830*) LIBM=-lm
11831esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11833$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Martin v. Löwiseba40652007-08-30 20:10:57 +000011835# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011836if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011837 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011838if test "$withval" = no
11839then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11841$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011842elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011843then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11845$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011846else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011847fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11850$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011851fi
11852
Guido van Rossum7f43da71994-08-01 12:15:30 +000011853
11854# check for --with-libc=...
11855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11857$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011862if test "$withval" = no
11863then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11865$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011866elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011867then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11869$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011870else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011871fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11874$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875fi
11876
Guido van Rossum7f43da71994-08-01 12:15:30 +000011877
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011878# **************************************************
11879# * Check for various properties of floating point *
11880# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11883$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011884if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011886else
11887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011888if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011889 ac_cv_little_endian_double=no
11890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011892/* end confdefs.h. */
11893
11894#include <string.h>
11895int main() {
11896 double x = 9006104071832581.0;
11897 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11898 return 0;
11899 else
11900 return 1;
11901}
11902
11903_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011905 ac_cv_little_endian_double=yes
11906else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011907 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011911fi
11912
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011913fi
11914
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11916$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011917if test "$ac_cv_little_endian_double" = yes
11918then
11919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011920$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011921
11922fi
11923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11925$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011926if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011927 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011928else
11929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011931 ac_cv_big_endian_double=no
11932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011934/* end confdefs.h. */
11935
11936#include <string.h>
11937int main() {
11938 double x = 9006104071832581.0;
11939 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11940 return 0;
11941 else
11942 return 1;
11943}
11944
11945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011947 ac_cv_big_endian_double=yes
11948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011949 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011953fi
11954
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011955fi
11956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11958$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011959if test "$ac_cv_big_endian_double" = yes
11960then
11961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011962$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011963
11964fi
11965
11966# Some ARM platforms use a mixed-endian representation for doubles.
11967# While Python doesn't currently have full support for these platforms
11968# (see e.g., issue 1762561), we can at least make sure that float <-> string
11969# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11971$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020011972if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011974else
11975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011977 ac_cv_mixed_endian_double=no
11978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011980/* end confdefs.h. */
11981
11982#include <string.h>
11983int main() {
11984 double x = 9006104071832581.0;
11985 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11986 return 0;
11987 else
11988 return 1;
11989}
11990
11991_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011992if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011993 ac_cv_mixed_endian_double=yes
11994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011999fi
12000
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012001fi
12002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12004$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012005if test "$ac_cv_mixed_endian_double" = yes
12006then
12007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012009
12010fi
12011
12012# The short float repr introduced in Python 3.1 requires the
12013# correctly-rounded string <-> double conversion functions from
12014# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12015# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012016# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012017# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012018
12019# This inline assembler syntax may also work for suncc and icc,
12020# so we try it on all platforms.
12021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12023$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012025/* end confdefs.h. */
12026
12027int
12028main ()
12029{
12030
Mark Dickinsona548dee2009-11-15 13:12:43 +000012031 unsigned short cw;
12032 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12033 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012034
12035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012040 have_gcc_asm_for_x87=yes
12041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012043fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12046$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012047if test "$have_gcc_asm_for_x87" = yes
12048then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012050$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012051
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012052fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012053
Mark Dickinson04b27232009-01-04 12:29:36 +000012054# Detect whether system arithmetic is subject to x87-style double
12055# rounding issues. The result of this test has little meaning on non
12056# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12057# mode is round-to-nearest and double rounding issues are present, and
12058# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12060$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012061# $BASECFLAGS may affect the result
12062ac_save_cc="$CC"
12063CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012065 ac_cv_x87_double_rounding=no
12066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012068/* end confdefs.h. */
12069
12070#include <stdlib.h>
12071#include <math.h>
12072int main() {
12073 volatile double x, y, z;
12074 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12075 x = 0.99999999999999989; /* 1-2**-53 */
12076 y = 1./x;
12077 if (y != 1.)
12078 exit(0);
12079 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12080 x = 1e16;
12081 y = 2.99999;
12082 z = x + y;
12083 if (z != 1e16+4.)
12084 exit(0);
12085 /* both tests show evidence of double rounding */
12086 exit(1);
12087}
12088
12089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012091 ac_cv_x87_double_rounding=no
12092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12096 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012097fi
12098
Mark Dickinson99abd142009-10-24 13:44:16 +000012099CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12101$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012102if test "$ac_cv_x87_double_rounding" = yes
12103then
12104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012105$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012106
12107fi
12108
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012109# ************************************
12110# * Check for mathematical functions *
12111# ************************************
12112
12113LIBS_SAVE=$LIBS
12114LIBS="$LIBS $LIBM"
12115
Mark Dickinson265d7382008-04-21 22:32:24 +000012116# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12117# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12119$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012120if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012122else
12123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012125 ac_cv_tanh_preserves_zero_sign=no
12126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012128/* end confdefs.h. */
12129
12130#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012131#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012132int main() {
12133 /* return 0 if either negative zeros don't exist
12134 on this platform or if negative zeros exist
12135 and tanh(-0.) == -0. */
12136 if (atan2(0., -1.) == atan2(-0., -1.) ||
12137 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12138 else exit(1);
12139}
12140
12141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012143 ac_cv_tanh_preserves_zero_sign=yes
12144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012149fi
12150
Mark Dickinson265d7382008-04-21 22:32:24 +000012151fi
12152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12154$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012155if test "$ac_cv_tanh_preserves_zero_sign" = yes
12156then
12157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012158$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012159
12160fi
12161
Mark Dickinson65898e02009-09-05 10:27:00 +000012162for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012163do :
12164 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12165ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012166if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012167 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012168#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012169_ACEOF
12170
12171fi
12172done
12173
Mark Dickinson65898e02009-09-05 10:27:00 +000012174for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175do :
12176 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12177ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012178if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012179 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012181_ACEOF
12182
12183fi
12184done
12185
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12187"
Charles-François Natali97781b02011-07-22 23:43:42 +020012188if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012192fi
12193
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012194cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012195#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12198"
Charles-François Natali97781b02011-07-22 23:43:42 +020012199if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012203fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012204
12205cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012207_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12209"
Charles-François Natali97781b02011-07-22 23:43:42 +020012210if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012213 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012214fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012215
12216cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012218_ACEOF
12219
12220
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012221LIBS=$LIBS_SAVE
12222
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012223# For multiprocessing module, check that sem_open
12224# actually works. For FreeBSD versions <= 7.2,
12225# the kernel module that provides POSIX semaphores
12226# isn't loaded by default, so an attempt to call
12227# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12229$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012230if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012234 ac_cv_posix_semaphores_enabled=yes
12235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012237/* end confdefs.h. */
12238
12239#include <unistd.h>
12240#include <fcntl.h>
12241#include <stdio.h>
12242#include <semaphore.h>
12243#include <sys/stat.h>
12244
12245int main(void) {
12246 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12247 if (a == SEM_FAILED) {
12248 perror("sem_open");
12249 return 1;
12250 }
12251 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012252 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012253 return 0;
12254}
12255
12256_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012258 ac_cv_posix_semaphores_enabled=yes
12259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012261fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012264fi
12265
12266
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012267fi
12268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12270$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012271if test $ac_cv_posix_semaphores_enabled = no
12272then
12273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012275
12276fi
12277
12278# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12280$as_echo_n "checking for broken sem_getvalue... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012281if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012285 ac_cv_broken_sem_getvalue=yes
12286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012288/* end confdefs.h. */
12289
12290#include <unistd.h>
12291#include <fcntl.h>
12292#include <stdio.h>
12293#include <semaphore.h>
12294#include <sys/stat.h>
12295
12296int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012297 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012298 int count;
12299 int res;
12300 if(a==SEM_FAILED){
12301 perror("sem_open");
12302 return 1;
12303
12304 }
12305 res = sem_getvalue(a, &count);
12306 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012307 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012308 return res==-1 ? 1 : 0;
12309}
12310
12311_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012313 ac_cv_broken_sem_getvalue=no
12314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012315 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012319fi
12320
12321
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012322fi
12323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12325$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012326if test $ac_cv_broken_sem_getvalue = yes
12327then
12328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012330
12331fi
12332
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012333# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12335$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012336# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012338 enableval=$enable_big_digits; case $enable_big_digits in
12339yes)
12340 enable_big_digits=30 ;;
12341no)
12342 enable_big_digits=15 ;;
1234315|30)
12344 ;;
12345*)
Charles-François Natali97781b02011-07-22 23:43:42 +020012346 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 +000012347esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12349$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012350
12351cat >>confdefs.h <<_ACEOF
12352#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12353_ACEOF
12354
12355
12356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12358$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012359fi
12360
12361
Guido van Rossumef2255b2000-03-10 22:30:29 +000012362# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363ac_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 +020012364if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
12366
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012369 wchar_h="yes"
12370
Guido van Rossumef2255b2000-03-10 22:30:29 +000012371else
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012373
12374fi
12375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012378# determine wchar_t size
12379if test "$wchar_h" = yes
12380then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12384# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12386$as_echo_n "checking size of wchar_t... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012387if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12391"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394 if test "$ac_cv_type_wchar_t" = yes; then
12395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012397as_fn_error 77 "cannot compute sizeof (wchar_t)
Charles-François Natali97781b02011-07-22 23:43:42 +020012398See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399 else
12400 ac_cv_sizeof_wchar_t=0
12401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012402fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12406$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407
12408
12409
Martin v. Löwis11437992002-04-12 09:54:03 +000012410cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012411#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012413
Michael W. Hudson54241132001-12-07 15:38:26 +000012414
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012415fi
12416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12418$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012419have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012421/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012422
12423#include <tcl.h>
12424#if TCL_UTF_MAX != 6
12425# error "NOT UCS4_TCL"
12426#endif
12427int
12428main ()
12429{
12430
12431 ;
12432 return 0;
12433}
12434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012436
12437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012438$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012439
12440 have_ucs4_tcl=yes
12441
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12445$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012446
Skip Montanaro6dead952003-09-25 14:50:04 +000012447# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012448if test "$wchar_h" = yes
12449then
12450 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12452$as_echo_n "checking whether wchar_t is signed... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012453 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012455else
12456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012457 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012458 ac_cv_wchar_t_signed=yes
12459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012462
12463 #include <wchar.h>
12464 int main()
12465 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012466 /* Success: exit code 0 */
12467 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012468 }
12469
12470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012472 ac_cv_wchar_t_signed=yes
12473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012478fi
12479
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012480fi
12481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12483$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484fi
12485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12487$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012488# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012490 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012491else
12492 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493fi
12494
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012495
12496if test $enable_unicode = yes
12497then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012498 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012499 case "$have_ucs4_tcl" in
12500 yes) enable_unicode="ucs4"
12501 ;;
12502 *) enable_unicode="ucs2"
12503 ;;
12504 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012505fi
12506
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012507
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012508case "$enable_unicode" in
12509ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012511
12512 ;;
12513ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012515
12516 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +020012517*) 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 +000012518esac
12519
Michael W. Hudson54241132001-12-07 15:38:26 +000012520
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
12522
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012523if test "$enable_unicode" = "no"
12524then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012525 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12527$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012528else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012529 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012532
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012533
12534 # wchar_t is only usable if it maps to an unsigned type
12535 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012536 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012537 then
12538 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012539
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012543
12544 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12545 then
12546 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012548
12549 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12550 then
12551 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012552 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012553
12554 else
12555 PY_UNICODE_TYPE="no type found"
12556 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12558$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012559fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012560
12561# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12563$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012564if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567 ac_cv_c_bigendian=unknown
12568 # See if we're dealing with a universal compiler.
12569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12570/* end confdefs.h. */
12571#ifndef __APPLE_CC__
12572 not a universal capable compiler
12573 #endif
12574 typedef int dummy;
12575
Skip Montanaro6dead952003-09-25 14:50:04 +000012576_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577if ac_fn_c_try_compile "$LINENO"; then :
12578
12579 # Check for potential -arch flags. It is not universal unless
12580 # there are at least two -arch flags with different values.
12581 ac_arch=
12582 ac_prev=
12583 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12584 if test -n "$ac_prev"; then
12585 case $ac_word in
12586 i?86 | x86_64 | ppc | ppc64)
12587 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12588 ac_arch=$ac_word
12589 else
12590 ac_cv_c_bigendian=universal
12591 break
12592 fi
12593 ;;
12594 esac
12595 ac_prev=
12596 elif test "x$ac_word" = "x-arch"; then
12597 ac_prev=arch
12598 fi
12599 done
12600fi
12601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602 if test $ac_cv_c_bigendian = unknown; then
12603 # See if sys/param.h defines the BYTE_ORDER macro.
12604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012606#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012608
Martin v. Löwis11437992002-04-12 09:54:03 +000012609int
12610main ()
12611{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12613 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12614 && LITTLE_ENDIAN)
12615 bogus endian macros
12616 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
12618 ;
12619 return 0;
12620}
12621_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012623 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012625/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012626#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012632#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633 not big endian
12634 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
12636 ;
12637 return 0;
12638}
12639_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012641 ac_cv_c_bigendian=yes
12642else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012643 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646fi
12647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12648 fi
12649 if test $ac_cv_c_bigendian = unknown; then
12650 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653#include <limits.h>
12654
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12659 bogus endian macros
12660 #endif
12661
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666if ac_fn_c_try_compile "$LINENO"; then :
12667 # It does; now see whether it defined to _BIG_ENDIAN or not.
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670#include <limits.h>
12671
12672int
12673main ()
12674{
12675#ifndef _BIG_ENDIAN
12676 not big endian
12677 #endif
12678
12679 ;
12680 return 0;
12681}
12682_ACEOF
12683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12689fi
12690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12691 fi
12692 if test $ac_cv_c_bigendian = unknown; then
12693 # Compile a test program.
12694 if test "$cross_compiling" = yes; then :
12695 # Try to guess by grepping values from an object file.
12696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12697/* end confdefs.h. */
12698short int ascii_mm[] =
12699 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12700 short int ascii_ii[] =
12701 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12702 int use_ascii (int i) {
12703 return ascii_mm[i] + ascii_ii[i];
12704 }
12705 short int ebcdic_ii[] =
12706 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12707 short int ebcdic_mm[] =
12708 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12709 int use_ebcdic (int i) {
12710 return ebcdic_mm[i] + ebcdic_ii[i];
12711 }
12712 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714int
12715main ()
12716{
12717return use_ascii (foo) == use_ebcdic (foo);
12718 ;
12719 return 0;
12720}
12721_ACEOF
12722if ac_fn_c_try_compile "$LINENO"; then :
12723 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12724 ac_cv_c_bigendian=yes
12725 fi
12726 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12727 if test "$ac_cv_c_bigendian" = unknown; then
12728 ac_cv_c_bigendian=no
12729 else
12730 # finding both strings is unlikely to happen, but who knows?
12731 ac_cv_c_bigendian=unknown
12732 fi
12733 fi
12734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012744 /* Are we little or big endian? From Harbison&Steele. */
12745 union
12746 {
12747 long int l;
12748 char c[sizeof (long int)];
12749 } u;
12750 u.l = 1;
12751 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752
12753 ;
12754 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012755}
Martin v. Löwis11437992002-04-12 09:54:03 +000012756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012758 ac_cv_c_bigendian=no
12759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12769$as_echo "$ac_cv_c_bigendian" >&6; }
12770 case $ac_cv_c_bigendian in #(
12771 yes)
12772 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12773;; #(
12774 no)
12775 ;; #(
12776 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012777
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012780 ;; #(
12781 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012782 as_fn_error $? "unknown endianness
Charles-François Natali97781b02011-07-22 23:43:42 +020012783 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012785
Michael W. Hudson54241132001-12-07 15:38:26 +000012786
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012787# Check whether right shifting a negative integer extends the sign bit
12788# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12790$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012791if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012796 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012800
12801int main()
12802{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012803 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012804}
12805
Martin v. Löwis11437992002-04-12 09:54:03 +000012806_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012808 ac_cv_rshift_extends_sign=yes
12809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012810 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012814fi
12815
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816fi
12817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12819$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012820if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012821then
Martin v. Löwis11437992002-04-12 09:54:03 +000012822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012824
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012825fi
12826
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012827# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12829$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012830if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012832else
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012837int
12838main ()
12839{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012840
12841 FILE *f = fopen("/dev/null", "r");
12842 flockfile(f);
12843 getc_unlocked(f);
12844 funlockfile(f);
12845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ;
12847 return 0;
12848}
12849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012851 ac_cv_have_getc_unlocked=yes
12852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853 ac_cv_have_getc_unlocked=no
12854fi
12855rm -f core conftest.err conftest.$ac_objext \
12856 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12860$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012861if test "$ac_cv_have_getc_unlocked" = yes
12862then
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012864$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012865
12866fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012867
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012868# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012869# save the value of LIBS so we don't actually link Python with readline
12870LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012871
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012872# On some systems we need to link readline to a termcap compatible
12873# library. NOTE: Keep the precedence of listed libraries synchronised
12874# with setup.py.
12875py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12877$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012878for py_libtermcap in "" ncursesw ncurses curses termcap; do
12879 if test -z "$py_libtermcap"; then
12880 READLINE_LIBS="-lreadline"
12881 else
12882 READLINE_LIBS="-lreadline -l$py_libtermcap"
12883 fi
12884 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012886/* end confdefs.h. */
12887
Martin v. Löwiseba40652007-08-30 20:10:57 +000012888/* Override any GCC internal prototype to avoid an error.
12889 Use char because int might match the return type of a GCC
12890 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012891#ifdef __cplusplus
12892extern "C"
12893#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012894char readline ();
12895int
12896main ()
12897{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012899 ;
12900 return 0;
12901}
12902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012904 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012906rm -f core conftest.err conftest.$ac_objext \
12907 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012908 if test $py_cv_lib_readline = yes; then
12909 break
12910 fi
12911done
12912# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12913#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012914if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12916$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12919$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012922
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012923fi
12924
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12927$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012928if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012930else
12931 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012932LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934/* end confdefs.h. */
12935
Martin v. Löwiseba40652007-08-30 20:10:57 +000012936/* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012939#ifdef __cplusplus
12940extern "C"
12941#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012942char rl_callback_handler_install ();
12943int
12944main ()
12945{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012947 ;
12948 return 0;
12949}
12950_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012951if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012952 ac_cv_lib_readline_rl_callback_handler_install=yes
12953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012954 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012958LIBS=$ac_check_lib_save_LIBS
12959fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12961$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020012962if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012965
12966fi
12967
12968
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012969# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012971/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012972#include <readline/readline.h>
12973_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012975 have_readline=yes
12976else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012977 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000012978
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012979fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012980rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012981if test $have_readline = yes
12982then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012985#include <readline/readline.h>
12986
12987_ACEOF
12988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012992
12993fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000012994rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000012997/* end confdefs.h. */
12998#include <readline/readline.h>
12999
13000_ACEOF
13001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013005
13006fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013007rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013008
13009fi
13010
Martin v. Löwis0daad592001-09-30 21:09:59 +000013011# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13013$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013014if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013018LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022/* Override any GCC internal prototype to avoid an error.
13023 Use char because int might match the return type of a GCC
13024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025#ifdef __cplusplus
13026extern "C"
13027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013028char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042rm -f core conftest.err conftest.$ac_objext \
13043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013044LIBS=$ac_check_lib_save_LIBS
13045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13047$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013048if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013050$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013051
Martin v. Löwis0daad592001-09-30 21:09:59 +000013052fi
13053
Michael W. Hudson54241132001-12-07 15:38:26 +000013054
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013055# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13057$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013058if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013060else
13061 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013062LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013064/* end confdefs.h. */
13065
13066/* Override any GCC internal prototype to avoid an error.
13067 Use char because int might match the return type of a GCC
13068 builtin and then its argument prototype would still apply. */
13069#ifdef __cplusplus
13070extern "C"
13071#endif
13072char rl_completion_display_matches_hook ();
13073int
13074main ()
13075{
13076return rl_completion_display_matches_hook ();
13077 ;
13078 return 0;
13079}
13080_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013082 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013086rm -f core conftest.err conftest.$ac_objext \
13087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013088LIBS=$ac_check_lib_save_LIBS
13089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13091$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013092if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013095
13096fi
13097
13098
Martin v. Löwis0daad592001-09-30 21:09:59 +000013099# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13101$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013102if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013104else
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013106LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110/* Override any GCC internal prototype to avoid an error.
13111 Use char because int might match the return type of a GCC
13112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013113#ifdef __cplusplus
13114extern "C"
13115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013116char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013117int
13118main ()
13119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013120return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 ;
13122 return 0;
13123}
13124_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013128 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013129fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130rm -f core conftest.err conftest.$ac_objext \
13131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013132LIBS=$ac_check_lib_save_LIBS
13133fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13135$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013136if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013139
Guido van Rossum353ae582001-07-10 16:45:32 +000013140fi
13141
Jack Jansendd19cf82001-12-06 22:36:17 +000013142
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013143# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013145/* end confdefs.h. */
13146#include <readline/readline.h>
13147_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013149 have_readline=yes
13150else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013151 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013152
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013153fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013154rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013155if test $have_readline = yes
13156then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013158/* end confdefs.h. */
13159#include <readline/readline.h>
13160
13161_ACEOF
13162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013166
13167fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013168rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013169
13170fi
13171
Martin v. Löwis82bca632006-02-10 20:49:30 +000013172# End of readline checks: restore LIBS
13173LIBS=$LIBS_no_readline
13174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13176$as_echo_n "checking for broken nice()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013177if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013178 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013182 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013185/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013186
13187int main()
13188{
13189 int val1 = nice(1);
13190 if (val1 != -1 && val1 == nice(2))
13191 exit(0);
13192 exit(1);
13193}
13194
Martin v. Löwis11437992002-04-12 09:54:03 +000013195_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013197 ac_cv_broken_nice=yes
13198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013199 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013203fi
13204
Martin v. Löwiseba40652007-08-30 20:10:57 +000013205fi
13206
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13208$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013209if test "$ac_cv_broken_nice" = yes
13210then
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013213
13214fi
13215
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13217$as_echo_n "checking for broken poll()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013218if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013222 ac_cv_broken_poll=no
13223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013225/* end confdefs.h. */
13226
13227#include <poll.h>
13228
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013229int main()
13230{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013231 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013232 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013233
13234 close (42);
13235
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013236 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013237 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013238 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013239 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013240 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013241 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013242 return 1;
13243}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013244
13245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013247 ac_cv_broken_poll=yes
13248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013250fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013255fi
13256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13258$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013259if test "$ac_cv_broken_poll" = yes
13260then
13261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013263
13264fi
13265
Brett Cannon43802422005-02-10 20:48:03 +000013266# 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 +000013267# (which is not required by ISO C or UNIX spec) and/or if we support
13268# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269ac_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 +000013270#include <$ac_cv_struct_tm>
13271
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272"
Charles-François Natali97781b02011-07-22 23:43:42 +020013273if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013274
13275cat >>confdefs.h <<_ACEOF
13276#define HAVE_STRUCT_TM_TM_ZONE 1
13277_ACEOF
13278
13279
13280fi
13281
13282if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013285
13286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13288"
Charles-François Natali97781b02011-07-22 23:43:42 +020013289if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293fi
13294
Martin v. Löwiseba40652007-08-30 20:10:57 +000013295cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297_ACEOF
13298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13300$as_echo_n "checking for tzname... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013301if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013305/* end confdefs.h. */
13306#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307#if !HAVE_DECL_TZNAME
13308extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013309#endif
13310
13311int
13312main ()
13313{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013314return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013315 ;
13316 return 0;
13317}
13318_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013319if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013320 ac_cv_var_tzname=yes
13321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013322 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013324rm -f core conftest.err conftest.$ac_objext \
13325 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13328$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013329 if test $ac_cv_var_tzname = yes; then
13330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013332
13333 fi
13334fi
13335
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013336
Martin v. Löwis1d459062005-03-14 21:23:33 +000013337# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13339$as_echo_n "checking for working tzset()... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013340if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013342else
13343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013345 ac_cv_working_tzset=no
13346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013349
13350#include <stdlib.h>
13351#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013352#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013353
13354#if HAVE_TZNAME
13355extern char *tzname[];
13356#endif
13357
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013358int main()
13359{
Brett Cannon18367812003-09-19 00:59:16 +000013360 /* Note that we need to ensure that not only does tzset(3)
13361 do 'something' with localtime, but it works as documented
13362 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013363 This includes making sure that tzname is set properly if
13364 tm->tm_zone does not exist since it is the alternative way
13365 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013366
13367 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013368 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013369 */
13370
Martin v. Löwis1d459062005-03-14 21:23:33 +000013371 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013372 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13373
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013374 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013375 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013376 if (localtime(&groundhogday)->tm_hour != 0)
13377 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013378#if HAVE_TZNAME
13379 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13380 if (strcmp(tzname[0], "UTC") ||
13381 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13382 exit(1);
13383#endif
Brett Cannon18367812003-09-19 00:59:16 +000013384
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013385 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013386 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013387 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013388 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013389#if HAVE_TZNAME
13390 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13391 exit(1);
13392#endif
Brett Cannon18367812003-09-19 00:59:16 +000013393
13394 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13395 tzset();
13396 if (localtime(&groundhogday)->tm_hour != 11)
13397 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013398#if HAVE_TZNAME
13399 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13400 exit(1);
13401#endif
13402
13403#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013404 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13405 exit(1);
13406 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13407 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013408#endif
Brett Cannon18367812003-09-19 00:59:16 +000013409
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013410 exit(0);
13411}
13412
13413_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013415 ac_cv_working_tzset=yes
13416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013421fi
13422
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423fi
13424
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13426$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013427if test "$ac_cv_working_tzset" = yes
13428then
13429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013431
13432fi
13433
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013434# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13436$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013437if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013441/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013442#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013443int
13444main ()
13445{
13446
13447struct stat st;
13448st.st_mtim.tv_nsec = 1;
13449
13450 ;
13451 return 0;
13452}
13453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013455 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13460fi
13461
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13463$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013464if test "$ac_cv_stat_tv_nsec" = yes
13465then
13466
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013467$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013468
13469fi
13470
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013471# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13473$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013474if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013478/* end confdefs.h. */
13479#include <sys/stat.h>
13480int
13481main ()
13482{
13483
13484struct stat st;
13485st.st_mtimespec.tv_nsec = 1;
13486
13487 ;
13488 return 0;
13489}
13490_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013492 ac_cv_stat_tv_nsec2=yes
13493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013494 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497fi
13498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13500$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013501if test "$ac_cv_stat_tv_nsec2" = yes
13502then
13503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013504$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013505
13506fi
13507
Jack Jansen666b1e72001-10-31 12:11:48 +000013508# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13510$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013511if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013512 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013513else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013515/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013516#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013517int
13518main ()
13519{
Jack Jansen666b1e72001-10-31 12:11:48 +000013520
13521 int rtn;
13522 rtn = mvwdelch(0,0,0);
13523
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 ;
13525 return 0;
13526}
13527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013529 ac_cv_mvwdelch_is_expression=yes
13530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13534fi
13535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13537$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013538
13539if test "$ac_cv_mvwdelch_is_expression" = yes
13540then
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013543
13544fi
13545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13547$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013548if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013549 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013550else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013552/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013553#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013554int
13555main ()
13556{
Jack Jansen666b1e72001-10-31 12:11:48 +000013557
13558 WINDOW *w;
13559 w->_flags = 0;
13560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013565if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013566 ac_cv_window_has_flags=yes
13567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571fi
13572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13574$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013575
Jack Jansen666b1e72001-10-31 12:11:48 +000013576
13577if test "$ac_cv_window_has_flags" = yes
13578then
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013581
13582fi
13583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13585$as_echo_n "checking for is_term_resized... " >&6; }
13586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013587/* end confdefs.h. */
13588#include <curses.h>
13589int
13590main ()
13591{
13592void *x=is_term_resized
13593 ;
13594 return 0;
13595}
13596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013598
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013599$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013600
Matthias Klosec511b472010-05-08 11:01:39 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013602$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13605$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013606
13607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13611$as_echo_n "checking for resize_term... " >&6; }
13612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013613/* end confdefs.h. */
13614#include <curses.h>
13615int
13616main ()
13617{
13618void *x=resize_term
13619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013623if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013626
Matthias Klosec511b472010-05-08 11:01:39 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13631$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013632
13633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13637$as_echo_n "checking for resizeterm... " >&6; }
13638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013639/* end confdefs.h. */
13640#include <curses.h>
13641int
13642main ()
13643{
13644void *x=resizeterm
13645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013652
Matthias Klosec511b472010-05-08 11:01:39 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013658
13659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13663$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013664
13665if test -r /dev/ptmx
13666then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13668$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013671
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13674$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013675fi
13676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13678$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013679
13680if test -r /dev/ptc
13681then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13683$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013685$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013686
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13689$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013690fi
13691
Mark Dickinson82864d12009-11-15 16:18:58 +000013692if test "$have_long_long" = yes
13693then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13695$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013696 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013697 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013699 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013700 ac_cv_have_long_long_format=no
13701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013703/* end confdefs.h. */
13704
13705 #include <stdio.h>
13706 #include <stddef.h>
13707 #include <string.h>
13708
13709 #ifdef HAVE_SYS_TYPES_H
13710 #include <sys/types.h>
13711 #endif
13712
13713 int main()
13714 {
13715 char buffer[256];
13716
13717 if (sprintf(buffer, "%lld", (long long)123) < 0)
13718 return 1;
13719 if (strcmp(buffer, "123"))
13720 return 1;
13721
13722 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13723 return 1;
13724 if (strcmp(buffer, "-123"))
13725 return 1;
13726
13727 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13728 return 1;
13729 if (strcmp(buffer, "123"))
13730 return 1;
13731
13732 return 0;
13733 }
13734
13735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013737 ac_cv_have_long_long_format=yes
13738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013739 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013743fi
13744
13745
Mark Dickinson82864d12009-11-15 16:18:58 +000013746fi
13747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13749$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013750fi
13751
Mark Dickinson5ce84742009-12-31 20:48:04 +000013752if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013753then
13754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013756
13757fi
13758
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013759if test $ac_sys_system = Darwin
13760then
13761 LIBS="$LIBS -framework CoreFoundation"
13762fi
13763
Mark Dickinson82864d12009-11-15 16:18:58 +000013764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13766$as_echo_n "checking for %zd printf() format support... " >&6; }
Charles-François Natali97781b02011-07-22 23:43:42 +020013767if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013768 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013770 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013771 ac_cv_have_size_t_format="cross -- assuming yes"
13772
Brett Cannon09d12362006-05-11 05:11:33 +000013773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013775/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013776
Brett Cannon09d12362006-05-11 05:11:33 +000013777#include <stdio.h>
13778#include <stddef.h>
13779#include <string.h>
13780
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013781#ifdef HAVE_SYS_TYPES_H
13782#include <sys/types.h>
13783#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013784
13785#ifdef HAVE_SSIZE_T
13786typedef ssize_t Py_ssize_t;
13787#elif SIZEOF_VOID_P == SIZEOF_LONG
13788typedef long Py_ssize_t;
13789#else
13790typedef int Py_ssize_t;
13791#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013792
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013793int main()
13794{
13795 char buffer[256];
13796
Brett Cannon09d12362006-05-11 05:11:33 +000013797 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13798 return 1;
13799
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013800 if (strcmp(buffer, "123"))
13801 return 1;
13802
13803 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13804 return 1;
13805
13806 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013807 return 1;
13808
13809 return 0;
13810}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013811
Brett Cannon09d12362006-05-11 05:11:33 +000013812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013814 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013820fi
13821
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13824$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013825if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013828
13829fi
13830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013831ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013832#ifdef HAVE_SYS_TYPES_H
13833#include <sys/types.h>
13834#endif
13835#ifdef HAVE_SYS_SOCKET_H
13836#include <sys/socket.h>
13837#endif
13838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013839"
Charles-François Natali97781b02011-07-22 23:43:42 +020013840if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013845
13846fi
13847
Michael W. Hudson54241132001-12-07 15:38:26 +000013848
Benjamin Peterson7497e912010-10-16 00:53:39 +000013849case $ac_sys_system in
13850AIX*)
13851
13852$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13853 ;;
13854esac
13855
13856
Michael W. Hudson54241132001-12-07 15:38:26 +000013857
13858
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013859for h in `(cd $srcdir;echo Python/thread_*.h)`
13860do
13861 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13862done
13863
Michael W. Hudson54241132001-12-07 15:38:26 +000013864
Neal Norwitzd24499d2005-12-18 21:36:39 +000013865SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13867$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013868for dir in $SRCDIRS; do
13869 if test ! -d $dir; then
13870 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013871 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013872done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13874$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013875
Guido van Rossum627b2d71993-12-24 10:39:16 +000013876# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013877ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013878
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013879ac_config_files="$ac_config_files Modules/ld_so_aix"
13880
Martin v. Löwis11437992002-04-12 09:54:03 +000013881cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882# This file is a shell script that caches the results of configure
13883# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013884# scripts and configure runs, see configure's option --config-cache.
13885# It is not useful on other systems. If it contains results you don't
13886# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013887#
Martin v. Löwis11437992002-04-12 09:54:03 +000013888# config.status only pays attention to the cache file if you give it
13889# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890#
Skip Montanaro6dead952003-09-25 14:50:04 +000013891# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013892# loading this file, other *unset* `ac_cv_foo' will be assigned the
13893# following values.
13894
13895_ACEOF
13896
Guido van Rossumf78abae1997-01-21 22:02:36 +000013897# The following way of writing the cache mishandles newlines in values,
13898# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013900# Ultrix sh set writes to stderr and can't be redirected directly,
13901# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902(
13903 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13904 eval ac_val=\$$ac_var
13905 case $ac_val in #(
13906 *${as_nl}*)
13907 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13909$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 esac
13911 case $ac_var in #(
13912 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13914 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915 esac ;;
13916 esac
13917 done
13918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13921 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013922 # `set' does not quote correctly, so add quotes: double-quote
13923 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 "s/'/'\\\\''/g;
13926 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 *)
13929 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932 esac |
13933 sort
13934) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013936 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13940 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13942 :end' >>confcache
13943if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13944 if test -w "$cache_file"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020013945 test "x$cache_file" != "x/dev/null" &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13947$as_echo "$as_me: updating cache $cache_file" >&6;}
Charles-François Natali97781b02011-07-22 23:43:42 +020013948 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013949 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013950 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13951$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013952 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013953fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013954rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013956test "x$prefix" = xNONE && prefix=$ac_default_prefix
13957# Let make expand exec_prefix.
13958test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013959
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960DEFS=-DHAVE_CONFIG_H
13961
Skip Montanaro6dead952003-09-25 14:50:04 +000013962ac_libobjs=
13963ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013964U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013965for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13966 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13970 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13972 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013973done
13974LIBOBJS=$ac_libobjs
13975
13976LTLIBOBJS=$ac_ltlibobjs
13977
13978
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013980
Charles-François Natali97781b02011-07-22 23:43:42 +020013981: ${CONFIG_STATUS=./config.status}
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013983ac_clean_files_save=$ac_clean_files
13984ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13986$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13987as_write_fail=0
13988cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989#! $SHELL
13990# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013991# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013992# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013993# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013996ac_cs_recheck=false
13997ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999SHELL=\${CONFIG_SHELL-$SHELL}
14000export SHELL
14001_ASEOF
14002cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14003## -------------------- ##
14004## M4sh Initialization. ##
14005## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014006
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007# Be more Bourne compatible
14008DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014009if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 emulate sh
14011 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014013 # is contrary to our usage. Disable this feature.
14014 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 case `(set -o) 2>/dev/null` in #(
14018 *posix*) :
14019 set -o posix ;; #(
14020 *) :
14021 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014023fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014024
Skip Montanaro6dead952003-09-25 14:50:04 +000014025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026as_nl='
14027'
14028export as_nl
14029# Printing a long string crashes Solaris 7 /usr/bin/printf.
14030as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14031as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14032as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14033# Prefer a ksh shell builtin over an external printf program on Solaris,
14034# but without wasting forks for bash or zsh.
14035if test -z "$BASH_VERSION$ZSH_VERSION" \
14036 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14037 as_echo='print -r --'
14038 as_echo_n='print -rn --'
14039elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14040 as_echo='printf %s\n'
14041 as_echo_n='printf %s'
14042else
14043 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14044 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14045 as_echo_n='/usr/ucb/echo -n'
14046 else
14047 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14048 as_echo_n_body='eval
14049 arg=$1;
14050 case $arg in #(
14051 *"$as_nl"*)
14052 expr "X$arg" : "X\\(.*\\)$as_nl";
14053 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14054 esac;
14055 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14056 '
14057 export as_echo_n_body
14058 as_echo_n='sh -c $as_echo_n_body as_echo'
14059 fi
14060 export as_echo_body
14061 as_echo='sh -c $as_echo_body as_echo'
14062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
14064# The user is always right.
14065if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014066 PATH_SEPARATOR=:
14067 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14068 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14069 PATH_SEPARATOR=';'
14070 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014072
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073
14074# IFS
14075# We need space, tab and new line, in precisely that order. Quoting is
14076# there to prevent editors from complaining about space-tab.
14077# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14078# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079IFS=" "" $as_nl"
14080
14081# Find who we are. Look in the path if we contain no directory separator.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014082case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083 *[\\/]* ) as_myself=$0 ;;
14084 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014085for as_dir in $PATH
14086do
14087 IFS=$as_save_IFS
14088 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14090 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093 ;;
14094esac
14095# We did not find ourselves, most probably we were run as `sh COMMAND'
14096# in which case we are not to be found in the path.
14097if test "x$as_myself" = x; then
14098 as_myself=$0
14099fi
14100if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14102 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103fi
14104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105# Unset variables that we do not need and which cause bugs (e.g. in
14106# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14107# suppresses any "Segmentation fault" message there. '((' could
14108# trigger a bug in pdksh 5.2.14.
14109for as_var in BASH_ENV ENV MAIL MAILPATH
14110do eval test x\${$as_var+set} = xset \
14111 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014112done
14113PS1='$ '
14114PS2='> '
14115PS4='+ '
14116
14117# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118LC_ALL=C
14119export LC_ALL
14120LANGUAGE=C
14121export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123# CDPATH.
14124(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14125
14126
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014127# as_fn_error STATUS ERROR [LINENO LOG_FD]
14128# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14130# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014131# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014132as_fn_error ()
14133{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014134 as_status=$1; test $as_status -eq 0 && as_status=1
14135 if test "$4"; then
14136 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14137 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014139 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014140 as_fn_exit $as_status
14141} # as_fn_error
14142
14143
14144# as_fn_set_status STATUS
14145# -----------------------
14146# Set $? to STATUS, without forking.
14147as_fn_set_status ()
14148{
14149 return $1
14150} # as_fn_set_status
14151
14152# as_fn_exit STATUS
14153# -----------------
14154# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14155as_fn_exit ()
14156{
14157 set +e
14158 as_fn_set_status $1
14159 exit $1
14160} # as_fn_exit
14161
14162# as_fn_unset VAR
14163# ---------------
14164# Portably unset VAR.
14165as_fn_unset ()
14166{
14167 { eval $1=; unset $1;}
14168}
14169as_unset=as_fn_unset
14170# as_fn_append VAR VALUE
14171# ----------------------
14172# Append the text in VALUE to the end of the definition contained in VAR. Take
14173# advantage of any shell optimizations that allow amortized linear growth over
14174# repeated appends, instead of the typical quadratic growth present in naive
14175# implementations.
14176if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14177 eval 'as_fn_append ()
14178 {
14179 eval $1+=\$2
14180 }'
14181else
14182 as_fn_append ()
14183 {
14184 eval $1=\$$1\$2
14185 }
14186fi # as_fn_append
14187
14188# as_fn_arith ARG...
14189# ------------------
14190# Perform arithmetic evaluation on the ARGs, and store the result in the
14191# global $as_val. Take advantage of shells that can avoid forks. The arguments
14192# must be portable across $(()) and expr.
14193if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14194 eval 'as_fn_arith ()
14195 {
14196 as_val=$(( $* ))
14197 }'
14198else
14199 as_fn_arith ()
14200 {
14201 as_val=`expr "$@" || test $? -eq 1`
14202 }
14203fi # as_fn_arith
14204
14205
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206if expr a : '\(a\)' >/dev/null 2>&1 &&
14207 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14208 as_expr=expr
14209else
14210 as_expr=false
14211fi
14212
14213if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14214 as_basename=basename
14215else
14216 as_basename=false
14217fi
14218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14220 as_dirname=dirname
14221else
14222 as_dirname=false
14223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225as_me=`$as_basename -- "$0" ||
14226$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14227 X"$0" : 'X\(//\)$' \| \
14228 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014230 sed '/^.*\/\([^/][^/]*\)\/*$/{
14231 s//\1/
14232 q
14233 }
14234 /^X\/\(\/\/\)$/{
14235 s//\1/
14236 q
14237 }
14238 /^X\/\(\/\).*/{
14239 s//\1/
14240 q
14241 }
14242 s/.*/./; q'`
14243
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244# Avoid depending upon Character Ranges.
14245as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14246as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14247as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14248as_cr_digits='0123456789'
14249as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250
14251ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014255 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014256 xy) ECHO_C='\c';;
14257 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14258 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259 esac;;
14260*)
14261 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014263
Martin v. Löwis11437992002-04-12 09:54:03 +000014264rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014265if test -d conf$$.dir; then
14266 rm -f conf$$.dir/conf$$.file
14267else
14268 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014269 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271if (echo >conf$$.file) 2>/dev/null; then
14272 if ln -s conf$$.file conf$$ 2>/dev/null; then
14273 as_ln_s='ln -s'
14274 # ... but there are two gotchas:
14275 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14276 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14277 # In both cases, we have to default to `cp -p'.
14278 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14279 as_ln_s='cp -p'
14280 elif ln conf$$.file conf$$ 2>/dev/null; then
14281 as_ln_s=ln
14282 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014285else
14286 as_ln_s='cp -p'
14287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14289rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291
14292# as_fn_mkdir_p
14293# -------------
14294# Create "$as_dir" as a directory, including parents if necessary.
14295as_fn_mkdir_p ()
14296{
14297
14298 case $as_dir in #(
14299 -*) as_dir=./$as_dir;;
14300 esac
14301 test -d "$as_dir" || eval $as_mkdir_p || {
14302 as_dirs=
14303 while :; do
14304 case $as_dir in #(
14305 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14306 *) as_qdir=$as_dir;;
14307 esac
14308 as_dirs="'$as_qdir' $as_dirs"
14309 as_dir=`$as_dirname -- "$as_dir" ||
14310$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14311 X"$as_dir" : 'X\(//\)[^/]' \| \
14312 X"$as_dir" : 'X\(//\)$' \| \
14313 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14314$as_echo X"$as_dir" |
14315 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14316 s//\1/
14317 q
14318 }
14319 /^X\(\/\/\)[^/].*/{
14320 s//\1/
14321 q
14322 }
14323 /^X\(\/\/\)$/{
14324 s//\1/
14325 q
14326 }
14327 /^X\(\/\).*/{
14328 s//\1/
14329 q
14330 }
14331 s/.*/./; q'`
14332 test -d "$as_dir" && break
14333 done
14334 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014335 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014336
14337
14338} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014339if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014341else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014342 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014343 as_mkdir_p=false
14344fi
14345
Martin v. Löwiseba40652007-08-30 20:10:57 +000014346if test -x / >/dev/null 2>&1; then
14347 as_test_x='test -x'
14348else
14349 if ls -dL / >/dev/null 2>&1; then
14350 as_ls_L_option=L
14351 else
14352 as_ls_L_option=
14353 fi
14354 as_test_x='
14355 eval sh -c '\''
14356 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014357 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014358 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359 case $1 in #(
14360 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014363 ???[sx]*):;;*)false;;esac;fi
14364 '\'' sh
14365 '
14366fi
14367as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
14369# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014370as_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 +000014371
14372# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014373as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375
Martin v. Löwis11437992002-04-12 09:54:03 +000014376exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377## ----------------------------------- ##
14378## Main body of $CONFIG_STATUS script. ##
14379## ----------------------------------- ##
14380_ASEOF
14381test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14384# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014385# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014386# values after options handling.
14387ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014388This file was extended by python $as_me 2.7, which was
Charles-François Natali97781b02011-07-22 23:43:42 +020014389generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
14391 CONFIG_FILES = $CONFIG_FILES
14392 CONFIG_HEADERS = $CONFIG_HEADERS
14393 CONFIG_LINKS = $CONFIG_LINKS
14394 CONFIG_COMMANDS = $CONFIG_COMMANDS
14395 $ $0 $@
14396
Martin v. Löwiseba40652007-08-30 20:10:57 +000014397on `(hostname || uname -n) 2>/dev/null | sed 1q`
14398"
14399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400_ACEOF
14401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014402case $ac_config_files in *"
14403"*) set x $ac_config_files; shift; ac_config_files=$*;;
14404esac
14405
14406case $ac_config_headers in *"
14407"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14408esac
14409
14410
14411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014412# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014413config_files="$ac_config_files"
14414config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014419ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420\`$as_me' instantiates files and other configuration actions
14421from templates according to the current configuration. Unless the files
14422and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014428 --config print configuration, then exit
14429 -q, --quiet, --silent
14430 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 -d, --debug don't remove temporary files
14432 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014433 --file=FILE[:TEMPLATE]
14434 instantiate the configuration file FILE
14435 --header=FILE[:TEMPLATE]
14436 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438Configuration files:
14439$config_files
14440
14441Configuration headers:
14442$config_headers
14443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014444Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014445
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14448ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014449ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014450python config.status 2.7
Charles-François Natali97781b02011-07-22 23:43:42 +020014451configured by $0, generated by GNU Autoconf 2.67,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014452 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014454Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014455This config.status script is free software; the Free Software Foundation
14456gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014457
14458ac_pwd='$ac_pwd'
14459srcdir='$srcdir'
14460INSTALL='$INSTALL'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014461test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
14463
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14465# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014466ac_need_defaults=:
14467while test $# != 0
14468do
14469 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014470 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14472 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014473 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014475 --*=)
14476 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14477 ac_optarg=
14478 ac_shift=:
14479 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014481 ac_option=$1
14482 ac_optarg=$2
14483 ac_shift=shift
14484 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 esac
14486
Skip Montanaro6dead952003-09-25 14:50:04 +000014487 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014489 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14490 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014492 $as_echo "$ac_cs_version"; exit ;;
14493 --config | --confi | --conf | --con | --co | --c )
14494 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014495 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 debug=: ;;
14497 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014498 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499 case $ac_optarg in
14500 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014501 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502 esac
14503 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ac_need_defaults=false;;
14505 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014506 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507 case $ac_optarg in
14508 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14509 esac
14510 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512 --he | --h)
14513 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014514 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014515Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14519 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14520 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
14522 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014523 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014524Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014527 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014528
14529 esac
14530 shift
14531done
14532
Skip Montanaro6dead952003-09-25 14:50:04 +000014533ac_configure_extra_args=
14534
14535if $ac_cs_silent; then
14536 exec 6>/dev/null
14537 ac_configure_extra_args="$ac_configure_extra_args --silent"
14538fi
14539
14540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014542if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14544 shift
14545 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14546 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014548 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014549fi
14550
Martin v. Löwis11437992002-04-12 09:54:03 +000014551_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014553exec 5>>config.log
14554{
14555 echo
14556 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14557## Running $as_me. ##
14558_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014561
Martin v. Löwiseba40652007-08-30 20:10:57 +000014562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014564_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567
14568# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014569for ac_config_target in $ac_config_targets
14570do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571 case $ac_config_target in
14572 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14573 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14574 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14575 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014576 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14577 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14579 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014580 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014581 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582
Charles-François Natali97781b02011-07-22 23:43:42 +020014583 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 esac
14585done
14586
Martin v. Löwiseba40652007-08-30 20:10:57 +000014587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588# If the user did not use the arguments to specify the items to instantiate,
14589# then the envvar interface is used. Set only those that are not.
14590# We use the long form for the default assignment because of an extremely
14591# bizarre bug on SunOS 4.1.3.
14592if $ac_need_defaults; then
14593 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14594 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14595fi
14596
Skip Montanaro6dead952003-09-25 14:50:04 +000014597# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014599# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014600# Hook for its removal unless debugging.
14601# Note that there is a small window in which the directory will not be cleaned:
14602# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014603$debug ||
14604{
Charles-François Natali97781b02011-07-22 23:43:42 +020014605 tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606 trap 'exit_status=$?
Charles-François Natali97781b02011-07-22 23:43:42 +020014607 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014610}
Martin v. Löwis11437992002-04-12 09:54:03 +000014611# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Charles-François Natali97781b02011-07-22 23:43:42 +020014615 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014616} ||
14617{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618 tmp=./conf$$-$RANDOM
14619 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014620} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014622# Set up the scripts for CONFIG_FILES section.
14623# No need to generate them if there are no CONFIG_FILES.
14624# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014627
14628ac_cr=`echo X | tr X '\015'`
14629# On cygwin, bash can eat \r inside `` if the user requested igncr.
14630# But we know of no other shell where ac_cr would be empty at this
14631# point, so we can use a bashism as a fallback.
14632if test "x$ac_cr" = x; then
14633 eval ac_cr=\$\'\\r\'
14634fi
14635ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14636if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014637 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638else
14639 ac_cs_awk_cr=$ac_cr
14640fi
14641
Charles-François Natali97781b02011-07-22 23:43:42 +020014642echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014643_ACEOF
14644
Martin v. Löwiseba40652007-08-30 20:10:57 +000014645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646{
14647 echo "cat >conf$$subs.awk <<_ACEOF" &&
14648 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14649 echo "_ACEOF"
14650} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014651 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14652ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653ac_delim='%!_!# '
14654for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014655 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014656 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14659 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660 break
14661 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014662 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663 else
14664 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Charles-François Natali97781b02011-07-22 23:43:42 +020014670cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672sed -n '
14673h
14674s/^/S["/; s/!.*/"]=/
14675p
14676g
14677s/^[^!]*!//
14678:repl
14679t repl
14680s/'"$ac_delim"'$//
14681t delim
14682:nl
14683h
14684s/\(.\{148\}\)..*/\1/
14685t more1
14686s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14687p
14688n
14689b repl
14690:more1
14691s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14692p
14693g
14694s/.\{148\}//
14695t nl
14696:delim
14697h
14698s/\(.\{148\}\)..*/\1/
14699t more2
14700s/["\\]/\\&/g; s/^/"/; s/$/"/
14701p
14702b
14703:more2
14704s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14705p
14706g
14707s/.\{148\}//
14708t delim
14709' <conf$$subs.awk | sed '
14710/^[^""]/{
14711 N
14712 s/\n//
14713}
14714' >>$CONFIG_STATUS || ac_write_fail=1
14715rm -f conf$$subs.awk
14716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14717_ACAWK
Charles-François Natali97781b02011-07-22 23:43:42 +020014718cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719 for (key in S) S_is_set[key] = 1
14720 FS = ""
14721
14722}
14723{
14724 line = $ 0
14725 nfields = split(line, field, "@")
14726 substed = 0
14727 len = length(field[1])
14728 for (i = 2; i < nfields; i++) {
14729 key = field[i]
14730 keylen = length(key)
14731 if (S_is_set[key]) {
14732 value = S[key]
14733 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14734 len += length(value) + length(field[++i])
14735 substed = 1
14736 } else
14737 len += 1 + keylen
14738 }
14739
14740 print line
14741}
14742
14743_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14746if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14747 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14748else
14749 cat
Charles-François Natali97781b02011-07-22 23:43:42 +020014750fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014751 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014752_ACEOF
14753
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014754# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14755# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756# trailing colons and then remove the whole line if VPATH becomes empty
14757# (actually we leave an empty line to preserve line numbers).
14758if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014759 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14760h
14761s///
14762s/^/:/
14763s/[ ]*$/:/
14764s/:\$(srcdir):/:/g
14765s/:\${srcdir}:/:/g
14766s/:@srcdir@:/:/g
14767s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014769x
14770s/\(=[ ]*\).*/\1/
14771G
14772s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773s/^[^=]*=[ ]*$//
14774}'
14775fi
14776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014778fi # test -n "$CONFIG_FILES"
14779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780# Set up the scripts for CONFIG_HEADERS section.
14781# No need to generate them if there are no CONFIG_HEADERS.
14782# This happens for instance with `./config.status Makefile'.
14783if test -n "$CONFIG_HEADERS"; then
Charles-François Natali97781b02011-07-22 23:43:42 +020014784cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014785BEGIN {
14786_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014788# Transform confdefs.h into an awk script `defines.awk', embedded as
14789# here-document in config.status, that substitutes the proper values into
14790# config.h.in to produce config.h.
14791
14792# Create a delimiter string that does not exist in confdefs.h, to ease
14793# handling of long lines.
14794ac_delim='%!_!# '
14795for ac_last_try in false false :; do
Charles-François Natali97781b02011-07-22 23:43:42 +020014796 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14797 if test -z "$ac_t"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014798 break
14799 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014800 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014801 else
14802 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14803 fi
14804done
14805
14806# For the awk script, D is an array of macro values keyed by name,
14807# likewise P contains macro parameters if any. Preserve backslash
14808# newline sequences.
14809
14810ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14811sed -n '
14812s/.\{148\}/&'"$ac_delim"'/g
14813t rset
14814:rset
14815s/^[ ]*#[ ]*define[ ][ ]*/ /
14816t def
14817d
14818:def
14819s/\\$//
14820t bsnl
14821s/["\\]/\\&/g
14822s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14823D["\1"]=" \3"/p
14824s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14825d
14826:bsnl
14827s/["\\]/\\&/g
14828s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14829D["\1"]=" \3\\\\\\n"\\/p
14830t cont
14831s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14832t cont
14833d
14834:cont
14835n
14836s/.\{148\}/&'"$ac_delim"'/g
14837t clear
14838:clear
14839s/\\$//
14840t bsnlc
14841s/["\\]/\\&/g; s/^/"/; s/$/"/p
14842d
14843:bsnlc
14844s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14845b cont
14846' <confdefs.h | sed '
14847s/'"$ac_delim"'/"\\\
14848"/g' >>$CONFIG_STATUS || ac_write_fail=1
14849
14850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14851 for (key in D) D_is_set[key] = 1
14852 FS = ""
14853}
14854/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14855 line = \$ 0
14856 split(line, arg, " ")
14857 if (arg[1] == "#") {
14858 defundef = arg[2]
14859 mac1 = arg[3]
14860 } else {
14861 defundef = substr(arg[1], 2)
14862 mac1 = arg[2]
14863 }
14864 split(mac1, mac2, "(") #)
14865 macro = mac2[1]
14866 prefix = substr(line, 1, index(line, defundef) - 1)
14867 if (D_is_set[macro]) {
14868 # Preserve the white space surrounding the "#".
14869 print prefix "define", macro P[macro] D[macro]
14870 next
14871 } else {
14872 # Replace #undef with comments. This is necessary, for example,
14873 # in the case of _POSIX_SOURCE, which is predefined and required
14874 # on some systems where configure will not decide to define it.
14875 if (defundef == "undef") {
14876 print "/*", prefix defundef, macro, "*/"
14877 next
14878 }
14879 }
14880}
14881{ print }
14882_ACAWK
14883_ACEOF
14884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014885 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014886fi # test -n "$CONFIG_HEADERS"
14887
14888
14889eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14890shift
14891for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892do
14893 case $ac_tag in
14894 :[FHLC]) ac_mode=$ac_tag; continue;;
14895 esac
14896 case $ac_mode$ac_tag in
14897 :[FHL]*:*);;
Charles-François Natali97781b02011-07-22 23:43:42 +020014898 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899 :[FH]-) ac_tag=-:-;;
14900 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14901 esac
14902 ac_save_IFS=$IFS
14903 IFS=:
14904 set x $ac_tag
14905 IFS=$ac_save_IFS
14906 shift
14907 ac_file=$1
14908 shift
14909
14910 case $ac_mode in
14911 :L) ac_source=$1;;
14912 :[FH])
14913 ac_file_inputs=
14914 for ac_f
14915 do
14916 case $ac_f in
Charles-François Natali97781b02011-07-22 23:43:42 +020014917 -) ac_f="$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918 *) # Look for the file first in the build tree, then in the source tree
14919 # (if the path is not absolute). The absolute path cannot be DOS-style,
14920 # because $ac_f cannot contain `:'.
14921 test -f "$ac_f" ||
14922 case $ac_f in
14923 [\\/$]*) false;;
14924 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14925 esac ||
Charles-François Natali97781b02011-07-22 23:43:42 +020014926 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14929 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930 done
14931
14932 # Let's still pretend it is `configure' which instantiates (i.e., don't
14933 # use $as_me), people would be surprised to read:
14934 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014935 configure_input='Generated from '`
14936 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14937 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014938 if test x"$ac_file" != x-; then
14939 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014940 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14941$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014943 # Neutralize special characters interpreted by sed in replacement strings.
14944 case $configure_input in #(
14945 *\&* | *\|* | *\\* )
14946 ac_sed_conf_input=`$as_echo "$configure_input" |
14947 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14948 *) ac_sed_conf_input=$configure_input;;
14949 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950
14951 case $ac_tag in
Charles-François Natali97781b02011-07-22 23:43:42 +020014952 *:-:* | *:-) cat >"$tmp/stdin" \
14953 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 esac
14955 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 esac
14957
Martin v. Löwiseba40652007-08-30 20:10:57 +000014958 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014959$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014960 X"$ac_file" : 'X\(//\)[^/]' \| \
14961 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014963$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14965 s//\1/
14966 q
14967 }
14968 /^X\(\/\/\)[^/].*/{
14969 s//\1/
14970 q
14971 }
14972 /^X\(\/\/\)$/{
14973 s//\1/
14974 q
14975 }
14976 /^X\(\/\).*/{
14977 s//\1/
14978 q
14979 }
14980 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014981 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ac_builddir=.
14983
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984case "$ac_dir" in
14985.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14986*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014987 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014989 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 case $ac_top_builddir_sub in
14991 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14992 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14993 esac ;;
14994esac
14995ac_abs_top_builddir=$ac_pwd
14996ac_abs_builddir=$ac_pwd$ac_dir_suffix
14997# for backward compatibility:
14998ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
15000case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015001 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 ac_top_srcdir=$ac_top_builddir_sub
15004 ac_abs_top_srcdir=$ac_pwd ;;
15005 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007 ac_top_srcdir=$srcdir
15008 ac_abs_top_srcdir=$srcdir ;;
15009 *) # Relative name.
15010 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15011 ac_top_srcdir=$ac_top_build_prefix$srcdir
15012 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015013esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015015
Martin v. Löwis11437992002-04-12 09:54:03 +000015016
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017 case $ac_mode in
15018 :F)
15019 #
15020 # CONFIG_FILE
15021 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023 case $INSTALL in
15024 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015027_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030# If the template does not know about datarootdir, expand it.
15031# FIXME: This hack should be removed a few years after 2.60.
15032ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015033ac_sed_dataroot='
15034/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 p
15036 q
15037}
15038/@datadir@/p
15039/@docdir@/p
15040/@infodir@/p
15041/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015042/@mandir@/p'
15043case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044*datarootdir*) ac_datarootdir_seen=yes;;
15045*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15047$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050 ac_datarootdir_hack='
15051 s&@datadir@&$datadir&g
15052 s&@docdir@&$docdir&g
15053 s&@infodir@&$infodir&g
15054 s&@localedir@&$localedir&g
15055 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015056 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057esac
15058_ACEOF
15059
15060# Neutralize VPATH when `$srcdir' = `.'.
15061# Shell code in configure.ac might set extrasub.
15062# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15064ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015065$extrasub
15066_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015068:t
15069/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015070s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015072s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073s&@srcdir@&$ac_srcdir&;t t
15074s&@abs_srcdir@&$ac_abs_srcdir&;t t
15075s&@top_srcdir@&$ac_top_srcdir&;t t
15076s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15077s&@builddir@&$ac_builddir&;t t
15078s&@abs_builddir@&$ac_abs_builddir&;t t
15079s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15080s&@INSTALL@&$ac_INSTALL&;t t
15081$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015082"
Charles-François Natali97781b02011-07-22 23:43:42 +020015083eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15084 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015085
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Charles-François Natali97781b02011-07-22 23:43:42 +020015087 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15088 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015090which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015091$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015092which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015093
Charles-François Natali97781b02011-07-22 23:43:42 +020015094 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 case $ac_file in
Charles-François Natali97781b02011-07-22 23:43:42 +020015096 -) cat "$tmp/out" && rm -f "$tmp/out";;
15097 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015098 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015099 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015100 ;;
15101 :H)
15102 #
15103 # CONFIG_HEADER
15104 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106 {
15107 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015108 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15109 } >"$tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Charles-François Natali97781b02011-07-22 23:43:42 +020015111 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15113$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015115 rm -f "$ac_file"
Charles-François Natali97781b02011-07-22 23:43:42 +020015116 mv "$tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015117 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 fi
15119 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015120 $as_echo "/* $configure_input */" \
Charles-François Natali97781b02011-07-22 23:43:42 +020015121 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015122 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015125
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126
15127 esac
15128
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015129
15130 case $ac_file$ac_mode in
15131 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15132
15133 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134done # for ac_tag
15135
Guido van Rossum627b2d71993-12-24 10:39:16 +000015136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015137as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015138_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015139ac_clean_files=$ac_clean_files_save
15140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015141test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015142 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015143
Martin v. Löwis11437992002-04-12 09:54:03 +000015144
15145# configure is writing to config.log, and then calls config.status.
15146# config.status does its own redirection, appending to config.log.
15147# Unfortunately, on DOS this fails, as config.log is still kept open
15148# by configure, so config.status won't be able to write to it; its
15149# output is simply discarded. So we exec the FD to /dev/null,
15150# effectively closing config.log, so it can be properly (re)opened and
15151# appended to by config.status. When coming back to configure, we
15152# need to make the FD available again.
15153if test "$no_create" != yes; then
15154 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015155 ac_config_status_args=
15156 test "$silent" = yes &&
15157 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015159 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 exec 5>>config.log
15161 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15162 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015163 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015164fi
15165if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15167$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015168fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015169
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015170
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015171echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015172if test ! -f Modules/Setup
15173then
15174 cp $srcdir/Modules/Setup.dist Modules/Setup
15175fi
15176
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015177echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015178if test ! -f Modules/Setup.local
15179then
15180 echo "# Edit this file for local setup changes" >Modules/Setup.local
15181fi
15182
15183echo "creating Makefile"
15184$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15185 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015186 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015187
15188case $ac_sys_system in
15189BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015191
15192 Support for BeOS is deprecated as of Python 2.6.
15193 See PEP 11 for the gory details.
15194 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015195$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015196
15197 Support for BeOS is deprecated as of Python 2.6.
15198 See PEP 11 for the gory details.
15199 " >&2;}
15200 ;;
15201*) ;;
15202esac
15203
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015204mv config.c Modules